Skip to content

Commit

Permalink
Merge pull request winsoft666#17 from dnybz/master
Browse files Browse the repository at this point in the history
CEF 86, 87
  • Loading branch information
winsoft666 authored Jun 20, 2021
2 parents a046e3a + c7da93a commit 029e57e
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/QCefWidget/CefBrowserApp/QCefBrowserApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void QCefBrowserApp::OnContextInitialized() {
DCHECK(manager.get());
#if CEF_VERSION_MAJOR == 72
manager->SetSupportedSchemes(cookieable_schemes_, nullptr);
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
manager->SetSupportedSchemes(cookieable_schemes_, true, nullptr);
#endif
}
Expand Down
14 changes: 7 additions & 7 deletions src/QCefWidget/CefBrowserApp/QCefBrowserHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bool QCefBrowserHandler::OnProcessMessageReceived(

return false;
}
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
bool QCefBrowserHandler::OnProcessMessageReceived(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
Expand Down Expand Up @@ -228,7 +228,7 @@ void QCefBrowserHandler::OnDraggableRegionsChanged(
pImpl_->draggableRegionsChangedNotify(browser, regions);
}
}
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
void QCefBrowserHandler::OnDraggableRegionsChanged(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
Expand Down Expand Up @@ -307,7 +307,7 @@ bool QCefBrowserHandler::OnBeforePopup(
#endif
return true;
}
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
bool QCefBrowserHandler::OnBeforePopup(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
Expand Down Expand Up @@ -561,7 +561,7 @@ bool QCefBrowserHandler::OnOpenURLFromTab(
return false; // return true to cancel this navigation.
}

#if CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#if CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
CefRefPtr<CefResourceRequestHandler> QCefBrowserHandler::GetResourceRequestHandler(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
Expand Down Expand Up @@ -639,7 +639,7 @@ void QCefBrowserHandler::OnProtocolExecution(CefRefPtr<CefBrowser> browser,
}
}

#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
CefResourceRequestHandler::ReturnValue QCefBrowserHandler::OnBeforeResourceLoad(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
Expand Down Expand Up @@ -846,7 +846,7 @@ void QCefBrowserHandler::OnPaint(CefRefPtr<CefBrowser> browser,
pImpl_->updateCefWidget(updateRegion);
}

#if CEF_VERSION_MAJOR == 72 || CEF_VERSION_MAJOR == 76
#if CEF_VERSION_MAJOR == 72 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 87
void QCefBrowserHandler::OnCursorChange(
CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
Expand Down Expand Up @@ -911,7 +911,7 @@ bool QCefBrowserHandler::triggerEvent(const CefRefPtr<CefProcessMessage> msg) {
pBrowser->SendProcessMessage(PID_RENDERER, msg);
return true;
}
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
CefRefPtr<CefBrowser> pBrowser = browser();
if (pBrowser && pBrowser->GetMainFrame()) {
pBrowser->GetMainFrame()->SendProcessMessage(PID_RENDERER, msg);
Expand Down
14 changes: 7 additions & 7 deletions src/QCefWidget/CefBrowserApp/QCefBrowserHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class QCefBrowserHandler : public CefClient,
public CefLifeSpanHandler,
public CefLoadHandler,
public CefRequestHandler,
#if CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#if CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
public CefResourceRequestHandler,
#endif
//public CefResourceHandler,
Expand Down Expand Up @@ -100,7 +100,7 @@ class QCefBrowserHandler : public CefClient,
OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) override;
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefProcessId source_process,
Expand Down Expand Up @@ -155,7 +155,7 @@ class QCefBrowserHandler : public CefClient,
virtual void OnDraggableRegionsChanged(
CefRefPtr<CefBrowser> browser,
const std::vector<CefDraggableRegion>& regions) override;
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
void OnDraggableRegionsChanged(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
Expand Down Expand Up @@ -208,7 +208,7 @@ class QCefBrowserHandler : public CefClient,
CefRefPtr<CefClient>& client,
CefBrowserSettings& settings,
bool* no_javascript_access) override;
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
bool OnBeforePopup(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& target_url,
Expand Down Expand Up @@ -265,7 +265,7 @@ class QCefBrowserHandler : public CefClient,
CefRequestHandler::WindowOpenDisposition target_disposition,
bool user_gesture) override;

#if CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#if CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
virtual CefRefPtr<CefResourceRequestHandler> GetResourceRequestHandler(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
Expand Down Expand Up @@ -299,7 +299,7 @@ class QCefBrowserHandler : public CefClient,
virtual void OnProtocolExecution(CefRefPtr<CefBrowser> browser,
const CefString& url,
bool& allow_os_execution) override;
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
virtual CefResourceRequestHandler::ReturnValue OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
Expand Down Expand Up @@ -335,7 +335,7 @@ class QCefBrowserHandler : public CefClient,
int width,
int height) OVERRIDE;

#if CEF_VERSION_MAJOR == 72 || CEF_VERSION_MAJOR == 76
#if CEF_VERSION_MAJOR == 72 || CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87
void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CursorType type,
Expand Down
2 changes: 1 addition & 1 deletion src/QCefWidget/QCefWidgetImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ bool QCefWidgetImpl::createBrowser(const QString& url) {
requestContext)) {
return false;
}
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
if (!CefBrowserHost::CreateBrowser(window_info,
pQCefViewHandler_,
url.toStdWString(),
Expand Down
6 changes: 3 additions & 3 deletions src/QCefWing/CefRenderApp/QCefRenderApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void QCefRenderApp::OnRenderThreadCreated(CefRefPtr<CefListValue> extra_info) {
void QCefRenderApp::OnWebKitInitialized() {
CEF_REQUIRE_RENDERER_THREAD();

#if CEF_VERSION_MAJOR == 89
#if CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
CreateRenderDelegates(render_delegates_);
#endif

Expand All @@ -62,7 +62,7 @@ void QCefRenderApp::OnBrowserCreated(CefRefPtr<CefBrowser> browser) {
for (; it != render_delegates_.end(); ++it)
(*it)->OnBrowserCreated(this, browser);
}
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
void QCefRenderApp::OnBrowserCreated(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDictionaryValue> extra_info) {
CEF_REQUIRE_RENDERER_THREAD();
Expand Down Expand Up @@ -145,7 +145,7 @@ bool QCefRenderApp::OnProcessMessageReceived(

return handled;
}
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
bool QCefRenderApp::OnProcessMessageReceived(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
Expand Down
4 changes: 2 additions & 2 deletions src/QCefWing/CefRenderApp/QCefRenderApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class QCefRenderApp : public CefApp, public CefRenderProcessHandler {

#if CEF_VERSION_MAJOR == 72
virtual void OnBrowserCreated(CefRefPtr<CefBrowser> browser) override;
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
virtual void OnBrowserCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefDictionaryValue> extra_info) override;
#endif

Expand Down Expand Up @@ -123,7 +123,7 @@ class QCefRenderApp : public CefApp, public CefRenderProcessHandler {
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) override;
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefProcessId source_process,
Expand Down
2 changes: 1 addition & 1 deletion src/QCefWing/CefRenderApp/RenderDelegates/QCefClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void QCefClient::V8Handler::ExecuteInvokeMethod(const CefString& function,
#if CEF_VERSION_MAJOR == 72
if (browser_)
browser_->SendProcessMessage(PID_BROWSER, msg);
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
if (frame_)
frame_->SendProcessMessage(PID_BROWSER, msg);
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ bool RenderDelegate::OnProcessMessageReceived(
browser, source_process, message)) {
return true;
}
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 89
#elif CEF_VERSION_MAJOR == 76 || CEF_VERSION_MAJOR == 86 || CEF_VERSION_MAJOR == 87 || CEF_VERSION_MAJOR == 89
if (render_message_router_->OnProcessMessageReceived(
browser, frame, source_process, message)) {
return true;
Expand Down

0 comments on commit 029e57e

Please sign in to comment.