Skip to content

Commit

Permalink
fix: use GetFrameByIdentifier when CEF_VERSION_MAJOR > 121
Browse files Browse the repository at this point in the history
  • Loading branch information
tishion committed Sep 14, 2024
1 parent b72710d commit 6a27a57
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ if(NOT CEF_SDK_VERSION)
# "119.4.4+g5d1e039+chromium-119.0.6045.199" # GOOD
# "120.1.6+gf08b1fd+chromium-120.0.6099.71" # GOOD
# "121.3.15+g4d3b0b4+chromium-121.0.6167.184" # GOOD
# "122.1.7+gdd187af+chromium-122.0.6261.29"
set(DEFAULT_CEF_SDK_VER "119.4.4+g5d1e039+chromium-119.0.6045.199")
message(STATUS
"CEF_SDK_VERSION is empty, use default version ${DEFAULT_CEF_SDK_VER}\n"
Expand Down
1 change: 1 addition & 0 deletions cmake/DownloadCef.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Generally, there is NO NEED to modify the following config
#
# Download CEF binary package
# https://cef-builds.spotifycdn.com/index.html
#
if(NOT CEF_SDK_VERSION)
message(FATAL_ERROR "CEF_SDK_VERSION is missing!")
Expand Down
Empty file modified linux-arm-gen.sh
100644 → 100755
Empty file.
Empty file modified linux-arm64-gen.sh
100644 → 100755
Empty file.
Empty file modified linux-x86-gen.sh
100644 → 100755
Empty file.
Empty file modified linux-x86_64-gen.sh
100644 → 100755
Empty file.
Empty file modified mac-arm64-gen.sh
100644 → 100755
Empty file.
Empty file modified mac-x86_64-gen.sh
100644 → 100755
Empty file.
7 changes: 6 additions & 1 deletion src/CefView/CefBrowserApp/CefViewBrowserClient.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <CefViewBrowserClient.h>
#include <CefViewBrowserClient.h>

#pragma region std_headers
#include <sstream>
Expand Down Expand Up @@ -106,7 +106,12 @@ CefViewBrowserClient::TriggerEvent(CefRefPtr<CefBrowser> browser,

for (auto id : frameIds) {
auto m = msg->Copy();
#if CEF_VERSION_MAJOR > 121
auto frame = browser->GetFrameByIdentifier(id);
#else
auto frame = browser->GetFrame(id);
#endif

frame->SendProcessMessage(PID_RENDERER, m);
}

Expand Down

0 comments on commit 6a27a57

Please sign in to comment.