Skip to content

Commit

Permalink
Use new mcef-downloads to download CEF. Fix compile issue on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ds58 committed Aug 10, 2023
1 parent 8a273dc commit 58d9408
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion cmake/DownloadCEF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
36 changes: 19 additions & 17 deletions native/CefBrowser_N.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,23 +994,25 @@ void getZoomLevel(CefRefPtr<CefBrowserHost> host,
}
}

void OnAfterParentChanged(CefRefPtr<CefBrowser> browser) {
if (!CefCurrentlyOn(TID_UI)) {
CefPostTask(TID_UI, base::BindOnce(&OnAfterParentChanged, browser));
return;
}

if (browser->GetHost()->GetClient()) {
CefRefPtr<LifeSpanHandler> 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<CefBrowser> browser) {
// if (!CefCurrentlyOn(TID_UI)) {
// CefPostTask(TID_UI, base::BindOnce(&OnAfterParentChanged, browser));
// return;
// }
//
// if (browser->GetHost()->GetClient()) {
// CefRefPtr<LifeSpanHandler> lifeSpanHandler =
// (LifeSpanHandler*)browser->GetHost()
// ->GetClient()
// ->GetLifeSpanHandler()
// .get();
// if (lifeSpanHandler) {
// lifeSpanHandler->OnAfterParentChanged(browser);
// }
// }
//}

jobject NewJNILongVector(JNIEnv* env, const std::vector<int64>& vals) {
ScopedJNIObjectLocal jvector(env, "java/util/Vector");
Expand Down

0 comments on commit 58d9408

Please sign in to comment.