From 58d940893e60487a3576f61e70e13f3a5183f476 Mon Sep 17 00:00:00 2001 From: ds58 <30220598+ds58@users.noreply.github.com> Date: Wed, 9 Aug 2023 23:50:32 -0500 Subject: [PATCH] Use new mcef-downloads to download CEF. Fix compile issue on macOS --- cmake/DownloadCEF.cmake | 2 +- native/CefBrowser_N.cpp | 36 +++++++++++++++++++----------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/cmake/DownloadCEF.cmake b/cmake/DownloadCEF.cmake index d7967a19..b2d11930 100644 --- a/cmake/DownloadCEF.cmake +++ b/cmake/DownloadCEF.cmake @@ -21,7 +21,7 @@ function(DownloadCEF platform branch version download_dir) set(CEF_DOWNLOAD_FILENAME "${CEF_DISTRIBUTION}.tar.bz2") set(CEF_DOWNLOAD_PATH "${CEF_DOWNLOAD_DIR}/${CEF_DOWNLOAD_FILENAME}") if(NOT EXISTS "${CEF_DOWNLOAD_PATH}") - set(CEF_DOWNLOAD_URL "https://ewr1.vultrobjects.com/cef-builds/${branch}/${CEF_DOWNLOAD_FILENAME}") + set(CEF_DOWNLOAD_URL "https://mcef-download.cinemamod.com/cef-builds/${branch}/${CEF_DOWNLOAD_FILENAME}") string(REPLACE "+" "%2B" CEF_DOWNLOAD_URL_ESCAPED ${CEF_DOWNLOAD_URL}) # Download the SHA1 hash for the binary distribution. diff --git a/native/CefBrowser_N.cpp b/native/CefBrowser_N.cpp index 5a3028ce..bef1da00 100644 --- a/native/CefBrowser_N.cpp +++ b/native/CefBrowser_N.cpp @@ -994,23 +994,25 @@ void getZoomLevel(CefRefPtr host, } } -void OnAfterParentChanged(CefRefPtr browser) { - if (!CefCurrentlyOn(TID_UI)) { - CefPostTask(TID_UI, base::BindOnce(&OnAfterParentChanged, browser)); - return; - } - - if (browser->GetHost()->GetClient()) { - CefRefPtr lifeSpanHandler = - (LifeSpanHandler*)browser->GetHost() - ->GetClient() - ->GetLifeSpanHandler() - .get(); - if (lifeSpanHandler) { - lifeSpanHandler->OnAfterParentChanged(browser); - } - } -} +// Removed because we don't care about when the native parent window changes. +// This fixes a compile issue on macOS - ds58 +//void OnAfterParentChanged(CefRefPtr browser) { +// if (!CefCurrentlyOn(TID_UI)) { +// CefPostTask(TID_UI, base::BindOnce(&OnAfterParentChanged, browser)); +// return; +// } +// +// if (browser->GetHost()->GetClient()) { +// CefRefPtr lifeSpanHandler = +// (LifeSpanHandler*)browser->GetHost() +// ->GetClient() +// ->GetLifeSpanHandler() +// .get(); +// if (lifeSpanHandler) { +// lifeSpanHandler->OnAfterParentChanged(browser); +// } +// } +//} jobject NewJNILongVector(JNIEnv* env, const std::vector& vals) { ScopedJNIObjectLocal jvector(env, "java/util/Vector");