Skip to content

Commit a7ba76b

Browse files
committed
[[ CEF ]] Update CEF to 74.1.16+ge20b240+chromium-74.0.3729.131
This patch updates IMPLEMENT_REFCOUNTING for changed definition and the `OnBeforeBrowse` callback for the latest version of CEF. It also updates prebuilt scripts because the filenames of the CEF prebuilts have changed and now include the full chromium version number and a CEF version number and commit hash.
1 parent 8acbaa3 commit a7ba76b

File tree

12 files changed

+39
-29
lines changed

12 files changed

+39
-29
lines changed

libbrowser/src/libbrowser_cef.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ class MCCefBrowserApp : public CefApp, CefBrowserProcessHandler
296296
p_command_line->AppendSwitch(MC_CEF_HIDPI_SWITCH);
297297
}
298298

299-
IMPLEMENT_REFCOUNTING(MCCefBrowserApp)
299+
IMPLEMENT_REFCOUNTING(MCCefBrowserApp);
300300
};
301301

302302
extern "C" int initialise_weak_link_cef(void);
@@ -985,7 +985,7 @@ class MCCefBrowserClient : public CefClient, CefLifeSpanHandler, CefRequestHandl
985985
// CefRequestHandler interface
986986

987987
// Called on UI thread
988-
virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> p_browser, CefRefPtr<CefFrame> p_frame, CefRefPtr<CefRequest> p_request, bool p_is_redirect) OVERRIDE
988+
virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> p_browser, CefRefPtr<CefFrame> p_frame, CefRefPtr<CefRequest> p_request, bool p_user_gesture, bool p_is_redirect) OVERRIDE
989989
{
990990
// IM-2014-07-21: [[ Bug 12296 ]] If browser has been closed then exit
991991
if (nil == m_owner)
@@ -1249,7 +1249,7 @@ class MCCefBrowserClient : public CefClient, CefLifeSpanHandler, CefRequestHandl
12491249
p_model->Clear();
12501250
}
12511251

1252-
IMPLEMENT_REFCOUNTING(MCCefBrowserClient)
1252+
IMPLEMENT_REFCOUNTING(MCCefBrowserClient);
12531253
};
12541254

12551255
bool MCCefBrowserBase::Initialize()

libbrowser/src/libbrowser_cefprocess.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class MCGetTitleDOMVisitor : public CefDOMVisitor
428428
m_title = p_dom->GetTitle();
429429
}
430430

431-
IMPLEMENT_REFCOUNTING(MCGetTitleDOMVisitor)
431+
IMPLEMENT_REFCOUNTING(MCGetTitleDOMVisitor);
432432
};
433433

434434
bool MCCefHandleGetTitle(CefRefPtr<CefBrowser> p_browser, CefString &r_return_value)
@@ -561,7 +561,7 @@ class MCCefLCFuncHandler : public CefV8Handler
561561
return false;
562562
}
563563

564-
IMPLEMENT_REFCOUNTING(MCCefLCFuncHandler)
564+
IMPLEMENT_REFCOUNTING(MCCefLCFuncHandler);
565565
};
566566

567567
class MCCefRenderApp : public CefApp, CefRenderProcessHandler
@@ -807,7 +807,7 @@ class MCCefRenderApp : public CefApp, CefRenderProcessHandler
807807
}
808808

809809

810-
IMPLEMENT_REFCOUNTING(MCCefRenderApp)
810+
IMPLEMENT_REFCOUNTING(MCCefRenderApp);
811811
};
812812

813813
////////////////////////////////////////////////////////////////////////////////

prebuilt/libcef.gyp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949
'unpacked/cef/<(uniform_arch)-win32-$(PlatformToolset)_static_$(ConfigurationName)/lib/CEF/libGLESv2.dll',
5050
'unpacked/cef/<(uniform_arch)-win32-$(PlatformToolset)_static_$(ConfigurationName)/lib/CEF/natives_blob.bin',
5151
'unpacked/cef/<(uniform_arch)-win32-$(PlatformToolset)_static_$(ConfigurationName)/lib/CEF/snapshot_blob.bin',
52-
'unpacked/cef/<(uniform_arch)-win32-$(PlatformToolset)_static_$(ConfigurationName)/lib/CEF/widevinecdmadapter.dll',
53-
'unpacked/cef/<(uniform_arch)-win32-$(PlatformToolset)_static_$(ConfigurationName)/lib/CEF/v8_context_snapshot.bin',
52+
'unpacked/cef/<(uniform_arch)-win32-$(PlatformToolset)_static_$(ConfigurationName)/lib/CEF/v8_context_snapshot.bin',
5453
'unpacked/cef/<(uniform_arch)-win32-$(PlatformToolset)_static_$(ConfigurationName)/lib/CEF/chrome_elf.dll',
5554
],
5655
},

prebuilt/scripts/build-cef.bat

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ REM #
99
ECHO Build CEF-%CEF_VERSION%.%CEF_BUILDREVISION% for %BUILDTRIPLE%
1010

1111
IF %ARCH%==x86_64 (
12-
SET CEF_SRC_NAME=cef_binary_%CEF_VERSION%.%CEF_BUILDREVISION%_windows64
12+
SET CEF_SRC_NAME=cef_binary_%CEF_VERSION%%2B%CEF_BUILDREVISION%%2Bchromium-%CEFChromium_VERSION%_windows64
13+
SET CEF_DST_NAME=cef_binary_%CEF_VERSION%_%CEF_BUILDREVISION%_windows64
1314
) ELSE (
14-
SET CEF_SRC_NAME=cef_binary_%CEF_VERSION%.%CEF_BUILDREVISION%_windows32
15+
SET CEF_SRC_NAME=cef_binary_%CEF_VERSION%%2B%CEF_BUILDREVISION%%2Bchromium-%CEFChromium_VERSION%_windows32
16+
SET CEF_DST_NAME=cef_binary_%CEF_VERSION%_%CEF_BUILDREVISION%_windows32
1517
)
1618

17-
SET CEF_TGZ=%_ROOT_DIR%\%CEF_SRC_NAME%.tar.bz2
18-
SET CEF_SRC=%_ROOT_DIR%\%CEF_SRC_NAME%
19+
SET CEF_TGZ=%_ROOT_DIR%\%CEF_DST_NAME%.tar.bz2
20+
SET CEF_SRC=%_ROOT_DIR%\%CEF_DST_NAME%
1921
SET CEF_BIN=%_ROOT_DIR%\cef-%CEF_VERSION%.%CEF_BUILDREVISION%-%BUILDTRIPLE%-bin
2022
SET CEF_BUILD_LOG=%_ROOT_DIR%\cef-%CEF_VERSION%.%CEF_BUILDREVISION%-%BUILDTRIPLE%.log
2123

@@ -28,9 +30,14 @@ if not exist %CEF_TGZ% (
2830
perl -MLWP::Simple -e "getstore('http://opensource.spotify.com/cefbuilds/%CEF_SRC_NAME%.tar.bz2', '%CEF_TGZ%')"
2931
)
3032

33+
if not exist %CEF_TGZ% (
34+
echo Failed to download http://opensource.spotify.com/cefbuilds/%CEF_SRC_NAME%.tar.bz2 to %CEF_TGZ%
35+
EXIT /B 1
36+
)
37+
3138
if not exist %CEF_SRC% (
3239
echo Unpacking CEF-%CEF_VERSION%.%CEF_BUILDREVISION% for %BUILDTRIPLE%
33-
bash -c "tar -jxf %CEF_SRC_NAME%.tar.bz2"
40+
bash -c "tar -jxf %CEF_DST_NAME%.tar.bz2"
3441
)
3542

3643
ECHO Packaging CEF-%CEF_VERSION%.%CEF_BUILDREVISION% for %BUILDTRIPLE%

prebuilt/scripts/build-cef.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,24 @@ source "${BASEDIR}/scripts/util.inc"
66

77
# Grab the source for the library
88
if [ "${ARCH}" == "x86" ] ; then
9-
CEF_SRC="cef_binary_${CEF_VERSION}.${CEF_BUILDREVISION}_${PLATFORM}32"
9+
CEF_DST="cef_binary_${CEF_VERSION}_${CEF_BUILDREVISION}_${PLATFORM}32"
10+
CEF_SRC="cef_binary_${CEF_VERSION}%2B${CEF_BUILDREVISION}%2Bchromium-${CEFChromium_VERSION}_${PLATFORM}32.tar.bz2"
1011
elif [ "${ARCH}" == "x86_64" ] ; then
11-
CEF_SRC="cef_binary_${CEF_VERSION}.${CEF_BUILDREVISION}_${PLATFORM}64"
12+
CEF_DST="cef_binary_${CEF_VERSION}_${CEF_BUILDREVISION}_${PLATFORM}64"
13+
CEF_SRC="cef_binary_${CEF_VERSION}%2B${CEF_BUILDREVISION}%2Bchromium-${CEFChromium_VERSION}_${PLATFORM}64.tar.bz2"
1214
else
1315
echo "No binaries available for arch"
1416
fi
1517

16-
CEF_TGZ="${CEF_SRC}.tar.bz2"
18+
CEF_TGZ="${CEF_DST}.tar.bz2"
1719
cd "${BUILDDIR}"
1820

19-
if [ ! -d "$CEF_SRC" ] ; then
21+
if [ ! -d "$CEF_DST" ] ; then
2022
if [ ! -e "$CEF_TGZ" ] ; then
2123
echo "Fetching CEF source"
22-
fetchUrl "http://opensource.spotify.com/cefbuilds/${CEF_TGZ}" "${CEF_TGZ}"
24+
fetchUrl "http://opensource.spotify.com/cefbuilds/${CEF_SRC}" "${CEF_TGZ}"
2325
if [ $? != 0 ] ; then
24-
echo " failed"
26+
echo "downloading http://opensource.spotify.com/cefbuilds/${CEF_SRC} failed"
2527
if [ -e "${CEF_TGZ}" ] ; then
2628
rm ${CEF_TGZ}
2729
fi
@@ -39,8 +41,8 @@ function buildCEF {
3941
local ARCH=$2
4042

4143
mkdir -p "${OUTPUT_DIR}/lib/${PLATFORM}/${ARCH}/CEF"
42-
cp -av "${BUILDDIR}/${CEF_SRC}/Release/"* "${OUTPUT_DIR}/lib/${PLATFORM}/${ARCH}/CEF/"
43-
cp -av "${BUILDDIR}/${CEF_SRC}/Resources/"* "${OUTPUT_DIR}/lib/${PLATFORM}/${ARCH}/CEF/"
44+
cp -av "${BUILDDIR}/${CEF_DST}/Release/"* "${OUTPUT_DIR}/lib/${PLATFORM}/${ARCH}/CEF/"
45+
cp -av "${BUILDDIR}/${CEF_DST}/Resources/"* "${OUTPUT_DIR}/lib/${PLATFORM}/${ARCH}/CEF/"
4446
strip --strip-unneeded "${OUTPUT_DIR}/lib/${PLATFORM}/${ARCH}/CEF/libcef.so"
4547
}
4648

prebuilt/scripts/lib_versions.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
REM # This file sets the libraries versions defined in versions/
22

3-
FOR %%L in (OpenSSL ICU CEF Curl) DO (
3+
FOR %%L in (OpenSSL ICU CEF Curl CEFChromium) DO (
44
SET PREBUILT_LIB=%%L
55
SET /P !PREBUILT_LIB!_VERSION=<versions\!PREBUILT_LIB!
66
IF EXIST "versions\!PREBUILT_LIB!_buildrevision" (

prebuilt/scripts/lib_versions.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ readVersion OpenSSL
1919
readVersion ICU
2020
readVersion Curl
2121
readVersion CEF
22+
readVersion CEFChromium

prebuilt/versions/cef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3202.1693
1+
74.1.16
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
g6adf855
1+
ge20b240

prebuilt/versions/cefchromium

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
74.0.3729.131

0 commit comments

Comments
 (0)