Commit 725ed885 authored by Alexander Guettler's avatar Alexander Guettler Committed by Marshall Greenblatt
Browse files

Update to Chromium version 74.0.3729.0 (#638880)

- Windows: 10.0.17763.0 SDK is now required.
- Mac: 10.13 SDK is now required.
- Removed CefRequestContext::ResolveHostCached which is no longer supported by Chromium.
parent 58e1149c
......@@ -47,3 +47,4 @@ Thumbs.db
/docs
# CEF generated files
/include/cef_version.h
.ccls-cache/
\ No newline at end of file
......@@ -457,6 +457,8 @@ static_library("libcef_static") {
"libcef/browser/osr/render_widget_host_view_osr.h",
"libcef/browser/osr/software_output_device_osr.cc",
"libcef/browser/osr/software_output_device_osr.h",
"libcef/browser/osr/synthetic_gesture_target_osr.cc",
"libcef/browser/osr/synthetic_gesture_target_osr.h",
"libcef/browser/osr/web_contents_view_osr.cc",
"libcef/browser/osr/web_contents_view_osr.h",
"libcef/browser/path_util_impl.cc",
......
......@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/74.0.3706.0'
'chromium_checkout': 'refs/tags/74.0.3729.0'
}
......@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=cd2b70b906b9f07923d69d9ec0b32488125b0af3$
// $hash=f7f1ec971c726a6a74bcc7f5cee7a8eb1911078d$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
......@@ -259,17 +259,6 @@ typedef struct _cef_request_context_t {
const cef_string_t* origin,
struct _cef_resolve_callback_t* callback);
///
// Attempts to resolve |origin| to a list of associated IP addresses using
// cached data. |resolved_ips| will be populated with the list of resolved IP
// addresses or NULL if no cached data is available. Returns ERR_NONE on
// success. This function must be called on the browser process IO thread.
///
cef_errorcode_t(CEF_CALLBACK* resolve_host_cached)(
struct _cef_request_context_t* self,
const cef_string_t* origin,
cef_string_list_t resolved_ips);
///
// Load an extension.
//
......
......@@ -139,7 +139,7 @@ class CefRefCount {
} \
\
private: \
CefRefCount ref_count_;
CefRefCount ref_count_
///
// Macro that provides a locking implementation. Use the Lock() and Unlock()
......
......@@ -270,17 +270,6 @@ class CefRequestContext : public virtual CefBaseRefCounted {
virtual void ResolveHost(const CefString& origin,
CefRefPtr<CefResolveCallback> callback) = 0;
///
// Attempts to resolve |origin| to a list of associated IP addresses using
// cached data. |resolved_ips| will be populated with the list of resolved IP
// addresses or empty if no cached data is available. Returns ERR_NONE on
// success. This method must be called on the browser process IO thread.
///
/*--cef(default_retval=ERR_FAILED)--*/
virtual cef_errorcode_t ResolveHostCached(
const CefString& origin,
std::vector<CefString>& resolved_ips) = 0;
///
// Load an extension.
//
......
......@@ -59,7 +59,7 @@ class CefButtonDelegate : public CefViewDelegate {
// Called when the state of |button| changes.
///
/*--cef()--*/
virtual void OnButtonStateChanged(CefRefPtr<CefButton> button){};
virtual void OnButtonStateChanged(CefRefPtr<CefButton> button) {}
};
#endif // CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_
......@@ -500,6 +500,10 @@ const PrefService* CefBrowserContextImpl::GetPrefs() const {
return pref_service_.get();
}
SimpleFactoryKey* CefBrowserContextImpl::GetSimpleFactoryKey() const {
return nullptr;
}
CefRequestContextImpl* CefBrowserContextImpl::GetCefRequestContext() const {
return GetCefRequestContext(false);
}
......
......@@ -87,7 +87,9 @@ class CefBrowserContextImpl : public CefBrowserContext,
// Profile methods.
PrefService* GetPrefs() override;
bool AllowsBrowserWindows() const override { return false; }
const PrefService* GetPrefs() const override;
SimpleFactoryKey* GetSimpleFactoryKey() const override;
// CefBrowserContext methods.
CefRequestContextImpl* GetCefRequestContext() const override;
......
......@@ -208,10 +208,18 @@ PrefService* CefBrowserContextProxy::GetPrefs() {
return parent_->GetPrefs();
}
bool CefBrowserContextProxy::AllowsBrowserWindows() const {
return parent_->AllowsBrowserWindows();
}
const PrefService* CefBrowserContextProxy::GetPrefs() const {
return parent_->GetPrefs();
}
SimpleFactoryKey* CefBrowserContextProxy::GetSimpleFactoryKey() const {
return parent_->GetSimpleFactoryKey();
}
CefRequestContextImpl* CefBrowserContextProxy::GetCefRequestContext() const {
return request_context_;
}
......
......@@ -64,7 +64,9 @@ class CefBrowserContextProxy : public CefBrowserContext {
// Profile methods.
PrefService* GetPrefs() override;
bool AllowsBrowserWindows() const override;
const PrefService* GetPrefs() const override;
SimpleFactoryKey* GetSimpleFactoryKey() const override;
// CefBrowserContext methods.
CefRequestContextImpl* GetCefRequestContext() const override;
......
......@@ -512,7 +512,7 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::GetBrowserForRequest(
return GetBrowserForFrame(render_process_id, render_frame_id);
}
const content::ResourceRequestInfo* request_info =
content::ResourceRequestInfo* request_info =
content::ResourceRequestInfo::ForRequest(request);
if (request_info)
return GetBrowserForFrameTreeNode(request_info->GetFrameTreeNodeId());
......@@ -1644,7 +1644,7 @@ void CefBrowserHostImpl::CancelContextMenu() {
CefRefPtr<CefFrame> CefBrowserHostImpl::GetFrameForRequest(
const net::URLRequest* request) {
CEF_REQUIRE_IOT();
const content::ResourceRequestInfo* info =
content::ResourceRequestInfo* info =
content::ResourceRequestInfo::ForRequest(request);
if (!info)
return nullptr;
......@@ -2435,6 +2435,7 @@ bool CefBrowserHostImpl::TakeFocus(content::WebContents* source, bool reverse) {
}
bool CefBrowserHostImpl::HandleContextMenu(
content::RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params) {
return HandleContextMenu(web_contents(), params);
}
......
......@@ -426,7 +426,9 @@ class CefBrowserHostImpl : public CefBrowserHost,
bool proceed,
bool* proceed_to_fire_unload) override;
bool TakeFocus(content::WebContents* source, bool reverse) override;
bool HandleContextMenu(const content::ContextMenuParams& params) override;
bool HandleContextMenu(content::RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params) override;
content::KeyboardEventProcessingResult PreHandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
......
......@@ -85,7 +85,7 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
CefBrowserInfo(int browser_id, bool is_popup);
int browser_id() const { return browser_id_; };
int browser_id() const { return browser_id_; }
bool is_popup() const { return is_popup_; }
bool is_windowless() const { return is_windowless_; }
......
......@@ -7,11 +7,16 @@
#include "libcef/common/content_client.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_pump_for_ui.h"
#if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/message_loop/message_pump_mac.h"
#endif
#include "content/public/browser/browser_thread.h"
namespace {
// MessagePump implementation that delegates to OnScheduleMessagePumpWork() for
......@@ -82,23 +87,27 @@ CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() {
return nullptr;
}
std::unique_ptr<base::MessagePump> CreatePump() {
const CefSettings& settings = CefContext::Get()->settings();
if (settings.external_message_pump) {
std::unique_ptr<base::MessagePump> MessagePumpFactoryForUI() {
if (!content::BrowserThread::IsThreadInitialized(
content::BrowserThread::UI) ||
content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
CefRefPtr<CefBrowserProcessHandler> handler = GetBrowserProcessHandler();
if (handler)
return base::WrapUnique(new MessagePumpExternal(0.01f, handler));
return std::make_unique<MessagePumpExternal>(0.01f, handler);
}
return base::MessageLoop::CreateMessagePumpForType(
base::MessageLoop::TYPE_UI);
#if defined(OS_MACOSX)
return base::MessagePumpMac::Create();
#else
return std::make_unique<base::MessagePumpForUI>();
#endif
}
} // namespace
CefBrowserMessageLoop::CefBrowserMessageLoop()
: base::MessageLoopForUI(CreatePump()) {
BindToCurrentThread();
void InitMessagePumpFactoryForUI() {
const CefSettings& settings = CefContext::Get()->settings();
if (settings.external_message_pump) {
base::MessageLoop::InitMessagePumpForUIFactory(MessagePumpFactoryForUI);
}
}
CefBrowserMessageLoop::~CefBrowserMessageLoop() {}
......@@ -4,21 +4,7 @@
#ifndef CEF_LIBCEF_BROWSER_BROWSER_MESSAGE_LOOP_H_
#define CEF_LIBCEF_BROWSER_BROWSER_MESSAGE_LOOP_H_
#pragma once
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
// Class used to process events on the current message loop.
class CefBrowserMessageLoop : public base::MessageLoopForUI {
typedef base::MessageLoopForUI inherited;
public:
CefBrowserMessageLoop();
~CefBrowserMessageLoop() override;
private:
DISALLOW_COPY_AND_ASSIGN(CefBrowserMessageLoop);
};
void InitMessagePumpFactoryForUI();
#endif // CEF_LIBCEF_BROWSER_BROWSER_MESSAGE_LOOP_H_
......@@ -75,11 +75,11 @@ void ChromeBrowserProcessStub::Shutdown() {
void ChromeBrowserProcessStub::ResourceDispatcherHostCreated() {
NOTREACHED();
};
}
void ChromeBrowserProcessStub::EndSession() {
NOTREACHED();
};
}
void ChromeBrowserProcessStub::FlushLocalStateAndReply(
base::OnceClosure reply) {
......
......@@ -553,6 +553,34 @@ bool CefContentBrowserClient::ShouldUseProcessPerSite(
return true;
}
// Based on
// ChromeContentBrowserClientExtensionsPart::DoesSiteRequireDedicatedProcess.
bool CefContentBrowserClient::DoesSiteRequireDedicatedProcess(
content::BrowserContext* browser_context,
const GURL& effective_site_url) {
if (!extensions::ExtensionsEnabled())
return false;
extensions::ExtensionRegistry* registry =
extensions::ExtensionRegistry::Get(browser_context);
const extensions::Extension* extension =
registry->enabled_extensions().GetExtensionOrAppByURL(effective_site_url);
if (!extension)
return false;
// Always isolate Chrome Web Store.
if (extension->id() == extensions::kWebStoreAppId)
return true;
// Extensions should be isolated, except for hosted apps. Isolating hosted
// apps is a good idea, but ought to be a separate knob.
if (extension->is_hosted_app())
return false;
// Isolate all extensions.
return true;
}
bool CefContentBrowserClient::IsHandledURL(const GURL& url) {
if (!url.is_valid())
return false;
......@@ -1126,6 +1154,7 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory(
content::RenderFrameHost* frame,
int render_process_id,
bool is_navigation,
bool is_download,
const url::Origin& request_initiator,
network::mojom::URLLoaderFactoryRequest* factory_request,
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
......@@ -1137,8 +1166,8 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory(
extensions::BrowserContextKeyedAPIFactory<extensions::WebRequestAPI>::Get(
browser_context);
bool use_proxy = web_request_api->MaybeProxyURLLoaderFactory(
browser_context, frame, render_process_id, is_navigation, factory_request,
header_client);
browser_context, frame, render_process_id, is_navigation, is_download,
factory_request, header_client);
if (bypass_redirect_checks)
*bypass_redirect_checks = use_proxy;
return use_proxy;
......@@ -1191,7 +1220,7 @@ blink::UserAgentMetadata CefContentBrowserClient::GetUserAgentMetadata() const {
blink::UserAgentMetadata metadata;
metadata.brand = version_info::GetProductName();
metadata.version = version_info::GetVersionNumber();
metadata.full_version = version_info::GetVersionNumber();
metadata.platform = version_info::GetOSType();
// TODO(mkwst): Poke at BuildUserAgentFromProduct to split out these pieces.
......
......@@ -48,6 +48,8 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
service_manager::mojom::ServiceRequest* service_request) override;
bool ShouldUseProcessPerSite(content::BrowserContext* browser_context,
const GURL& effective_url) override;
bool DoesSiteRequireDedicatedProcess(content::BrowserContext* browser_context,
const GURL& effective_site_url) override;
bool IsHandledURL(const GURL& url) override;
void SiteInstanceGotProcess(content::SiteInstance* site_instance) override;
void SiteInstanceDeleting(content::SiteInstance* site_instance) override;
......@@ -147,6 +149,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
content::RenderFrameHost* frame,
int render_process_id,
bool is_navigation,
bool is_download,
const url::Origin& request_initiator,
network::mojom::URLLoaderFactoryRequest* factory_request,
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
......
......@@ -420,21 +420,17 @@ bool CefContext::Initialize(const CefMainArgs& args,
// gets called by some call down the line of service_manager::MainRun.
content::SetUpFieldTrialsAndFeatureList();
if (!main_delegate_->CreateUIThread()) {
return false;
}
initialized_ = true;
// Can't use CEF_POST_TASK here yet, because the TaskRunner is not yet set.
main_delegate_->ui_thread()->task_runner()->PostTask(
FROM_HERE,
base::BindOnce(
if (!main_delegate_->CreateUIThread(base::BindOnce(
[](CefContext* context, base::WaitableEvent* event) {
service_manager::MainRun(*context->sm_main_params_);
event->Signal();
},
base::Unretained(this), base::Unretained(&uithread_startup_event)));
base::Unretained(this),
base::Unretained(&uithread_startup_event)))) {
return false;
}
initialized_ = true;
// We need to wait until service_manager::MainRun has finished.
uithread_startup_event.Wait();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment