Skip to content
Permalink
Browse files

Revert "Update CEF to 75.0.6+g90ecd35+chromium-75.0.3770.80"

This reverts commit 09a1f26.
  • Loading branch information...
Jusonex committed Jun 30, 2019
1 parent 48f2c99 commit 41927e18d96de68afb4ff0b01a89a8e4c092897c
@@ -30,7 +30,7 @@ class CCefApp : public CefApp, public CefRenderProcessHandler
// Tell MTA that we lost input focus
auto message = CefProcessMessage::Create("InputFocus");
message->GetArgumentList()->SetBool(0, false);
browser->GetMainFrame()->SendProcessMessage(PID_BROWSER, message);
browser->SendProcessMessage(PID_BROWSER, message);

// Set variable to ensure that the event does not trigger twice
m_bHasInputFocus = false;
@@ -45,7 +45,7 @@ class CCefApp : public CefApp, public CefRenderProcessHandler
{
auto message = CefProcessMessage::Create("InputFocus");
message->GetArgumentList()->SetBool(0, true);
browser->GetMainFrame()->SendProcessMessage(PID_BROWSER, message);
browser->SendProcessMessage(PID_BROWSER, message);

// Set variable to ensure that the event does not trigger twice
m_bHasInputFocus = true;
@@ -83,7 +83,7 @@ class CCefApp : public CefApp, public CefRenderProcessHandler
return;

CefRefPtr<CefProcessMessage> message = V8Helpers::SerialiseV8Arguments("TriggerLuaEvent", arguments);
frame->GetBrowser()->GetMainFrame()->SendProcessMessage(PID_BROWSER, message);
frame->GetBrowser()->SendProcessMessage(PID_BROWSER, message);
}

public:
@@ -42,6 +42,16 @@ void CAjaxResourceHandler::Cancel()
{
}

bool CAjaxResourceHandler::CanGetCookie(const CefCookie& cookie)
{
return false;
}

bool CAjaxResourceHandler::CanSetCookie(const CefCookie& cookie)
{
return false;
}

void CAjaxResourceHandler::GetResponseHeaders(CefRefPtr<CefResponse> response, int64& response_length, CefString& redirectUrl)
{
response->SetStatus(200);
@@ -29,6 +29,8 @@ class CAjaxResourceHandler : public CefResourceHandler, public CAjaxResourceHand

// CefResourceHandler
virtual void Cancel() override;
virtual bool CanGetCookie(const CefCookie& cookie) override;
virtual bool CanSetCookie(const CefCookie& cookie) override;
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, int64& response_length, CefString& redirectUrl) override;
virtual bool ProcessRequest(CefRefPtr<CefRequest> request, CefRefPtr<CefCallback> callback) override;
virtual bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, CefRefPtr<CefCallback> callback) override;
@@ -73,7 +73,7 @@ void CWebView::Initialise()
CefWindowInfo windowInfo;
windowInfo.SetAsWindowless(g_pCore->GetHookedWindow());

CefBrowserHost::CreateBrowser(windowInfo, this, "", browserSettings, nullptr, nullptr);
CefBrowserHost::CreateBrowser(windowInfo, this, "", browserSettings, nullptr);
}

void CWebView::CloseBrowser()
@@ -545,8 +545,7 @@ void CWebView::Refresh(bool bIgnoreCache)
// //
// //
////////////////////////////////////////////////////////////////////
bool CWebView::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefProcessId source_process,
CefRefPtr<CefProcessMessage> message)
bool CWebView::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId source_process, CefRefPtr<CefProcessMessage> message)
{
CefRefPtr<CefListValue> argList = message->GetArgumentList();
if (message->GetName() == "TriggerLuaEvent")
@@ -809,7 +808,7 @@ bool CWebView::OnBeforeBrowse(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame>
// //
// //
////////////////////////////////////////////////////////////////////
CefResourceRequestHandler::ReturnValue CWebView::OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
CefRequestHandler::ReturnValue CWebView::OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
CefRefPtr<CefRequestCallback> callback)
{
// Mostly the same as CWebView::OnBeforeBrowse
@@ -904,8 +903,7 @@ void CWebView::OnBeforeClose(CefRefPtr<CefBrowser> browser)
////////////////////////////////////////////////////////////////////
bool CWebView::OnBeforePopup(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& target_url, const CefString& target_frame_name,
CefLifeSpanHandler::WindowOpenDisposition target_disposition, bool user_gesture, const CefPopupFeatures& popupFeatures,
CefWindowInfo& windowInfo, CefRefPtr<CefClient>& client, CefBrowserSettings& settings, CefRefPtr<CefDictionaryValue>& extra_info,
bool* no_javascript_access)
CefWindowInfo& windowInfo, CefRefPtr<CefClient>& client, CefBrowserSettings& settings, bool* no_javascript_access)
{
// ATTENTION: This method is called on the IO thread

@@ -20,7 +20,6 @@
#include <cef3/include/cef_render_handler.h>
#include <cef3/include/cef_life_span_handler.h>
#include <cef3/include/cef_context_menu_handler.h>
#include <cef3/include/cef_resource_request_handler.h>
#include <SString.h>
#include <mmdeviceapi.h>
#include <audiopolicy.h>
@@ -35,7 +34,6 @@ class CWebView : public CWebViewInterface,
private CefRenderHandler,
private CefLoadHandler,
private CefRequestHandler,
private CefResourceRequestHandler,
private CefLifeSpanHandler,
private CefJSDialogHandler,
private CefDialogHandler,
@@ -113,8 +111,7 @@ class CWebView : public CWebViewInterface,
virtual CefRefPtr<CefDialogHandler> GetDialogHandler() override { return this; };
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() override { return this; };
virtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() override { return this; };
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) override;
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId source_process, CefRefPtr<CefProcessMessage> message) override;

// CefRenderHandler methods
virtual void GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect) override;
@@ -132,23 +129,14 @@ class CWebView : public CWebViewInterface,

// CefRequestHandler methods
virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, bool userGesture, bool isRedirect) override;
virtual CefRefPtr<CefResourceRequestHandler> GetResourceRequestHandler(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request, bool is_navigation, bool is_download,
const CefString& request_initiator, bool& disable_default_handling) override
{
return this;
};

// CefResourceRequestHandler
virtual CefResourceRequestHandler::ReturnValue OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
virtual CefRequestHandler::ReturnValue OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
CefRefPtr<CefRequestCallback> callback) override;

// CefLifeSpawnHandler methods
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) override;
virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& target_url, const CefString& target_frame_name,
CefLifeSpanHandler::WindowOpenDisposition target_disposition, bool user_gesture, const CefPopupFeatures& popupFeatures,
CefWindowInfo& windowInfo, CefRefPtr<CefClient>& client, CefBrowserSettings& settings, CefRefPtr<CefDictionaryValue>& extra_info,
bool* no_javascript_access) override;
CefWindowInfo& windowInfo, CefRefPtr<CefClient>& client, CefBrowserSettings& settings, bool* no_javascript_access) override;
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) override;

// CefJSDialogHandler methods
@@ -7,7 +7,7 @@ local CEF_PATH = "vendor/cef3/"
local CEF_URL_PREFIX = "https://mirror.mtasa.com/bdata/cef/"
local CEF_URL_SUFFIX = "_windows32_minimal.tar.bz2"

local CEF_VERSION = "75.0.6+g90ecd35+chromium-75.0.3770.80" -- Change here to update CEF version
local CEF_VERSION = "73.1.13+g6e3c989+chromium-73.0.3683.75" -- Change here to update CEF version

function make_cef_download_url()
return CEF_URL_PREFIX..http.escapeUrlParam(CEF_VERSION)..CEF_URL_SUFFIX

0 comments on commit 41927e1

Please sign in to comment.
You can’t perform that action at this time.