Update to Chromium version 70.0.3538.0 (#587811)

Known issues:
- The CefLoadCRLSetsFile function needs to be re-implemented (see issue #2497).
- Linux: GTK2 support has been removed. The cefclient sample needs to be updated
  to use GTK3 (see issue #2014).
This commit is contained in:
Marshall Greenblatt
2018-09-04 11:43:21 +02:00
parent ea0e213bef
commit a64237bcb0
79 changed files with 763 additions and 735 deletions

View File

@ -350,6 +350,8 @@ static_library("libcef_static") {
"libcef/browser/extensions/component_extension_resource_manager.h", "libcef/browser/extensions/component_extension_resource_manager.h",
"libcef/browser/extensions/extensions_api_client.cc", "libcef/browser/extensions/extensions_api_client.cc",
"libcef/browser/extensions/extensions_api_client.h", "libcef/browser/extensions/extensions_api_client.h",
"libcef/browser/extensions/extensions_browser_api_provider.cc",
"libcef/browser/extensions/extensions_browser_api_provider.h",
"libcef/browser/extensions/extensions_browser_client.cc", "libcef/browser/extensions/extensions_browser_client.cc",
"libcef/browser/extensions/extensions_browser_client.h", "libcef/browser/extensions/extensions_browser_client.h",
"libcef/browser/extensions/extension_background_host.cc", "libcef/browser/extensions/extension_background_host.cc",
@ -520,6 +522,8 @@ static_library("libcef_static") {
"libcef/common/drag_data_impl.h", "libcef/common/drag_data_impl.h",
"libcef/common/extensions/chrome_generated_schemas.cc", "libcef/common/extensions/chrome_generated_schemas.cc",
"libcef/common/extensions/chrome_generated_schemas.h", "libcef/common/extensions/chrome_generated_schemas.h",
"libcef/common/extensions/extensions_api_provider.cc",
"libcef/common/extensions/extensions_api_provider.h",
"libcef/common/extensions/extensions_client.cc", "libcef/common/extensions/extensions_client.cc",
"libcef/common/extensions/extensions_client.h", "libcef/common/extensions/extensions_client.h",
"libcef/common/extensions/extensions_util.cc", "libcef/common/extensions/extensions_util.cc",
@ -673,6 +677,7 @@ static_library("libcef_static") {
"//components/printing/browser", "//components/printing/browser",
"//components/printing/common", "//components/printing/common",
"//components/printing/renderer", "//components/printing/renderer",
"//components/safe_browsing/db:test_database_manager",
"//components/services/pdf_compositor:pdf_compositor_manifest", "//components/services/pdf_compositor:pdf_compositor_manifest",
"//components/services/pdf_compositor/public/cpp:utils", "//components/services/pdf_compositor/public/cpp:utils",
"//components/services/pdf_compositor/public/interfaces", "//components/services/pdf_compositor/public/interfaces",
@ -696,9 +701,10 @@ static_library("libcef_static") {
"//crypto", "//crypto",
"//device/base", "//device/base",
"//extensions/browser", "//extensions/browser",
"//extensions/browser/api:api_registration", "//extensions/browser:core_api_provider",
"//extensions/buildflags", "//extensions/buildflags",
"//extensions/common/api", "//extensions/common/api",
"//extensions/common:core_api_provider",
"//extensions/renderer", "//extensions/renderer",
"//gpu", "//gpu",
"//ipc", "//ipc",
@ -766,6 +772,7 @@ static_library("libcef_static") {
] ]
deps += [ deps += [
"//chrome/install_static:secondary_module",
"//chrome_elf", "//chrome_elf",
] ]

View File

@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{ {
'chromium_checkout': 'refs/tags/70.0.3516.0', 'chromium_checkout': 'refs/tags/70.0.3538.0',
} }

View File

@ -519,7 +519,7 @@ HostContentSettingsMap* CefBrowserContextImpl::GetHostContentSettingsMap() {
// that can be stored in the settings map (for example, default values set // that can be stored in the settings map (for example, default values set
// via DefaultProvider::SetWebsiteSetting). // via DefaultProvider::SetWebsiteSetting).
host_content_settings_map_ = host_content_settings_map_ =
new HostContentSettingsMap(GetPrefs(), false, false, false); new HostContentSettingsMap(GetPrefs(), false, false, false, false);
// Change the default plugin policy. // Change the default plugin policy.
const base::CommandLine* command_line = const base::CommandLine* command_line =

View File

@ -749,7 +749,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
CefDevToolsFrontend* devtools_frontend_; CefDevToolsFrontend* devtools_frontend_;
// Observers that want to be notified of changes to this object. // Observers that want to be notified of changes to this object.
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
// Used to provide unique incremental IDs for each find request. // Used to provide unique incremental IDs for each find request.
int find_request_id_counter_ = 0; int find_request_id_counter_ = 0;

View File

@ -222,16 +222,16 @@ void CefBrowserMainParts::PostMainMessageLoopRun() {
DCHECK(global_request_context_->HasOneRef()); DCHECK(global_request_context_->HasOneRef());
global_request_context_ = NULL; global_request_context_ = NULL;
if (extensions::ExtensionsEnabled()) {
extensions::ExtensionsBrowserClient::Set(NULL);
extensions_browser_client_.reset();
}
for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
chrome_extra_parts_[i]->PostMainMessageLoopRun(); chrome_extra_parts_[i]->PostMainMessageLoopRun();
} }
void CefBrowserMainParts::PostDestroyThreads() { void CefBrowserMainParts::PostDestroyThreads() {
if (extensions::ExtensionsEnabled()) {
extensions::ExtensionsBrowserClient::Set(NULL);
extensions_browser_client_.reset();
}
#if defined(USE_AURA) #if defined(USE_AURA)
// Delete the DesktopTestViewsDelegate. // Delete the DesktopTestViewsDelegate.
delete views::ViewsDelegate::GetInstance(); delete views::ViewsDelegate::GetInstance();

View File

@ -111,12 +111,6 @@ ChromeBrowserProcessStub::system_network_context_manager() {
return NULL; return NULL;
} }
network::NetworkConnectionTracker*
ChromeBrowserProcessStub::network_connection_tracker() {
NOTREACHED();
return NULL;
}
network::NetworkQualityTracker* network::NetworkQualityTracker*
ChromeBrowserProcessStub::network_quality_tracker() { ChromeBrowserProcessStub::network_quality_tracker() {
NOTREACHED(); NOTREACHED();

View File

@ -49,7 +49,6 @@ class ChromeBrowserProcessStub : public BrowserProcess,
rappor::RapporServiceImpl* rappor_service() override; rappor::RapporServiceImpl* rappor_service() override;
IOThread* io_thread() override; IOThread* io_thread() override;
SystemNetworkContextManager* system_network_context_manager() override; SystemNetworkContextManager* system_network_context_manager() override;
network::NetworkConnectionTracker* network_connection_tracker() override;
network::NetworkQualityTracker* network_quality_tracker() override; network::NetworkQualityTracker* network_quality_tracker() override;
WatchDogThread* watchdog_thread() override; WatchDogThread* watchdog_thread() override;
ProfileManager* profile_manager() override; ProfileManager* profile_manager() override;

View File

@ -772,6 +772,17 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
} }
} }
bool CefContentBrowserClient::ShouldEnableStrictSiteIsolation() {
// TODO(cef): Enable this mode once we figure out why it breaks ceftests that
// rely on command-line arguments passed to the renderer process. It looks
// like the first renderer process is getting all of the callbacks despite
// multiple renderer processes being launched.
// For example, V8RendererTest::OnBrowserCreated appears to get the same
// kV8TestCmdArg value twice when running with:
// --gtest_filter=V8Test.ContextEvalCspBypassUnsafeEval:V8Test.ContextEntered
return false;
}
std::string CefContentBrowserClient::GetApplicationLocale() { std::string CefContentBrowserClient::GetApplicationLocale() {
return g_browser_process->GetApplicationLocale(); return g_browser_process->GetApplicationLocale();
} }
@ -1074,16 +1085,16 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory(
content::BrowserContext* browser_context, content::BrowserContext* browser_context,
content::RenderFrameHost* frame, content::RenderFrameHost* frame,
bool is_navigation, bool is_navigation,
network::mojom::URLLoaderFactoryRequest* factory_request, const GURL& url,
scoped_refptr<content::RedirectChecker>* redirect_checker) { network::mojom::URLLoaderFactoryRequest* factory_request) {
if (!extensions::ExtensionsEnabled()) if (!extensions::ExtensionsEnabled())
return false; return false;
auto* web_request_api = auto* web_request_api =
extensions::BrowserContextKeyedAPIFactory<extensions::WebRequestAPI>::Get( extensions::BrowserContextKeyedAPIFactory<extensions::WebRequestAPI>::Get(
browser_context); browser_context);
return web_request_api->MaybeProxyURLLoaderFactory( return web_request_api->MaybeProxyURLLoaderFactory(frame, is_navigation,
frame, is_navigation, factory_request, redirect_checker); factory_request);
} }
bool CefContentBrowserClient::HandleExternalProtocol( bool CefContentBrowserClient::HandleExternalProtocol(

View File

@ -62,6 +62,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
content::BrowserContext* context2) override; content::BrowserContext* context2) override;
void AppendExtraCommandLineSwitches(base::CommandLine* command_line, void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
int child_process_id) override; int child_process_id) override;
bool ShouldEnableStrictSiteIsolation() override;
std::string GetApplicationLocale() override; std::string GetApplicationLocale() override;
content::QuotaPermissionContext* CreateQuotaPermissionContext() override; content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
void GetQuotaSettings( void GetQuotaSettings(
@ -141,8 +142,8 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
content::BrowserContext* browser_context, content::BrowserContext* browser_context,
content::RenderFrameHost* frame, content::RenderFrameHost* frame,
bool is_navigation, bool is_navigation,
network::mojom::URLLoaderFactoryRequest* factory_request, const GURL& url,
scoped_refptr<content::RedirectChecker>* redirect_checker) override; network::mojom::URLLoaderFactoryRequest* factory_request) override;
bool HandleExternalProtocol( bool HandleExternalProtocol(
const GURL& url, const GURL& url,

View File

@ -33,6 +33,7 @@
#if defined(OS_WIN) #if defined(OS_WIN)
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chrome/install_static/initialize_from_primary_module.h"
#include "chrome_elf/chrome_elf_main.h" #include "chrome_elf/chrome_elf_main.h"
#include "components/crash/content/app/crashpad.h" #include "components/crash/content/app/crashpad.h"
#include "content/public/app/sandbox_helper_win.h" #include "content/public/app/sandbox_helper_win.h"
@ -71,6 +72,16 @@ void DisableFMA3() {
} }
#endif // defined(ARCH_CPU_X86_64) #endif // defined(ARCH_CPU_X86_64)
// Transfer state from chrome_elf.dll to the libcef.dll. Accessed when
// loading chrome://system.
void InitInstallDetails() {
static bool initialized = false;
if (initialized)
return;
initialized = true;
install_static::InitializeFromPrimaryModule();
}
// Signal chrome_elf to initialize crash reporting, rather than doing it in // Signal chrome_elf to initialize crash reporting, rather than doing it in
// DllMain. See https://crbug.com/656800 for details. // DllMain. See https://crbug.com/656800 for details.
void InitCrashReporter() { void InitCrashReporter() {
@ -156,6 +167,7 @@ int CefExecuteProcess(const CefMainArgs& args,
#if defined(ARCH_CPU_X86_64) #if defined(ARCH_CPU_X86_64)
DisableFMA3(); DisableFMA3();
#endif #endif
InitInstallDetails();
InitCrashReporter(); InitCrashReporter();
#endif #endif
@ -215,6 +227,7 @@ bool CefInitialize(const CefMainArgs& args,
#if defined(ARCH_CPU_X86_64) #if defined(ARCH_CPU_X86_64)
DisableFMA3(); DisableFMA3();
#endif #endif
InitInstallDetails();
InitCrashReporter(); InitCrashReporter();
#endif #endif

View File

@ -19,6 +19,8 @@
#include "base/format_macros.h" #include "base/format_macros.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
#include "components/net_log/chrome_net_log.h"
#include "content/browser/storage_partition_impl.h" #include "content/browser/storage_partition_impl.h"
#include "net/cookies/cookie_util.h" #include "net/cookies/cookie_util.h"
#include "net/cookies/parsed_cookie.h" #include "net/cookies/parsed_cookie.h"
@ -307,7 +309,7 @@ bool CefCookieManagerImpl::SetStoragePath(
// facilitate unit test expectations. This task runner MUST be // facilitate unit test expectations. This task runner MUST be
// configured with BLOCK_SHUTDOWN. // configured with BLOCK_SHUTDOWN.
CefContentBrowserClient::Get()->background_task_runner(), CefContentBrowserClient::Get()->background_task_runner(),
persist_session_cookies, NULL); persist_session_cookies, nullptr);
} else { } else {
NOTREACHED() << "The cookie storage directory could not be created"; NOTREACHED() << "The cookie storage directory could not be created";
storage_path_.clear(); storage_path_.clear();
@ -317,7 +319,8 @@ bool CefCookieManagerImpl::SetStoragePath(
// Set the new cookie store that will be used for all new requests. The old // Set the new cookie store that will be used for all new requests. The old
// cookie store, if any, will be automatically flushed and closed when no // cookie store, if any, will be automatically flushed and closed when no
// longer referenced. // longer referenced.
cookie_store_.reset(new net::CookieMonster(persistent_store.get(), NULL)); cookie_store_.reset(new net::CookieMonster(persistent_store.get(), nullptr,
g_browser_process->net_log()));
if (persistent_store.get() && persist_session_cookies) if (persistent_store.get() && persist_session_cookies)
cookie_store_->SetPersistSessionCookies(true); cookie_store_->SetPersistSessionCookies(true);
storage_path_ = new_path; storage_path_ = new_path;

View File

@ -62,4 +62,16 @@ ExtensionHostQueue* CefExtensionHostDelegate::GetExtensionHostQueue() const {
return CefExtensionsBrowserClient::Get()->GetExtensionHostQueue(); return CefExtensionsBrowserClient::Get()->GetExtensionHostQueue();
} }
gfx::Size CefExtensionHostDelegate::EnterPictureInPicture(
content::WebContents* web_contents,
const viz::SurfaceId& surface_id,
const gfx::Size& natural_size) {
NOTREACHED();
return gfx::Size();
}
void CefExtensionHostDelegate::ExitPictureInPicture() {
NOTREACHED();
}
} // namespace extensions } // namespace extensions

View File

@ -35,6 +35,10 @@ class CefExtensionHostDelegate : public ExtensionHostDelegate {
content::MediaStreamType type, content::MediaStreamType type,
const Extension* extension) override; const Extension* extension) override;
ExtensionHostQueue* GetExtensionHostQueue() const override; ExtensionHostQueue* GetExtensionHostQueue() const override;
gfx::Size EnterPictureInPicture(content::WebContents* web_contents,
const viz::SurfaceId& surface_id,
const gfx::Size& natural_size) override;
void ExitPictureInPicture() override;
private: private:
DISALLOW_COPY_AND_ASSIGN(CefExtensionHostDelegate); DISALLOW_COPY_AND_ASSIGN(CefExtensionHostDelegate);

View File

@ -38,7 +38,8 @@ class CefExtensionWebContentsObserver
// Our content script observers. Declare at top so that it will outlive all // Our content script observers. Declare at top so that it will outlive all
// other members, since they might add themselves as observers. // other members, since they might add themselves as observers.
base::ObserverList<ScriptExecutionObserver> script_execution_observers_; base::ObserverList<ScriptExecutionObserver>::Unchecked
script_execution_observers_;
std::unique_ptr<ScriptExecutor> script_executor_; std::unique_ptr<ScriptExecutor> script_executor_;

View File

@ -0,0 +1,29 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "libcef/browser/extensions/chrome_api_registration.h"
#include "libcef/browser/extensions/extensions_browser_api_provider.h"
//#include "cef/libcef/browser/extensions/api/generated_api_registration.h"
#include "extensions/browser/api/generated_api_registration.h"
namespace extensions {
CefExtensionsBrowserAPIProvider::CefExtensionsBrowserAPIProvider() =
default;
CefExtensionsBrowserAPIProvider::~CefExtensionsBrowserAPIProvider() =
default;
void CefExtensionsBrowserAPIProvider::RegisterExtensionFunctions(
ExtensionFunctionRegistry* registry) {
// CEF-only APIs.
// TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
// libcef/common/extensions/api/README.txt for details.
// api::cef::CefGeneratedFunctionRegistry::RegisterAll(registry);
// Chrome APIs whitelisted by CEF.
api::cef::ChromeFunctionRegistry::RegisterAll(registry);
}
} // namespace extensions

View File

@ -0,0 +1,26 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_BROWSER_API_PROVIDER_H_
#define CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_BROWSER_API_PROVIDER_H_
#include "base/macros.h"
#include "extensions/browser/extensions_browser_api_provider.h"
namespace extensions {
class CefExtensionsBrowserAPIProvider : public ExtensionsBrowserAPIProvider {
public:
CefExtensionsBrowserAPIProvider();
~CefExtensionsBrowserAPIProvider() override;
void RegisterExtensionFunctions(ExtensionFunctionRegistry* registry) override;
private:
DISALLOW_COPY_AND_ASSIGN(CefExtensionsBrowserAPIProvider);
};
} // namespace extensions
#endif // CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_BROWSER_API_PROVIDER_H_

View File

@ -9,15 +9,14 @@
#include "libcef/browser/browser_context_impl.h" #include "libcef/browser/browser_context_impl.h"
#include "libcef/browser/browser_host_impl.h" #include "libcef/browser/browser_host_impl.h"
#include "libcef/browser/extensions/chrome_api_registration.h"
#include "libcef/browser/extensions/component_extension_resource_manager.h" #include "libcef/browser/extensions/component_extension_resource_manager.h"
#include "libcef/browser/extensions/extension_system.h" #include "libcef/browser/extensions/extension_system.h"
#include "libcef/browser/extensions/extension_system_factory.h" #include "libcef/browser/extensions/extension_system_factory.h"
#include "libcef/browser/extensions/extension_web_contents_observer.h" #include "libcef/browser/extensions/extension_web_contents_observer.h"
#include "libcef/browser/extensions/extensions_api_client.h" #include "libcef/browser/extensions/extensions_api_client.h"
#include "libcef/browser/extensions/extensions_browser_api_provider.h"
#include "libcef/browser/request_context_impl.h" #include "libcef/browser/request_context_impl.h"
//#include "cef/libcef/browser/extensions/api/generated_api_registration.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_url_request_util.h" #include "chrome/browser/extensions/chrome_url_request_util.h"
#include "chrome/browser/extensions/event_router_forwarder.h" #include "chrome/browser/extensions/event_router_forwarder.h"
@ -25,11 +24,10 @@
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_frame_host.h"
#include "extensions/browser/api/extensions_api_client.h" #include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/api/generated_api_registration.h"
#include "extensions/browser/api/runtime/runtime_api_delegate.h" #include "extensions/browser/api/runtime/runtime_api_delegate.h"
#include "extensions/browser/app_sorting.h" #include "extensions/browser/app_sorting.h"
#include "extensions/browser/core_extensions_browser_api_provider.h"
#include "extensions/browser/event_router.h" #include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function_registry.h"
#include "extensions/browser/extension_host_delegate.h" #include "extensions/browser/extension_host_delegate.h"
#include "extensions/browser/mojo/interface_registration.h" #include "extensions/browser/mojo/interface_registration.h"
#include "extensions/browser/serial_extension_host_queue.h" #include "extensions/browser/serial_extension_host_queue.h"
@ -43,7 +41,10 @@ namespace extensions {
CefExtensionsBrowserClient::CefExtensionsBrowserClient() CefExtensionsBrowserClient::CefExtensionsBrowserClient()
: api_client_(new CefExtensionsAPIClient), : api_client_(new CefExtensionsAPIClient),
resource_manager_(new CefComponentExtensionResourceManager) {} resource_manager_(new CefComponentExtensionResourceManager) {
AddAPIProvider(std::make_unique<CoreExtensionsBrowserAPIProvider>());
AddAPIProvider(std::make_unique<CefExtensionsBrowserAPIProvider>());
}
CefExtensionsBrowserClient::~CefExtensionsBrowserClient() {} CefExtensionsBrowserClient::~CefExtensionsBrowserClient() {}
@ -276,20 +277,6 @@ CefExtensionsBrowserClient::GetExtensionSystemFactory() {
return CefExtensionSystemFactory::GetInstance(); return CefExtensionSystemFactory::GetInstance();
} }
void CefExtensionsBrowserClient::RegisterExtensionFunctions(
ExtensionFunctionRegistry* registry) const {
// Register core extension-system APIs.
api::GeneratedFunctionRegistry::RegisterAll(registry);
// CEF-only APIs.
// TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
// libcef/common/extensions/api/README.txt for details.
// api::cef::CefGeneratedFunctionRegistry::RegisterAll(registry);
// Chrome APIs whitelisted by CEF.
api::cef::ChromeFunctionRegistry::RegisterAll(registry);
}
void CefExtensionsBrowserClient::RegisterExtensionInterfaces( void CefExtensionsBrowserClient::RegisterExtensionInterfaces(
service_manager::BinderRegistryWithArgs<content::RenderFrameHost*>* service_manager::BinderRegistryWithArgs<content::RenderFrameHost*>*
registry, registry,

View File

@ -89,8 +89,6 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
bool IsAppModeForcedForApp(const ExtensionId& extension_id) override; bool IsAppModeForcedForApp(const ExtensionId& extension_id) override;
bool IsLoggedInAsPublicAccount() override; bool IsLoggedInAsPublicAccount() override;
ExtensionSystemProvider* GetExtensionSystemFactory() override; ExtensionSystemProvider* GetExtensionSystemFactory() override;
void RegisterExtensionFunctions(
ExtensionFunctionRegistry* registry) const override;
void RegisterExtensionInterfaces(service_manager::BinderRegistryWithArgs< void RegisterExtensionInterfaces(service_manager::BinderRegistryWithArgs<
content::RenderFrameHost*>* registry, content::RenderFrameHost*>* registry,
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,

View File

@ -140,7 +140,7 @@ class CefNativeMenuWin : public MenuWrapper {
MenuAction menu_action_; MenuAction menu_action_;
// A list of listeners to call when the menu opens. // A list of listeners to call when the menu opens.
base::ObserverList<MenuListener> listeners_; base::ObserverList<MenuListener>::Unchecked listeners_;
// Keep track of whether the listeners have already been called at least // Keep track of whether the listeners have already been called at least
// once. // once.

View File

@ -19,7 +19,7 @@ namespace {
void SetCRLSetIfNewer(scoped_refptr<net::CRLSet> crl_set) { void SetCRLSetIfNewer(scoped_refptr<net::CRLSet> crl_set) {
CEF_REQUIRE_IOT(); CEF_REQUIRE_IOT();
net::SSLConfigService::SetCRLSetIfNewer(crl_set); // TODO(cef): Re-implement via NetworkService.
} }
void LoadFromDisk(const base::FilePath& path) { void LoadFromDisk(const base::FilePath& path) {

View File

@ -445,10 +445,7 @@ net::NetworkDelegate::AuthRequiredResponse CefNetworkDelegate::OnAuthRequired(
} }
bool CefNetworkDelegate::OnCanGetCookies(const net::URLRequest& request, bool CefNetworkDelegate::OnCanGetCookies(const net::URLRequest& request,
const net::CookieList& cookie_list, const net::CookieList& cookie_list) {
bool allowed_from_caller) {
if (!allowed_from_caller)
return false;
if (net_util::IsInternalRequest(&request)) if (net_util::IsInternalRequest(&request))
return true; return true;
@ -475,10 +472,7 @@ bool CefNetworkDelegate::OnCanGetCookies(const net::URLRequest& request,
bool CefNetworkDelegate::OnCanSetCookie(const net::URLRequest& request, bool CefNetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
const net::CanonicalCookie& cookie, const net::CanonicalCookie& cookie,
net::CookieOptions* options, net::CookieOptions* options) {
bool allowed_from_caller) {
if (!allowed_from_caller)
return false;
if (net_util::IsInternalRequest(&request)) if (net_util::IsInternalRequest(&request))
return true; return true;

View File

@ -41,12 +41,10 @@ class CefNetworkDelegate : public net::NetworkDelegateImpl {
bool started, bool started,
int net_error) override; int net_error) override;
bool OnCanGetCookies(const net::URLRequest& request, bool OnCanGetCookies(const net::URLRequest& request,
const net::CookieList& cookie_list, const net::CookieList& cookie_list) override;
bool allowed_from_caller) override;
bool OnCanSetCookie(const net::URLRequest& request, bool OnCanSetCookie(const net::URLRequest& request,
const net::CanonicalCookie& cookie, const net::CanonicalCookie& cookie,
net::CookieOptions* options, net::CookieOptions* options) override;
bool allowed_from_caller) override;
bool OnCanAccessFile(const net::URLRequest& request, bool OnCanAccessFile(const net::URLRequest& request,
const base::FilePath& original_path, const base::FilePath& original_path,
const base::FilePath& absolute_path) const override; const base::FilePath& absolute_path) const override;

View File

@ -503,8 +503,8 @@ void CefURLRequestContextGetterImpl::SetCookieStoragePath(
// Set the new cookie store that will be used for all new requests. The old // Set the new cookie store that will be used for all new requests. The old
// cookie store, if any, will be automatically flushed and closed when no // cookie store, if any, will be automatically flushed and closed when no
// longer referenced. // longer referenced.
std::unique_ptr<net::CookieMonster> cookie_monster( std::unique_ptr<net::CookieMonster> cookie_monster(new net::CookieMonster(
new net::CookieMonster(persistent_store.get(), NULL)); persistent_store.get(), nullptr, io_state_->net_log_));
if (persistent_store.get() && persist_session_cookies) if (persistent_store.get() && persist_session_cookies)
cookie_monster->SetPersistSessionCookies(true); cookie_monster->SetPersistSessionCookies(true);
io_state_->cookie_store_path_ = path; io_state_->cookie_store_path_ = path;

View File

@ -245,7 +245,6 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
// Matching the attributes from BrowserCompositorMac. // Matching the attributes from BrowserCompositorMac.
delegated_frame_host_ = std::make_unique<content::DelegatedFrameHost>( delegated_frame_host_ = std::make_unique<content::DelegatedFrameHost>(
AllocateFrameSinkId(is_guest_view_hack), this, AllocateFrameSinkId(is_guest_view_hack), this,
base::FeatureList::IsEnabled(features::kVizDisplayCompositor),
true /* should_register_frame_sink_id */); true /* should_register_frame_sink_id */);
root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
@ -291,7 +290,7 @@ CefRenderWidgetHostViewOSR::~CefRenderWidgetHostViewOSR() {
// necessary to remove all connections to its old ui::Compositor. // necessary to remove all connections to its old ui::Compositor.
if (is_showing_) if (is_showing_)
delegated_frame_host_->WasHidden(); delegated_frame_host_->WasHidden();
delegated_frame_host_->ResetCompositor(); delegated_frame_host_->DetachFromCompositor();
#endif #endif
PlatformDestroyCompositorWidget(); PlatformDestroyCompositorWidget();
@ -362,7 +361,7 @@ void CefRenderWidgetHostViewOSR::Show() {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
browser_compositor_->SetRenderWidgetHostIsHidden(false); browser_compositor_->SetRenderWidgetHostIsHidden(false);
#else #else
delegated_frame_host_->SetCompositor(compositor_.get()); delegated_frame_host_->AttachToCompositor(compositor_.get());
delegated_frame_host_->WasShown(GetLocalSurfaceId(), delegated_frame_host_->WasShown(GetLocalSurfaceId(),
GetRootLayer()->bounds().size(), false); GetRootLayer()->bounds().size(), false);
#endif #endif
@ -387,7 +386,7 @@ void CefRenderWidgetHostViewOSR::Hide() {
browser_compositor_->SetRenderWidgetHostIsHidden(true); browser_compositor_->SetRenderWidgetHostIsHidden(true);
#else #else
GetDelegatedFrameHost()->WasHidden(); GetDelegatedFrameHost()->WasHidden();
GetDelegatedFrameHost()->ResetCompositor(); GetDelegatedFrameHost()->DetachFromCompositor();
#endif #endif
is_showing_ = false; is_showing_ = false;
@ -536,6 +535,10 @@ void CefRenderWidgetHostViewOSR::ClearCompositorFrame() {
GetDelegatedFrameHost()->ClearDelegatedFrame(); GetDelegatedFrameHost()->ClearDelegatedFrame();
} }
void CefRenderWidgetHostViewOSR::ResetFallbackToFirstNavigationSurface() {
GetDelegatedFrameHost()->ResetFallbackToFirstNavigationSurface();
}
void CefRenderWidgetHostViewOSR::InitAsPopup( void CefRenderWidgetHostViewOSR::InitAsPopup(
content::RenderWidgetHostView* parent_host_view, content::RenderWidgetHostView* parent_host_view,
const gfx::Rect& pos) { const gfx::Rect& pos) {
@ -907,11 +910,7 @@ bool CefRenderWidgetHostViewOSR::TransformPointToCoordSpaceForView(
return true; return true;
} }
// In TransformPointToLocalCoordSpace() there is a Point-to-Pixel conversion, return false;
// but it is not necessary here because the final target view is responsible
// for converting before computing the final transform.
return GetDelegatedFrameHost()->TransformPointToCoordSpaceForView(
point, target_view, transformed_point, source);
} }
void CefRenderWidgetHostViewOSR::DidNavigate() { void CefRenderWidgetHostViewOSR::DidNavigate() {
@ -974,10 +973,6 @@ void CefRenderWidgetHostViewOSR::OnFrameTokenChanged(uint32_t frame_token) {
render_widget_host_->DidProcessFrame(frame_token); render_widget_host_->DidProcessFrame(frame_token);
} }
void CefRenderWidgetHostViewOSR::DidReceiveFirstFrameAfterNavigation() {
render_widget_host_->DidReceiveFirstFrameAfterNavigation();
}
#endif // !defined(OS_MACOSX) #endif // !defined(OS_MACOSX)
bool CefRenderWidgetHostViewOSR::InstallTransparency() { bool CefRenderWidgetHostViewOSR::InstallTransparency() {

View File

@ -34,6 +34,11 @@
#include "ui/gfx/win/window_impl.h" #include "ui/gfx/win/window_impl.h"
#endif #endif
#if defined(USE_AURA)
#include "third_party/blink/public/platform/web_cursor_info.h"
#include "ui/base/cursor/cursor.h"
#endif
namespace content { namespace content {
class RenderWidgetHost; class RenderWidgetHost;
class RenderWidgetHostImpl; class RenderWidgetHostImpl;
@ -135,6 +140,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
viz::CompositorFrame frame, viz::CompositorFrame frame,
base::Optional<viz::HitTestRegionList> hit_test_region_list) override; base::Optional<viz::HitTestRegionList> hit_test_region_list) override;
void ClearCompositorFrame() override; void ClearCompositorFrame() override;
void ResetFallbackToFirstNavigationSurface() override;
void InitAsPopup(content::RenderWidgetHostView* parent_host_view, void InitAsPopup(content::RenderWidgetHostView* parent_host_view,
const gfx::Rect& pos) override; const gfx::Rect& pos) override;
void InitAsFullscreen( void InitAsFullscreen(
@ -202,7 +208,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
void OnFirstSurfaceActivation(const viz::SurfaceInfo& surface_info) override; void OnFirstSurfaceActivation(const viz::SurfaceInfo& surface_info) override;
void OnBeginFrame(base::TimeTicks frame_time) override; void OnBeginFrame(base::TimeTicks frame_time) override;
void OnFrameTokenChanged(uint32_t frame_token) override; void OnFrameTokenChanged(uint32_t frame_token) override;
void DidReceiveFirstFrameAfterNavigation() override;
#endif // !defined(OS_MACOSX) #endif // !defined(OS_MACOSX)
bool InstallTransparency(); bool InstallTransparency();

View File

@ -15,6 +15,7 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/view_messages.h" #include "content/common/view_messages.h"
#include "ui/accelerated_widget_mac/accelerated_widget_mac.h" #include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
#include "ui/display/screen.h" #include "ui/display/screen.h"
@ -44,10 +45,6 @@ class MacHelper : public content::BrowserCompositorMacClient,
view_->render_widget_host()->DidProcessFrame(frame_token); view_->render_widget_host()->DidProcessFrame(frame_token);
} }
void DidReceiveFirstFrameAfterNavigation() override {
view_->render_widget_host()->DidReceiveFirstFrameAfterNavigation();
}
void DestroyCompositorForShutdown() override {} void DestroyCompositorForShutdown() override {}
bool SynchronizeVisualProperties( bool SynchronizeVisualProperties(

View File

@ -111,7 +111,7 @@ class CefPrefStore : public PersistentPrefStore {
bool committed_; bool committed_;
std::unique_ptr<ReadErrorDelegate> error_delegate_; std::unique_ptr<ReadErrorDelegate> error_delegate_;
base::ObserverList<PrefStore::Observer, true> observers_; base::ObserverList<PrefStore::Observer, true>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(CefPrefStore); DISALLOW_COPY_AND_ASSIGN(CefPrefStore);
}; };

View File

@ -20,7 +20,7 @@
#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h" #include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "printing/pdf_metafile_skia.h" #include "printing/metafile_skia.h"
#include "libcef/browser/thread_util.h" #include "libcef/browser/thread_util.h"
@ -148,7 +148,7 @@ void SavePdfFile(scoped_refptr<base::RefCountedBytes> data,
CEF_REQUIRE_BLOCKING(); CEF_REQUIRE_BLOCKING();
DCHECK_GT(data->size(), 0U); DCHECK_GT(data->size(), 0U);
PdfMetafileSkia metafile; MetafileSkia metafile;
metafile.InitFromData(static_cast<const void*>(data->front()), data->size()); metafile.InitFromData(static_cast<const void*>(data->front()), data->size());
base::File file(path, base::File file(path,

View File

@ -44,7 +44,7 @@
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "mojo/public/cpp/system/buffer.h" #include "mojo/public/cpp/system/buffer.h"
#include "printing/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h"
#include "printing/pdf_metafile_skia.h" #include "printing/metafile_skia.h"
#include "printing/print_settings.h" #include "printing/print_settings.h"
#include "printing/printed_document.h" #include "printing/printed_document.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
@ -98,8 +98,7 @@ void CefPrintViewManagerBase::PrintDocument(
print_job_->StartConversionToNativeFormat(print_data, page_size, content_area, print_job_->StartConversionToNativeFormat(print_data, page_size, content_area,
offsets); offsets);
#else #else
std::unique_ptr<PdfMetafileSkia> metafile = std::unique_ptr<MetafileSkia> metafile = std::make_unique<MetafileSkia>();
std::make_unique<PdfMetafileSkia>();
CHECK(metafile->InitFromData(print_data->front(), print_data->size())); CHECK(metafile->InitFromData(print_data->front(), print_data->size()));
// Update the rendered document. It will send notifications to the listener. // Update the rendered document. It will send notifications to the listener.
@ -183,8 +182,7 @@ void CefPrintViewManagerBase::OnDidPrintDocument(
auto* client = PrintCompositeClient::FromWebContents(web_contents()); auto* client = PrintCompositeClient::FromWebContents(web_contents());
if (IsOopifEnabled() && print_job_->document()->settings().is_modifiable()) { if (IsOopifEnabled() && print_job_->document()->settings().is_modifiable()) {
client->DoCompositeDocumentToPdf( client->DoCompositeDocumentToPdf(
params.document_cookie, render_frame_host, content.metafile_data_handle, params.document_cookie, render_frame_host, content,
content.data_size, content.subframe_content_info,
base::BindOnce(&CefPrintViewManagerBase::OnComposePdfDone, base::BindOnce(&CefPrintViewManagerBase::OnComposePdfDone,
weak_ptr_factory_.GetWeakPtr(), params)); weak_ptr_factory_.GetWeakPtr(), params));
return; return;

View File

@ -18,20 +18,18 @@ import("//tools/json_schema_compiler/json_features.gni")
#schema_include_rules = "//cef/libcef/browser/extensions/api:extensions::api::cef::%(namespace)s" #schema_include_rules = "//cef/libcef/browser/extensions/api:extensions::api::cef::%(namespace)s"
#schema_dependencies = [ "//extensions/common/api" ] #schema_dependencies = [ "//extensions/common/api" ]
# #
#json_schema_api("api") { #generated_json_strings("api") {
# sources = schema_sources # sources = schema_sources
# schemas = true # schemas = true
# bundle = true
# configs = [ "//build/config:precompiled_headers" ] # configs = [ "//build/config:precompiled_headers" ]
# bundle_name = "Cef" # bundle_name = "Cef"
# #
# deps = schema_dependencies # deps = schema_dependencies
#} #}
# #
#json_schema_api("api_registration") { #function_registration("api_registration") {
# sources = schema_sources # sources = schema_sources
# impl_dir = "//cef/libcef/browser/extensions/api" # impl_dir = "//cef/libcef/browser/extensions/api"
# bundle_registration = true
# configs = [ "//build/config:precompiled_headers" ] # configs = [ "//build/config:precompiled_headers" ]
# bundle_name = "Cef" # bundle_name = "Cef"
# #

View File

@ -0,0 +1,89 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "libcef/common/extensions/extensions_api_provider.h"
#include "libcef/common/extensions/chrome_generated_schemas.h"
#include "cef/grit/cef_resources.h"
//#include "cef/libcef/common/extensions/api/generated_schemas.h"
#include "cef/libcef/common/extensions/api/cef_api_features.h"
#include "cef/libcef/common/extensions/api/cef_manifest_features.h"
#include "cef/libcef/common/extensions/api/cef_permission_features.h"
#include "chrome/common/extensions/chrome_aliases.h"
#include "chrome/common/extensions/chrome_manifest_handlers.h"
#include "extensions/common/features/json_feature_provider_source.h"
#include "extensions/common/permissions/permissions_info.h"
namespace extensions {
CefExtensionsAPIProvider::CefExtensionsAPIProvider() {
}
void CefExtensionsAPIProvider::AddAPIFeatures(FeatureProvider* provider) {
AddCEFAPIFeatures(provider);
}
void CefExtensionsAPIProvider::AddManifestFeatures(
FeatureProvider* provider) {
AddCEFManifestFeatures(provider);
}
void CefExtensionsAPIProvider::AddPermissionFeatures(
FeatureProvider* provider) {
AddCEFPermissionFeatures(provider);
}
void CefExtensionsAPIProvider::AddBehaviorFeatures(
FeatureProvider* provider) {
// No CEF-specific behavior features.
}
void CefExtensionsAPIProvider::AddAPIJSONSources(
JSONFeatureProviderSource* json_source) {
// Extension API features specific to CEF. See
// libcef/common/extensions/api/README.txt for additional details.
json_source->LoadJSON(IDR_CEF_EXTENSION_API_FEATURES);
}
bool CefExtensionsAPIProvider::IsAPISchemaGenerated(const std::string& name) {
// Schema for CEF-only APIs.
// TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
// libcef/common/extensions/api/README.txt for details.
// if (api::cef::CefGeneratedSchemas::IsGenerated(name))
// return true;
// Chrome APIs whitelisted by CEF.
if (api::cef::ChromeGeneratedSchemas::IsGenerated(name))
return true;
return false;
}
base::StringPiece CefExtensionsAPIProvider::GetAPISchema(
const std::string& name) {
// Schema for CEF-only APIs.
// TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
// libcef/common/extensions/api/README.txt for details.
// if (api::cef::CefGeneratedSchemas::IsGenerated(name))
// return api::cef::CefGeneratedSchemas::Get(name);
// Chrome APIs whitelisted by CEF.
if (api::cef::ChromeGeneratedSchemas::IsGenerated(name))
return api::cef::ChromeGeneratedSchemas::Get(name);
return base::StringPiece();
}
void CefExtensionsAPIProvider::AddPermissionsProviders(
PermissionsInfo* permissions_info) {
permissions_info->AddProvider(chrome_api_permissions_,
GetChromePermissionAliases());
}
void CefExtensionsAPIProvider::RegisterManifestHandlers() {
RegisterChromeManifestHandlers();
}
} // namespace extensions

View File

@ -0,0 +1,37 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CEF_LIBCEF_COMMON_EXTENSIONS_EXTENSIONS_API_PROVIDER_H_
#define CEF_LIBCEF_COMMON_EXTENSIONS_EXTENSIONS_API_PROVIDER_H_
#include "base/macros.h"
#include "chrome/common/extensions/permissions/chrome_api_permissions.h"
#include "extensions/common/extensions_api_provider.h"
namespace extensions {
class CefExtensionsAPIProvider : public ExtensionsAPIProvider {
public:
CefExtensionsAPIProvider();
// ExtensionsAPIProvider:
void AddAPIFeatures(FeatureProvider* provider) override;
void AddManifestFeatures(FeatureProvider* provider) override;
void AddPermissionFeatures(FeatureProvider* provider) override;
void AddBehaviorFeatures(FeatureProvider* provider) override;
void AddAPIJSONSources(JSONFeatureProviderSource* json_source) override;
bool IsAPISchemaGenerated(const std::string& name) override;
base::StringPiece GetAPISchema(const std::string& name) override;
void AddPermissionsProviders(PermissionsInfo* permissions_info) override;
void RegisterManifestHandlers() override;
private:
const ChromeAPIPermissions chrome_api_permissions_;
DISALLOW_COPY_AND_ASSIGN(CefExtensionsAPIProvider);
};
} // namespace extensions
#endif // CEF_LIBCEF_COMMON_EXTENSIONS_EXTENSIONS_API_PROVIDER_H_

View File

@ -8,34 +8,15 @@
#include <utility> #include <utility>
#include "libcef/common/cef_switches.h" #include "libcef/common/cef_switches.h"
#include "libcef/common/extensions/chrome_generated_schemas.h" #include "libcef/common/extensions/extensions_api_provider.h"
#include "base/logging.h" #include "base/logging.h"
#include "cef/grit/cef_resources.h" #include "extensions/common/core_extensions_api_provider.h"
//#include "cef/libcef/common/extensions/api/generated_schemas.h"
#include "cef/libcef/common/extensions/api/cef_api_features.h"
#include "cef/libcef/common/extensions/api/cef_manifest_features.h"
#include "cef/libcef/common/extensions/api/cef_permission_features.h"
#include "chrome/common/extensions/chrome_aliases.h"
#include "chrome/common/extensions/chrome_manifest_handlers.h"
#include "chrome/grit/common_resources.h"
#include "extensions/common/api/api_features.h"
#include "extensions/common/api/behavior_features.h"
#include "extensions/common/api/generated_schemas.h"
#include "extensions/common/api/manifest_features.h"
#include "extensions/common/api/permission_features.h"
#include "extensions/common/common_manifest_handlers.h"
#include "extensions/common/extension_urls.h" #include "extensions/common/extension_urls.h"
#include "extensions/common/extensions_aliases.h"
#include "extensions/common/features/feature_provider.h"
#include "extensions/common/features/json_feature_provider_source.h"
#include "extensions/common/features/simple_feature.h" #include "extensions/common/features/simple_feature.h"
#include "extensions/common/manifest_handler.h"
#include "extensions/common/permissions/permission_message_provider.h" #include "extensions/common/permissions/permission_message_provider.h"
#include "extensions/common/permissions/permissions_info.h"
#include "extensions/common/permissions/permissions_provider.h" #include "extensions/common/permissions/permissions_provider.h"
#include "extensions/common/url_pattern_set.h" #include "extensions/common/url_pattern_set.h"
#include "extensions/grit/extensions_resources.h"
namespace extensions { namespace extensions {
@ -50,22 +31,14 @@ SimpleFeature* CreateFeature() {
CefExtensionsClient::CefExtensionsClient() CefExtensionsClient::CefExtensionsClient()
: webstore_base_url_(extension_urls::kChromeWebstoreBaseURL), : webstore_base_url_(extension_urls::kChromeWebstoreBaseURL),
webstore_update_url_(extension_urls::kChromeWebstoreUpdateURL) {} webstore_update_url_(extension_urls::kChromeWebstoreUpdateURL) {
AddAPIProvider(std::make_unique<CoreExtensionsAPIProvider>());
AddAPIProvider(std::make_unique<CefExtensionsAPIProvider>());
}
CefExtensionsClient::~CefExtensionsClient() {} CefExtensionsClient::~CefExtensionsClient() {}
void CefExtensionsClient::Initialize() { void CefExtensionsClient::Initialize() {}
RegisterCommonManifestHandlers();
RegisterChromeManifestHandlers();
ManifestHandler::FinalizeRegistration();
// TODO(jamescook): Do we need to whitelist any extensions?
// Set up permissions.
PermissionsInfo::GetInstance()->AddProvider(chrome_api_permissions_,
GetChromePermissionAliases());
PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_,
GetExtensionsPermissionAliases());
}
void CefExtensionsClient::InitializeWebStoreUrls( void CefExtensionsClient::InitializeWebStoreUrls(
base::CommandLine* command_line) {} base::CommandLine* command_line) {}
@ -79,40 +52,6 @@ const std::string CefExtensionsClient::GetProductName() {
return "cef"; return "cef";
} }
std::unique_ptr<FeatureProvider> CefExtensionsClient::CreateFeatureProvider(
const std::string& name) const {
auto provider = std::make_unique<FeatureProvider>();
if (name == "api") {
AddCoreAPIFeatures(provider.get());
AddCEFAPIFeatures(provider.get());
} else if (name == "manifest") {
AddCoreManifestFeatures(provider.get());
AddCEFManifestFeatures(provider.get());
} else if (name == "permission") {
AddCorePermissionFeatures(provider.get());
AddCEFPermissionFeatures(provider.get());
} else if (name == "behavior") {
// Note: There are no CEF-specific behavior features.
AddCoreBehaviorFeatures(provider.get());
} else {
NOTREACHED();
}
return provider;
}
std::unique_ptr<JSONFeatureProviderSource>
CefExtensionsClient::CreateAPIFeatureSource() const {
std::unique_ptr<JSONFeatureProviderSource> source(
new JSONFeatureProviderSource("api"));
source->LoadJSON(IDR_EXTENSION_API_FEATURES);
// Extension API features specific to CEF. See
// libcef/common/extensions/api/README.txt for additional details.
source->LoadJSON(IDR_CEF_EXTENSION_API_FEATURES);
return source;
}
void CefExtensionsClient::FilterHostPermissions( void CefExtensionsClient::FilterHostPermissions(
const URLPatternSet& hosts, const URLPatternSet& hosts,
URLPatternSet* new_hosts, URLPatternSet* new_hosts,
@ -142,40 +81,6 @@ bool CefExtensionsClient::IsScriptableURL(const GURL& url,
return true; return true;
} }
bool CefExtensionsClient::IsAPISchemaGenerated(const std::string& name) const {
// Schema for CEF-only APIs.
// TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
// libcef/common/extensions/api/README.txt for details.
// if (api::cef::CefGeneratedSchemas::IsGenerated(name))
// return true;
// Chrome APIs whitelisted by CEF.
if (api::cef::ChromeGeneratedSchemas::IsGenerated(name))
return true;
// Core extensions APIs.
if (api::GeneratedSchemas::IsGenerated(name))
return true;
return false;
}
base::StringPiece CefExtensionsClient::GetAPISchema(
const std::string& name) const {
// Schema for CEF-only APIs.
// TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
// libcef/common/extensions/api/README.txt for details.
// if (api::cef::CefGeneratedSchemas::IsGenerated(name))
// return api::cef::CefGeneratedSchemas::Get(name);
// Chrome APIs whitelisted by CEF.
if (api::cef::ChromeGeneratedSchemas::IsGenerated(name))
return api::cef::ChromeGeneratedSchemas::Get(name);
// Core extensions APIs.
return api::GeneratedSchemas::Get(name);
}
bool CefExtensionsClient::ShouldSuppressFatalErrors() const { bool CefExtensionsClient::ShouldSuppressFatalErrors() const {
return true; return true;
} }

View File

@ -8,10 +8,8 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/macros.h" #include "base/macros.h"
#include "chrome/common/extensions/permissions/chrome_api_permissions.h"
#include "chrome/common/extensions/permissions/chrome_permission_message_provider.h" #include "chrome/common/extensions/permissions/chrome_permission_message_provider.h"
#include "extensions/common/extensions_client.h" #include "extensions/common/extensions_client.h"
#include "extensions/common/permissions/extensions_api_permissions.h"
#include "url/gurl.h" #include "url/gurl.h"
namespace extensions { namespace extensions {
@ -28,10 +26,6 @@ class CefExtensionsClient : public ExtensionsClient {
const PermissionMessageProvider& GetPermissionMessageProvider() const PermissionMessageProvider& GetPermissionMessageProvider()
const override; const override;
const std::string GetProductName() override; const std::string GetProductName() override;
std::unique_ptr<FeatureProvider> CreateFeatureProvider(
const std::string& name) const override;
std::unique_ptr<JSONFeatureProviderSource> CreateAPIFeatureSource()
const override;
void FilterHostPermissions(const URLPatternSet& hosts, void FilterHostPermissions(const URLPatternSet& hosts,
URLPatternSet* new_hosts, URLPatternSet* new_hosts,
PermissionIDSet* permissions) const override; PermissionIDSet* permissions) const override;
@ -41,8 +35,6 @@ class CefExtensionsClient : public ExtensionsClient {
const Extension* extension, const Extension* extension,
const APIPermissionSet& api_permissions) const override; const APIPermissionSet& api_permissions) const override;
bool IsScriptableURL(const GURL& url, std::string* error) const override; bool IsScriptableURL(const GURL& url, std::string* error) const override;
bool IsAPISchemaGenerated(const std::string& name) const override;
base::StringPiece GetAPISchema(const std::string& name) const override;
bool ShouldSuppressFatalErrors() const override; bool ShouldSuppressFatalErrors() const override;
void RecordDidSuppressFatalError() override; void RecordDidSuppressFatalError() override;
const GURL& GetWebstoreBaseURL() const override; const GURL& GetWebstoreBaseURL() const override;
@ -50,8 +42,6 @@ class CefExtensionsClient : public ExtensionsClient {
bool IsBlacklistUpdateURL(const GURL& url) const override; bool IsBlacklistUpdateURL(const GURL& url) const override;
private: private:
const ChromeAPIPermissions chrome_api_permissions_;
const ExtensionsAPIPermissions extensions_api_permissions_;
const ChromePermissionMessageProvider permission_message_provider_; const ChromePermissionMessageProvider permission_message_provider_;
ScriptingWhitelist scripting_whitelist_; ScriptingWhitelist scripting_whitelist_;

View File

@ -272,7 +272,7 @@ void CefContentRendererClient::WebKitInitialized() {
const Cef_CrossOriginWhiteListEntry_Params& entry = const Cef_CrossOriginWhiteListEntry_Params& entry =
cross_origin_whitelist_entries_[i]; cross_origin_whitelist_entries_[i];
GURL gurl = GURL(entry.source_origin); GURL gurl = GURL(entry.source_origin);
blink::WebSecurityPolicy::AddOriginAccessWhitelistEntry( blink::WebSecurityPolicy::AddOriginAccessAllowListEntry(
gurl, blink::WebString::FromUTF8(entry.target_protocol), gurl, blink::WebString::FromUTF8(entry.target_protocol),
blink::WebString::FromUTF8(entry.target_domain), blink::WebString::FromUTF8(entry.target_domain),
entry.allow_target_subdomains); entry.allow_target_subdomains);
@ -492,8 +492,7 @@ bool CefContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
const GURL& url, const GURL& url,
const std::string& http_method, const std::string& http_method,
bool is_initial_navigation, bool is_initial_navigation,
bool is_server_redirect, bool is_server_redirect) {
bool* send_referrer) {
DCHECK(!frame->Parent()); DCHECK(!frame->Parent());
// For now, we skip the rest for POST submissions. This is because // For now, we skip the rest for POST submissions. This is because
@ -505,7 +504,7 @@ bool CefContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
if (extensions::ExtensionsEnabled()) { if (extensions::ExtensionsEnabled()) {
return extensions::CefExtensionsRendererClient::ShouldFork( return extensions::CefExtensionsRendererClient::ShouldFork(
frame, url, is_initial_navigation, is_server_redirect, send_referrer); frame, url, is_initial_navigation, is_server_redirect);
} }
return false; return false;

View File

@ -112,8 +112,7 @@ class CefContentRendererClient : public content::ContentRendererClient,
const GURL& url, const GURL& url,
const std::string& http_method, const std::string& http_method,
bool is_initial_navigation, bool is_initial_navigation,
bool is_server_redirect, bool is_server_redirect) override;
bool* send_referrer) override;
void WillSendRequest(blink::WebLocalFrame* frame, void WillSendRequest(blink::WebLocalFrame* frame,
ui::PageTransition transition_type, ui::PageTransition transition_type,
const blink::WebURL& url, const blink::WebURL& url,

View File

@ -226,8 +226,7 @@ bool CefExtensionsRendererClient::IsStandaloneExtensionProcess() {
bool CefExtensionsRendererClient::ShouldFork(blink::WebLocalFrame* frame, bool CefExtensionsRendererClient::ShouldFork(blink::WebLocalFrame* frame,
const GURL& url, const GURL& url,
bool is_initial_navigation, bool is_initial_navigation,
bool is_server_redirect, bool is_server_redirect) {
bool* send_referrer) {
const extensions::RendererExtensionRegistry* extension_registry = const extensions::RendererExtensionRegistry* extension_registry =
extensions::RendererExtensionRegistry::Get(); extensions::RendererExtensionRegistry::Get();
@ -246,10 +245,6 @@ bool CefExtensionsRendererClient::ShouldFork(blink::WebLocalFrame* frame,
if (!is_server_redirect && if (!is_server_redirect &&
CrossesExtensionExtents(frame, url, is_extension_url, CrossesExtensionExtents(frame, url, is_extension_url,
is_initial_navigation)) { is_initial_navigation)) {
// Include the referrer in this case since we're going from a hosted web
// page. (the packaged case is handled previously by the extension
// navigation test)
*send_referrer = true;
return true; return true;
} }

View File

@ -72,8 +72,7 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient {
static bool ShouldFork(blink::WebLocalFrame* frame, static bool ShouldFork(blink::WebLocalFrame* frame,
const GURL& url, const GURL& url,
bool is_initial_navigation, bool is_initial_navigation,
bool is_server_redirect, bool is_server_redirect);
bool* send_referrer);
static content::BrowserPluginDelegate* CreateBrowserPluginDelegate( static content::BrowserPluginDelegate* CreateBrowserPluginDelegate(
content::RenderFrame* render_frame, content::RenderFrame* render_frame,
const content::WebPluginInfo& info, const content::WebPluginInfo& info,

View File

@ -51,9 +51,8 @@ bool CefPrintRenderFrameHelperDelegate::OverridePrint(
if (!frame->GetDocument().IsPluginDocument()) if (!frame->GetDocument().IsPluginDocument())
return false; return false;
std::vector<extensions::MimeHandlerViewContainer*> mime_handlers = auto mime_handlers = extensions::MimeHandlerViewContainer::FromRenderFrame(
extensions::MimeHandlerViewContainer::FromRenderFrame( content::RenderFrame::FromWebFrame(frame));
content::RenderFrame::FromWebFrame(frame));
if (!mime_handlers.empty()) { if (!mime_handlers.empty()) {
// This message is handled in chrome/browser/resources/pdf/pdf.js and // This message is handled in chrome/browser/resources/pdf/pdf.js and
// instructs the PDF plugin to print. This is to make window.print() on a // instructs the PDF plugin to print. This is to make window.print() on a

View File

@ -7,6 +7,7 @@
#include "libcef/common/cef_messages.h" #include "libcef/common/cef_messages.h"
#include "libcef/common/net/net_resource_provider.h" #include "libcef/common/net/net_resource_provider.h"
#include "libcef/renderer/blink_glue.h"
#include "libcef/renderer/content_renderer_client.h" #include "libcef/renderer/content_renderer_client.h"
#include "components/visitedlink/renderer/visitedlink_slave.h" #include "components/visitedlink/renderer/visitedlink_slave.h"
@ -64,18 +65,15 @@ void CefRenderThreadObserver::OnModifyCrossOriginWhitelistEntry(
const Cef_CrossOriginWhiteListEntry_Params& params) { const Cef_CrossOriginWhiteListEntry_Params& params) {
GURL gurl = GURL(params.source_origin); GURL gurl = GURL(params.source_origin);
if (add) { if (add) {
blink::WebSecurityPolicy::AddOriginAccessWhitelistEntry( blink::WebSecurityPolicy::AddOriginAccessAllowListEntry(
gurl, blink::WebString::FromUTF8(params.target_protocol), gurl, blink::WebString::FromUTF8(params.target_protocol),
blink::WebString::FromUTF8(params.target_domain), blink::WebString::FromUTF8(params.target_domain),
params.allow_target_subdomains); params.allow_target_subdomains);
} else { } else {
blink::WebSecurityPolicy::RemoveOriginAccessWhitelistEntry( blink::WebSecurityPolicy::ClearOriginAccessAllowListForOrigin(gurl);
gurl, blink::WebString::FromUTF8(params.target_protocol),
blink::WebString::FromUTF8(params.target_domain),
params.allow_target_subdomains);
} }
} }
void CefRenderThreadObserver::OnClearCrossOriginWhitelist() { void CefRenderThreadObserver::OnClearCrossOriginWhitelist() {
blink::WebSecurityPolicy::ResetOriginAccessWhitelists(); blink::WebSecurityPolicy::ClearOriginAccessAllowList();
} }

View File

@ -476,7 +476,9 @@ void v8impl_string_dtor(char* str) {
#endif #endif
// Convert a v8::String to CefString. // Convert a v8::String to CefString.
void GetCefString(v8::Local<v8::String> str, CefString& out) { void GetCefString(v8::Isolate* isolate,
v8::Local<v8::String> str,
CefString& out) {
if (str.IsEmpty()) if (str.IsEmpty())
return; return;
@ -486,7 +488,7 @@ void GetCefString(v8::Local<v8::String> str, CefString& out) {
if (len == 0) if (len == 0)
return; return;
char* buf = new char[len + 1]; char* buf = new char[len + 1];
str->WriteUtf8(buf, len + 1); str->WriteUtf8(isolate, buf, len + 1);
// Perform conversion to the wide type. // Perform conversion to the wide type.
cef_string_t* retws = out.GetWritableStruct(); cef_string_t* retws = out.GetWritableStruct();
@ -499,14 +501,14 @@ void GetCefString(v8::Local<v8::String> str, CefString& out) {
if (len == 0) if (len == 0)
return; return;
char16* buf = new char16[len + 1]; char16* buf = new char16[len + 1];
str->Write(reinterpret_cast<uint16_t*>(buf), 0, len + 1); str->Write(isolate, reinterpret_cast<uint16_t*>(buf), 0, len + 1);
#else #else
// Allocate enough space for a worst-case conversion. // Allocate enough space for a worst-case conversion.
int len = str->Utf8Length(); int len = str->Utf8Length();
if (len == 0) if (len == 0)
return; return;
char* buf = new char[len + 1]; char* buf = new char[len + 1];
str->WriteUtf8(buf, len + 1); str->WriteUtf8(isolate, buf, len + 1);
#endif #endif
// Don't perform an extra string copy. // Don't perform an extra string copy.
@ -575,7 +577,7 @@ void AccessorNameGetterCallbackImpl(
CefRefPtr<CefV8Value> retval; CefRefPtr<CefV8Value> retval;
CefRefPtr<CefV8Value> object = new CefV8ValueImpl(isolate, context, obj); CefRefPtr<CefV8Value> object = new CefV8ValueImpl(isolate, context, obj);
CefString name, exception; CefString name, exception;
GetCefString(v8::Local<v8::String>::Cast(property), name); GetCefString(isolate, v8::Local<v8::String>::Cast(property), name);
if (accessorPtr->Get(name, object, retval, exception)) { if (accessorPtr->Get(name, object, retval, exception)) {
if (!exception.empty()) { if (!exception.empty()) {
info.GetReturnValue().Set(isolate->ThrowException( info.GetReturnValue().Set(isolate->ThrowException(
@ -614,7 +616,7 @@ void AccessorNameSetterCallbackImpl(
CefRefPtr<CefV8Value> cefValue = CefRefPtr<CefV8Value> cefValue =
new CefV8ValueImpl(isolate, context, value); new CefV8ValueImpl(isolate, context, value);
CefString name, exception; CefString name, exception;
GetCefString(v8::Local<v8::String>::Cast(property), name); GetCefString(isolate, v8::Local<v8::String>::Cast(property), name);
accessorPtr->Set(name, object, cefValue, exception); accessorPtr->Set(name, object, cefValue, exception);
if (!exception.empty()) { if (!exception.empty()) {
isolate->ThrowException( isolate->ThrowException(
@ -625,13 +627,13 @@ void AccessorNameSetterCallbackImpl(
} }
// Two helper functions for V8 Interceptor callbacks. // Two helper functions for V8 Interceptor callbacks.
CefString PropertyToIndex(v8::Local<v8::Name> property) { CefString PropertyToIndex(v8::Isolate* isolate, v8::Local<v8::Name> property) {
CefString name; CefString name;
GetCefString(property.As<v8::String>(), name); GetCefString(isolate, property.As<v8::String>(), name);
return name; return name;
} }
int PropertyToIndex(uint32_t index) { int PropertyToIndex(v8::Isolate* isolate, uint32_t index) {
return static_cast<int>(index); return static_cast<int>(index);
} }
@ -657,7 +659,8 @@ void InterceptorGetterCallbackImpl(
CefRefPtr<CefV8Value> object = new CefV8ValueImpl(isolate, context, obj); CefRefPtr<CefV8Value> object = new CefV8ValueImpl(isolate, context, obj);
CefRefPtr<CefV8Value> retval; CefRefPtr<CefV8Value> retval;
CefString exception; CefString exception;
interceptorPtr->Get(PropertyToIndex(property), object, retval, exception); interceptorPtr->Get(PropertyToIndex(isolate, property), object, retval,
exception);
if (!exception.empty()) { if (!exception.empty()) {
info.GetReturnValue().Set(isolate->ThrowException( info.GetReturnValue().Set(isolate->ThrowException(
v8::Exception::Error(GetV8String(isolate, exception)))); v8::Exception::Error(GetV8String(isolate, exception))));
@ -688,7 +691,8 @@ void InterceptorSetterCallbackImpl(
CefRefPtr<CefV8Value> object = new CefV8ValueImpl(isolate, context, obj); CefRefPtr<CefV8Value> object = new CefV8ValueImpl(isolate, context, obj);
CefRefPtr<CefV8Value> cefValue = new CefV8ValueImpl(isolate, context, value); CefRefPtr<CefV8Value> cefValue = new CefV8ValueImpl(isolate, context, value);
CefString exception; CefString exception;
interceptorPtr->Set(PropertyToIndex(property), object, cefValue, exception); interceptorPtr->Set(PropertyToIndex(isolate, property), object, cefValue,
exception);
if (!exception.empty()) { if (!exception.empty()) {
isolate->ThrowException( isolate->ThrowException(
v8::Exception::Error(GetV8String(isolate, exception))); v8::Exception::Error(GetV8String(isolate, exception)));
@ -711,7 +715,7 @@ class ExtensionWrapper : public v8::Extension {
return v8::Local<v8::FunctionTemplate>(); return v8::Local<v8::FunctionTemplate>();
CefString func_name; CefString func_name;
GetCefString(name, func_name); GetCefString(isolate, name, func_name);
v8::Local<v8::External> function_data = v8::Local<v8::External> function_data =
V8FunctionData::Create(isolate, func_name, handler_); V8FunctionData::Create(isolate, func_name, handler_);
@ -736,13 +740,18 @@ class CefV8ExceptionImpl : public CefV8Exception {
if (message.IsEmpty()) if (message.IsEmpty())
return; return;
GetCefString(message->Get(), message_); v8::Isolate* isolate = context->GetIsolate();
GetCefString(isolate, message->Get(), message_);
v8::MaybeLocal<v8::String> source_line = message->GetSourceLine(context); v8::MaybeLocal<v8::String> source_line = message->GetSourceLine(context);
if (!source_line.IsEmpty()) if (!source_line.IsEmpty())
GetCefString(source_line.ToLocalChecked(), source_line_); GetCefString(isolate, source_line.ToLocalChecked(), source_line_);
if (!message->GetScriptResourceName().IsEmpty()) if (!message->GetScriptResourceName().IsEmpty()) {
GetCefString(message->GetScriptResourceName()->ToString(), script_); GetCefString(
isolate,
message->GetScriptResourceName()->ToString(context).ToLocalChecked(),
script_);
}
v8::Maybe<int> line_number = message->GetLineNumber(context); v8::Maybe<int> line_number = message->GetLineNumber(context);
if (!line_number.IsNothing()) if (!line_number.IsNothing())
@ -1506,7 +1515,8 @@ void CefV8ValueImpl::InitFromV8Value(v8::Local<v8::Context> context,
CefTime(value->ToNumber(context).ToLocalChecked()->Value() / 1000)); CefTime(value->ToNumber(context).ToLocalChecked()->Value() / 1000));
} else if (value->IsString()) { } else if (value->IsString()) {
CefString rv; CefString rv;
GetCefString(value->ToString(), rv); GetCefString(context->GetIsolate(),
value->ToString(context).ToLocalChecked(), rv);
InitString(rv); InitString(rv);
} else if (value->IsObject()) { } else if (value->IsObject()) {
InitObject(value, NULL); InitObject(value, NULL);
@ -1785,7 +1795,7 @@ bool CefV8ValueImpl::IsUserCreated() {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
return (tracker != NULL); return (tracker != NULL);
@ -1836,7 +1846,7 @@ bool CefV8ValueImpl::HasValue(const CefString& key) {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
return obj->Has(context, GetV8String(isolate, key)).FromJust(); return obj->Has(context, GetV8String(isolate, key)).FromJust();
} }
@ -1858,7 +1868,7 @@ bool CefV8ValueImpl::HasValue(int index) {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
return obj->Has(context, index).FromJust(); return obj->Has(context, index).FromJust();
} }
@ -1875,7 +1885,7 @@ bool CefV8ValueImpl::DeleteValue(const CefString& key) {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
v8::TryCatch try_catch(isolate); v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true); try_catch.SetVerbose(true);
@ -1901,7 +1911,7 @@ bool CefV8ValueImpl::DeleteValue(int index) {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
v8::TryCatch try_catch(isolate); v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true); try_catch.SetVerbose(true);
@ -1922,7 +1932,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(const CefString& key) {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
v8::TryCatch try_catch(isolate); v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true); try_catch.SetVerbose(true);
@ -1950,7 +1960,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(int index) {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
v8::TryCatch try_catch(isolate); v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true); try_catch.SetVerbose(true);
@ -1977,7 +1987,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key,
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
v8::TryCatch try_catch(isolate); v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true); try_catch.SetVerbose(true);
@ -2021,7 +2031,7 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr<CefV8Value> value) {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
v8::TryCatch try_catch(isolate); v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true); try_catch.SetVerbose(true);
@ -2048,7 +2058,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key,
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
CefRefPtr<CefV8Accessor> accessorPtr; CefRefPtr<CefV8Accessor> accessorPtr;
@ -2080,15 +2090,22 @@ bool CefV8ValueImpl::GetKeys(std::vector<CefString>& keys) {
v8::Isolate* isolate = handle_->isolate(); v8::Isolate* isolate = handle_->isolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
return false;
}
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
v8::Local<v8::Array> arr_keys = obj->GetPropertyNames(); v8::Local<v8::Array> arr_keys = obj->GetPropertyNames();
uint32_t len = arr_keys->Length(); uint32_t len = arr_keys->Length();
for (uint32_t i = 0; i < len; ++i) { for (uint32_t i = 0; i < len; ++i) {
v8::Local<v8::Value> value = arr_keys->Get(v8::Integer::New(isolate, i)); v8::Local<v8::Value> value = arr_keys->Get(v8::Integer::New(isolate, i));
CefString str; CefString str;
GetCefString(value->ToString(), str); GetCefString(isolate, value->ToString(context).ToLocalChecked(), str);
keys.push_back(str); keys.push_back(str);
} }
return true; return true;
@ -2107,7 +2124,7 @@ bool CefV8ValueImpl::SetUserData(CefRefPtr<CefBaseRefCounted> user_data) {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
if (tracker) { if (tracker) {
@ -2131,7 +2148,7 @@ CefRefPtr<CefBaseRefCounted> CefV8ValueImpl::GetUserData() {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
if (tracker) if (tracker)
@ -2153,7 +2170,7 @@ int CefV8ValueImpl::GetExternallyAllocatedMemory() {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
if (tracker) if (tracker)
@ -2175,7 +2192,7 @@ int CefV8ValueImpl::AdjustExternallyAllocatedMemory(int change_in_bytes) {
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
if (tracker) if (tracker)
@ -2187,14 +2204,22 @@ int CefV8ValueImpl::AdjustExternallyAllocatedMemory(int change_in_bytes) {
int CefV8ValueImpl::GetArrayLength() { int CefV8ValueImpl::GetArrayLength() {
CEF_V8_REQUIRE_OBJECT_RETURN(0); CEF_V8_REQUIRE_OBJECT_RETURN(0);
v8::HandleScope handle_scope(handle_->isolate()); v8::Isolate* isolate = handle_->isolate();
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
return 0;
}
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsArray()) { if (!value->IsArray()) {
NOTREACHED() << "V8 value is not an array"; NOTREACHED() << "V8 value is not an array";
return 0; return 0;
} }
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
v8::Local<v8::Array> arr = v8::Local<v8::Array>::Cast(obj); v8::Local<v8::Array> arr = v8::Local<v8::Array>::Cast(obj);
return arr->Length(); return arr->Length();
} }
@ -2205,18 +2230,20 @@ CefV8ValueImpl::GetArrayBufferReleaseCallback() {
v8::Isolate* isolate = handle_->isolate(); v8::Isolate* isolate = handle_->isolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext(); v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) { if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context"; NOTREACHED() << "not currently in a V8 context";
return NULL; return NULL;
} }
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsArrayBuffer()) { if (!value->IsArrayBuffer()) {
NOTREACHED() << "V8 value is not an array buffer"; NOTREACHED() << "V8 value is not an array buffer";
return NULL; return NULL;
} }
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
V8TrackArrayBuffer* tracker = V8TrackArrayBuffer::Unwrap(context, obj); V8TrackArrayBuffer* tracker = V8TrackArrayBuffer::Unwrap(context, obj);
if (tracker) if (tracker)
@ -2230,6 +2257,7 @@ bool CefV8ValueImpl::NeuterArrayBuffer() {
v8::Isolate* isolate = handle_->isolate(); v8::Isolate* isolate = handle_->isolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext(); v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) { if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context"; NOTREACHED() << "not currently in a V8 context";
@ -2241,7 +2269,7 @@ bool CefV8ValueImpl::NeuterArrayBuffer() {
NOTREACHED() << "V8 value is not an array buffer"; NOTREACHED() << "V8 value is not an array buffer";
return false; return false;
} }
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
v8::Local<v8::ArrayBuffer> arr = v8::Local<v8::ArrayBuffer>::Cast(obj); v8::Local<v8::ArrayBuffer> arr = v8::Local<v8::ArrayBuffer>::Cast(obj);
if (!arr->IsNeuterable()) { if (!arr->IsNeuterable()) {
return false; return false;
@ -2257,16 +2285,25 @@ CefString CefV8ValueImpl::GetFunctionName() {
CefString rv; CefString rv;
CEF_V8_REQUIRE_OBJECT_RETURN(rv); CEF_V8_REQUIRE_OBJECT_RETURN(rv);
v8::HandleScope handle_scope(handle_->isolate()); v8::Isolate* isolate = handle_->isolate();
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
return rv;
}
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false); v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsFunction()) { if (!value->IsFunction()) {
NOTREACHED() << "V8 value is not a function"; NOTREACHED() << "V8 value is not a function";
return rv; return rv;
} }
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(obj); v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(obj);
GetCefString(v8::Handle<v8::String>::Cast(func->GetName()), rv); GetCefString(handle_->isolate(),
v8::Handle<v8::String>::Cast(func->GetName()), rv);
return rv; return rv;
} }
@ -2288,7 +2325,7 @@ CefRefPtr<CefV8Handler> CefV8ValueImpl::GetFunctionHandler() {
return NULL; return NULL;
} }
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
if (tracker) if (tracker)
return tracker->GetHandler(); return tracker->GetHandler();
@ -2348,7 +2385,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
v8::Context::Scope context_scope(context_local); v8::Context::Scope context_scope(context_local);
v8::Local<v8::Object> obj = value->ToObject(); v8::Local<v8::Object> obj = value->ToObject(context_local).ToLocalChecked();
v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(obj); v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(obj);
v8::Local<v8::Object> recv; v8::Local<v8::Object> recv;
@ -2429,7 +2466,7 @@ CefV8StackTraceImpl::CefV8StackTraceImpl(v8::Isolate* isolate,
frames_.reserve(frame_count); frames_.reserve(frame_count);
for (int i = 0; i < frame_count; ++i) for (int i = 0; i < frame_count; ++i)
frames_.push_back( frames_.push_back(
new CefV8StackFrameImpl(isolate, handle->GetFrame(i))); new CefV8StackFrameImpl(isolate, handle->GetFrame(isolate, i)));
} }
} }
} }
@ -2457,9 +2494,10 @@ CefV8StackFrameImpl::CefV8StackFrameImpl(v8::Isolate* isolate,
: line_number_(0), column_(0), is_eval_(false), is_constructor_(false) { : line_number_(0), column_(0), is_eval_(false), is_constructor_(false) {
if (handle.IsEmpty()) if (handle.IsEmpty())
return; return;
GetCefString(handle->GetScriptName(), script_name_); GetCefString(isolate, handle->GetScriptName(), script_name_);
GetCefString(handle->GetScriptNameOrSourceURL(), script_name_or_source_url_); GetCefString(isolate, handle->GetScriptNameOrSourceURL(),
GetCefString(handle->GetFunctionName(), function_name_); script_name_or_source_url_);
GetCefString(isolate, handle->GetFunctionName(), function_name_);
line_number_ = handle->GetLineNumber(); line_number_ = handle->GetLineNumber();
column_ = handle->GetColumn(); column_ = handle->GetColumn();
is_eval_ = handle->IsEval(); is_eval_ = handle->IsEval();

View File

@ -327,11 +327,6 @@ patches = [
# Linux: Fix 32-bit build fails with ld.gold: internal error in # Linux: Fix 32-bit build fails with ld.gold: internal error in
# get_section_contents, at icf.cc:467 # get_section_contents, at icf.cc:467
# https://bitbucket.org/chromiumembedded/cef/issues/2256 # https://bitbucket.org/chromiumembedded/cef/issues/2256
#
# Linux: Fix GTK2 compile errors.
#
# Linux: Fix cfi-icall failure in atk_util_auralinux_gtk2.cc.
# https://bugs.chromium.org/p/chromium/issues/detail?id=863090
'name': 'linux_build', 'name': 'linux_build',
}, },
{ {

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
index 254be13c1953..866b7315b430 100644 index 7dc490ea5607..f67c457385ab 100644
--- content/browser/renderer_host/browser_compositor_view_mac.h --- content/browser/renderer_host/browser_compositor_view_mac.h
+++ content/browser/renderer_host/browser_compositor_view_mac.h +++ content/browser/renderer_host/browser_compositor_view_mac.h
@@ -58,6 +58,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient, @@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
// These will not return nullptr until Destroy is called. // These will not return nullptr until Destroy is called.
DelegatedFrameHost* GetDelegatedFrameHost(); DelegatedFrameHost* GetDelegatedFrameHost();
@ -12,10 +12,10 @@ index 254be13c1953..866b7315b430 100644
// Ensure that the currect compositor frame be cleared (even if it is // Ensure that the currect compositor frame be cleared (even if it is
// potentially visible). // potentially visible).
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 9df94c2b0601..bb546312d22a 100644 index fb23caccdd1d..f29b586631aa 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm --- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm +++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -86,6 +86,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() { @@ -84,6 +84,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
return delegated_frame_host_.get(); return delegated_frame_host_.get();
} }

View File

@ -1,8 +1,8 @@
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
index ca19df7c7fa2..99f7f9c950db 100644 index e5f885ab4bc0..4573329ad26a 100644
--- content/browser/browser_plugin/browser_plugin_guest.cc --- content/browser/browser_plugin/browser_plugin_guest.cc
+++ content/browser/browser_plugin/browser_plugin_guest.cc +++ content/browser/browser_plugin/browser_plugin_guest.cc
@@ -312,8 +312,11 @@ void BrowserPluginGuest::InitInternal( @@ -313,8 +313,11 @@ void BrowserPluginGuest::InitInternal(
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
} }
@ -15,7 +15,7 @@ index ca19df7c7fa2..99f7f9c950db 100644
// Once a BrowserPluginGuest has an embedder WebContents, it's considered to // Once a BrowserPluginGuest has an embedder WebContents, it's considered to
// be attached. // be attached.
@@ -787,10 +790,19 @@ void BrowserPluginGuest::OnWillAttachComplete( @@ -794,10 +797,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) { if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
web_contents_view->CreateViewForWidget( web_contents_view->CreateViewForWidget(
@ -37,10 +37,10 @@ index ca19df7c7fa2..99f7f9c950db 100644
attached_ = true; attached_ = true;
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
index 04922e2a61bf..c4fd3f9a050e 100644 index 26debf62bf01..973b88ff4752 100644
--- content/browser/frame_host/interstitial_page_impl.cc --- content/browser/frame_host/interstitial_page_impl.cc
+++ content/browser/frame_host/interstitial_page_impl.cc +++ content/browser/frame_host/interstitial_page_impl.cc
@@ -619,7 +619,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() { @@ -634,7 +634,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
WebContentsView* wcv = WebContentsView* wcv =
static_cast<WebContentsImpl*>(web_contents())->GetView(); static_cast<WebContentsImpl*>(web_contents())->GetView();
RenderWidgetHostViewBase* view = RenderWidgetHostViewBase* view =
@ -79,10 +79,10 @@ index 41e44d5d658a..047c935d8ca2 100644
// Creates a new View that holds a popup and receives messages for it. // Creates a new View that holds a popup and receives messages for it.
virtual RenderWidgetHostViewBase* CreateViewForPopupWidget( virtual RenderWidgetHostViewBase* CreateViewForPopupWidget(
diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc
index 713b17948ef7..8ec3e045783f 100644 index f3b19570771b..fe1df8339576 100644
--- content/browser/web_contents/web_contents_view_aura.cc --- content/browser/web_contents/web_contents_view_aura.cc
+++ content/browser/web_contents/web_contents_view_aura.cc +++ content/browser/web_contents/web_contents_view_aura.cc
@@ -781,7 +781,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size, @@ -796,7 +796,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
} }
RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
@ -92,7 +92,7 @@ index 713b17948ef7..8ec3e045783f 100644
if (render_widget_host->GetView()) { if (render_widget_host->GetView()) {
// During testing, the view will already be set up in most cases to the // During testing, the view will already be set up in most cases to the
// test view, so we don't want to clobber it with a real one. To verify that // test view, so we don't want to clobber it with a real one. To verify that
@@ -793,6 +794,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( @@ -808,6 +809,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
render_widget_host->GetView()); render_widget_host->GetView());
} }
@ -101,10 +101,10 @@ index 713b17948ef7..8ec3e045783f 100644
g_create_render_widget_host_view g_create_render_widget_host_view
? g_create_render_widget_host_view(render_widget_host, ? g_create_render_widget_host_view(render_widget_host,
diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h
index 058f3e00d6f5..25a3ad4ec991 100644 index 212da86e2539..84336af98e28 100644
--- content/browser/web_contents/web_contents_view_aura.h --- content/browser/web_contents/web_contents_view_aura.h
+++ content/browser/web_contents/web_contents_view_aura.h +++ content/browser/web_contents/web_contents_view_aura.h
@@ -114,7 +114,7 @@ class CONTENT_EXPORT WebContentsViewAura @@ -121,7 +121,7 @@ class CONTENT_EXPORT WebContentsViewAura
gfx::NativeView context) override; gfx::NativeView context) override;
RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHostViewBase* CreateViewForWidget(
RenderWidgetHost* render_widget_host, RenderWidgetHost* render_widget_host,
@ -140,7 +140,7 @@ index e5485f5609c3..589bbb400684 100644
RenderWidgetHost* render_widget_host) override; RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override; void SetPageTitle(const base::string16& title) override;
diff --git content/browser/web_contents/web_contents_view_guest.cc content/browser/web_contents/web_contents_view_guest.cc diff --git content/browser/web_contents/web_contents_view_guest.cc content/browser/web_contents/web_contents_view_guest.cc
index 44c68ed25b66..62026810703a 100644 index 12f6817499ef..b38e086ee04c 100644
--- content/browser/web_contents/web_contents_view_guest.cc --- content/browser/web_contents/web_contents_view_guest.cc
+++ content/browser/web_contents/web_contents_view_guest.cc +++ content/browser/web_contents/web_contents_view_guest.cc
@@ -67,6 +67,8 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const { @@ -67,6 +67,8 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const {
@ -159,7 +159,7 @@ index 44c68ed25b66..62026810703a 100644
+ if (!platform_view_->GetNativeView()) + if (!platform_view_->GetNativeView())
+ return; + return;
#if defined(USE_AURA) #if defined(USE_AURA)
if (features::IsAshInBrowserProcess()) { if (!features::IsUsingWindowService()) {
old_parent_view->GetNativeView()->RemoveChild( old_parent_view->GetNativeView()->RemoveChild(
@@ -132,7 +136,8 @@ void WebContentsViewGuest::CreateView(const gfx::Size& initial_size, @@ -132,7 +136,8 @@ void WebContentsViewGuest::CreateView(const gfx::Size& initial_size,
} }
@ -243,7 +243,7 @@ index 94848b568363..4dea19adb512 100644
g_create_render_widget_host_view g_create_render_widget_host_view
? g_create_render_widget_host_view(render_widget_host, ? g_create_render_widget_host_view(render_widget_host,
diff --git content/public/browser/browser_plugin_guest_delegate.h content/public/browser/browser_plugin_guest_delegate.h diff --git content/public/browser/browser_plugin_guest_delegate.h content/public/browser/browser_plugin_guest_delegate.h
index d05dd5421458..fa13775f0512 100644 index bf2226b53dd7..782a320ab788 100644
--- content/public/browser/browser_plugin_guest_delegate.h --- content/public/browser/browser_plugin_guest_delegate.h
+++ content/public/browser/browser_plugin_guest_delegate.h +++ content/public/browser/browser_plugin_guest_delegate.h
@@ -19,6 +19,7 @@ namespace content { @@ -19,6 +19,7 @@ namespace content {
@ -266,10 +266,10 @@ index d05dd5421458..fa13775f0512 100644
// a BrowserPlugin even when we are using cross process frames for guests. It // a BrowserPlugin even when we are using cross process frames for guests. It
// should be removed after resolving https://crbug.com/642826). // should be removed after resolving https://crbug.com/642826).
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 68d48f12192d..fb713dbda108 100644 index 121f7d573d37..27c6108167ad 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -198,6 +198,8 @@ void MimeHandlerViewGuest::CreateWebContents( @@ -200,6 +200,8 @@ void MimeHandlerViewGuest::CreateWebContents(
WebContents::CreateParams params(browser_context(), WebContents::CreateParams params(browser_context(),
guest_site_instance.get()); guest_site_instance.get());
params.guest_delegate = this; params.guest_delegate = this;
@ -278,7 +278,7 @@ index 68d48f12192d..fb713dbda108 100644
// TODO(erikchen): Fix ownership semantics for guest views. // TODO(erikchen): Fix ownership semantics for guest views.
// https://crbug.com/832879. // https://crbug.com/832879.
std::move(callback).Run( std::move(callback).Run(
@@ -239,6 +241,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { @@ -244,6 +246,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
return true; return true;
} }

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 569af2c9feed..4ac43a30cf8f 100644 index ae76265b33a6..a3b7580d0046 100644
--- chrome/browser/BUILD.gn --- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn
@@ -8,6 +8,7 @@ import("//build/config/features.gni") @@ -8,6 +8,7 @@ import("//build/config/features.gni")
@ -10,7 +10,7 @@ index 569af2c9feed..4ac43a30cf8f 100644
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//components/feature_engagement/features.gni") import("//components/feature_engagement/features.gni")
import("//components/feed/features.gni") import("//components/feed/features.gni")
@@ -1661,6 +1662,7 @@ jumbo_split_static_library("browser") { @@ -1689,6 +1690,7 @@ jumbo_split_static_library("browser") {
"//base:i18n", "//base:i18n",
"//base/allocator:buildflags", "//base/allocator:buildflags",
"//cc", "//cc",
@ -18,7 +18,7 @@ index 569af2c9feed..4ac43a30cf8f 100644
"//chrome:extra_resources", "//chrome:extra_resources",
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
@@ -1932,6 +1934,10 @@ jumbo_split_static_library("browser") { @@ -1963,6 +1965,10 @@ jumbo_split_static_library("browser") {
] ]
} }

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
index eae14e50a894..62da11525b4f 100644 index 9596665e9320..c38584d4a222 100644
--- chrome/browser/content_settings/host_content_settings_map_factory.cc --- chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
@ -36,8 +36,8 @@ index eae14e50a894..62da11525b4f 100644
#endif #endif
} }
@@ -87,10 +98,16 @@ scoped_refptr<RefcountedKeyedService> @@ -88,10 +99,16 @@ scoped_refptr<RefcountedKeyedService>
/*store_last_modified=*/true)); base::FeatureList::IsEnabled(features::kPermissionDelegation)));
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_CEF) +#if BUILDFLAG(ENABLE_CEF)

View File

@ -71,7 +71,7 @@ index e8e76ce5b954..1dd338dd0142 100644
content::BrowserContext* GetBrowserContextRedirectedInIncognito( content::BrowserContext* GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context); content::BrowserContext* context);
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 675efecaaf74..a0e99efb0a26 100644 index acd7501aef4a..b53fe5e32289 100644
--- chrome/browser/profiles/profile_manager.cc --- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc
@@ -382,7 +382,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) @@ -382,7 +382,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@ -84,7 +84,7 @@ index 675efecaaf74..a0e99efb0a26 100644
this)); this));
} }
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
index fc027d61027a..61484ca7e3c5 100644 index 8a62433e9107..5ae35bc2d16a 100644
--- chrome/browser/profiles/profile_manager.h --- chrome/browser/profiles/profile_manager.h
+++ chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h
@@ -93,7 +93,7 @@ class ProfileManager : public content::NotificationObserver, @@ -93,7 +93,7 @@ class ProfileManager : public content::NotificationObserver,
@ -96,7 +96,7 @@ index fc027d61027a..61484ca7e3c5 100644
// Returns total number of profiles available on this machine. // Returns total number of profiles available on this machine.
size_t GetNumberOfProfiles(); size_t GetNumberOfProfiles();
@@ -124,7 +124,7 @@ class ProfileManager : public content::NotificationObserver, @@ -123,7 +123,7 @@ class ProfileManager : public content::NotificationObserver,
// Returns true if the profile pointer is known to point to an existing // Returns true if the profile pointer is known to point to an existing
// profile. // profile.
@ -105,7 +105,7 @@ index fc027d61027a..61484ca7e3c5 100644
// Returns the directory where the first created profile is stored, // Returns the directory where the first created profile is stored,
// relative to the user data directory currently in use. // relative to the user data directory currently in use.
@@ -133,7 +133,7 @@ class ProfileManager : public content::NotificationObserver, @@ -132,7 +132,7 @@ class ProfileManager : public content::NotificationObserver,
// Get the Profile last used (the Profile to which owns the most recently // Get the Profile last used (the Profile to which owns the most recently
// focused window) with this Chrome build. If no signed profile has been // focused window) with this Chrome build. If no signed profile has been
// stored in Local State, hand back the Default profile. // stored in Local State, hand back the Default profile.

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
index 484e07af5a98..0e62e20095c7 100644 index 52d374d1fe4e..1ac12af269c9 100644
--- chrome/browser/plugins/plugin_info_host_impl.cc --- chrome/browser/plugins/plugin_info_host_impl.cc
+++ chrome/browser/plugins/plugin_info_host_impl.cc +++ chrome/browser/plugins/plugin_info_host_impl.cc
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
@ -118,7 +118,7 @@ index 484e07af5a98..0e62e20095c7 100644
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) { if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
*status = chrome::mojom::PluginStatus::kAllowed; *status = chrome::mojom::PluginStatus::kAllowed;
return; return;
@@ -380,16 +412,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin( @@ -379,16 +411,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
return false; return false;
} }
@ -157,10 +157,10 @@ index 484e07af5a98..0e62e20095c7 100644
// If we broke out of the loop, we have found an enabled plugin. // If we broke out of the loop, we have found an enabled plugin.
bool enabled = i < matching_plugins.size(); bool enabled = i < matching_plugins.size();
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index fbf143fd8f32..715b55312e5c 100644 index 78925a9dc0f0..30ef27e50bf7 100644
--- chrome/renderer/chrome_content_renderer_client.cc --- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc
@@ -763,6 +763,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -796,6 +796,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized || if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) && status == chrome::mojom::PluginStatus::kBlocked) &&
@ -168,7 +168,7 @@ index fbf143fd8f32..715b55312e5c 100644
observer->IsPluginTemporarilyAllowed(identifier)) { observer->IsPluginTemporarilyAllowed(identifier)) {
status = chrome::mojom::PluginStatus::kAllowed; status = chrome::mojom::PluginStatus::kAllowed;
} }
@@ -950,7 +951,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -983,7 +984,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface( render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
&plugin_auth_host); &plugin_auth_host);
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -178,7 +178,7 @@ index fbf143fd8f32..715b55312e5c 100644
break; break;
} }
case chrome::mojom::PluginStatus::kBlocked: { case chrome::mojom::PluginStatus::kBlocked: {
@@ -959,7 +961,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -992,7 +994,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading(); placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -188,7 +188,7 @@ index fbf143fd8f32..715b55312e5c 100644
break; break;
} }
case chrome::mojom::PluginStatus::kBlockedByPolicy: { case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -969,7 +972,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1002,7 +1005,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name)); group_name));
RenderThread::Get()->RecordAction( RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy")); UserMetricsAction("Plugin_BlockedByPolicy"));
@ -198,7 +198,7 @@ index fbf143fd8f32..715b55312e5c 100644
break; break;
} }
case chrome::mojom::PluginStatus::kBlockedNoLoading: { case chrome::mojom::PluginStatus::kBlockedNoLoading: {
@@ -977,7 +981,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1010,7 +1014,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML, IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
group_name)); group_name));

View File

@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index c8c0126c0aca..6f3297649abe 100644 index bf218a3f098a..520119b1485e 100644
--- chrome/renderer/BUILD.gn --- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
@ -10,7 +10,7 @@ index c8c0126c0aca..6f3297649abe 100644
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//components/nacl/features.gni") import("//components/nacl/features.gni")
import("//components/offline_pages/buildflags/features.gni") import("//components/offline_pages/buildflags/features.gni")
@@ -116,6 +117,7 @@ jumbo_static_library("renderer") { @@ -119,6 +120,7 @@ jumbo_static_library("renderer") {
defines = [] defines = []
deps = [ deps = [
@ -18,7 +18,7 @@ index c8c0126c0aca..6f3297649abe 100644
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
"//chrome/common", "//chrome/common",
@@ -179,6 +181,10 @@ jumbo_static_library("renderer") { @@ -182,6 +184,10 @@ jumbo_static_library("renderer") {
configs += [ "//build/config/compiler:wexit_time_destructors" ] configs += [ "//build/config/compiler:wexit_time_destructors" ]

View File

@ -1,8 +1,8 @@
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
index f98d01cf4cad..07ba6768ae72 100644 index 47eea6d5c75b..40de62691f31 100644
--- chrome/common/chrome_content_client.cc --- chrome/common/chrome_content_client.cc
+++ chrome/common/chrome_content_client.cc +++ chrome/common/chrome_content_client.cc
@@ -96,7 +96,8 @@ @@ -97,7 +97,8 @@
#if BUILDFLAG(ENABLE_LIBRARY_CDMS) #if BUILDFLAG(ENABLE_LIBRARY_CDMS)
#include "media/cdm/cdm_paths.h" // nogncheck #include "media/cdm/cdm_paths.h" // nogncheck

View File

@ -34,7 +34,7 @@ index 305095fc420e..f5ca4eda4a66 100644
MouseWheelPhaseHandler(RenderWidgetHostViewBase* const host_view); MouseWheelPhaseHandler(RenderWidgetHostViewBase* const host_view);
~MouseWheelPhaseHandler() {} ~MouseWheelPhaseHandler() {}
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
index 20d1994e156e..45102558569f 100644 index c9f9a18f1188..ecba73d54a30 100644
--- third_party/blink/renderer/controller/BUILD.gn --- third_party/blink/renderer/controller/BUILD.gn
+++ third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn
@@ -25,6 +25,7 @@ component("controller") { @@ -25,6 +25,7 @@ component("controller") {

View File

@ -1,5 +1,5 @@
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
index ef2d56f496b5..4cbe7cf6229c 100644 index 642fff3b4367..45faeed249c0 100644
--- content/browser/compositor/gpu_process_transport_factory.cc --- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -493,10 +493,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( @@ -493,10 +493,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
@ -26,7 +26,7 @@ index ef2d56f496b5..4cbe7cf6229c 100644
} else { } else {
DCHECK(context_provider); DCHECK(context_provider);
diff --git ui/compositor/compositor.h ui/compositor/compositor.h diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index a84fdb5a29fc..7845c07d7c96 100644 index a974ea654834..cfb3ff7f8a0c 100644
--- ui/compositor/compositor.h --- ui/compositor/compositor.h
+++ ui/compositor/compositor.h +++ ui/compositor/compositor.h
@@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@

View File

@ -14,10 +14,10 @@ index 9f7c7dd00536..f524b27feedf 100644
// The GetPlugins call causes the plugin list to be refreshed. Once that's // The GetPlugins call causes the plugin list to be refreshed. Once that's
// done we can retry the GetPluginInfo call. We break out of this cycle // done we can retry the GetPluginInfo call. We break out of this cycle
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
index 9f0645f8ae20..16036f0bb26c 100644 index 3c2de25de6df..5caf4a3aa510 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.cc --- chrome/browser/plugins/chrome_plugin_service_filter.cc
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc +++ chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -178,6 +178,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable( @@ -168,6 +168,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
int render_frame_id, int render_frame_id,
const void* context, const void* context,
const GURL& plugin_content_url, const GURL& plugin_content_url,
@ -26,10 +26,10 @@ index 9f0645f8ae20..16036f0bb26c 100644
content::WebPluginInfo* plugin) { content::WebPluginInfo* plugin) {
base::AutoLock auto_lock(lock_); base::AutoLock auto_lock(lock_);
diff --git chrome/browser/plugins/chrome_plugin_service_filter.h chrome/browser/plugins/chrome_plugin_service_filter.h diff --git chrome/browser/plugins/chrome_plugin_service_filter.h chrome/browser/plugins/chrome_plugin_service_filter.h
index 133145db74bf..021ab307ee2a 100644 index c707c8773a74..20bdf74abf01 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.h --- chrome/browser/plugins/chrome_plugin_service_filter.h
+++ chrome/browser/plugins/chrome_plugin_service_filter.h +++ chrome/browser/plugins/chrome_plugin_service_filter.h
@@ -66,6 +66,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter, @@ -65,6 +65,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter,
int render_frame_id, int render_frame_id,
const void* context, const void* context,
const GURL& plugin_content_url, const GURL& plugin_content_url,
@ -38,10 +38,10 @@ index 133145db74bf..021ab307ee2a 100644
content::WebPluginInfo* plugin) override; content::WebPluginInfo* plugin) override;
diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
index 0a458b1e04e4..bb7f0b235e2f 100644 index 1b4fd2b4149b..98498db23824 100644
--- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc --- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
+++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc +++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
@@ -54,7 +54,7 @@ PDFIFrameNavigationThrottle::MaybeCreateThrottleFor( @@ -56,7 +56,7 @@ PDFIFrameNavigationThrottle::MaybeCreateThrottleFor(
content::ResourceContext* resource_context = content::ResourceContext* resource_context =
handle->GetWebContents()->GetBrowserContext()->GetResourceContext(); handle->GetWebContents()->GetBrowserContext()->GetResourceContext();
if (filter->IsPluginAvailable(process_id, routing_id, resource_context, if (filter->IsPluginAvailable(process_id, routing_id, resource_context,
@ -77,10 +77,10 @@ index d4d56c7c6a96..1ec4de7d5fd3 100644
} }
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
index 836668ca6469..35b2e8f09c49 100644 index 72e60fdbe27c..8906cc6a598a 100644
--- content/browser/frame_host/navigation_handle_impl.cc --- content/browser/frame_host/navigation_handle_impl.cc
+++ content/browser/frame_host/navigation_handle_impl.cc +++ content/browser/frame_host/navigation_handle_impl.cc
@@ -393,12 +393,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { @@ -401,12 +401,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
} }
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() { RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
@ -94,21 +94,10 @@ index 836668ca6469..35b2e8f09c49 100644
"WillFailRequest state should come before WillProcessResponse"); "WillFailRequest state should come before WillProcessResponse");
return render_frame_host_; return render_frame_host_;
diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc
index f1df2ee8770c..adec7713be7a 100644 index 60b610202e7d..b14da4aba2f0 100644
--- content/browser/frame_host/render_frame_host_impl.cc --- content/browser/frame_host/render_frame_host_impl.cc
+++ content/browser/frame_host/render_frame_host_impl.cc +++ content/browser/frame_host/render_frame_host_impl.cc
@@ -846,8 +846,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactory( @@ -1671,6 +1671,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory(
this, false /* is_navigation */, false /* is_download */,
&default_factory_request);
- StoragePartitionImpl* storage_partition = static_cast<StoragePartitionImpl*>(
- BrowserContext::GetStoragePartition(context, GetSiteInstance()));
+ StoragePartition* storage_partition =
+ BrowserContext::GetStoragePartition(context, GetSiteInstance());
if (g_create_network_factory_callback_for_test.Get().is_null()) {
storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
std::move(default_factory_request), std::move(params));
@@ -1677,6 +1677,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
if (GetNavigationHandle()) { if (GetNavigationHandle()) {
GetNavigationHandle()->set_net_error_code( GetNavigationHandle()->set_net_error_code(
static_cast<net::Error>(params.error_code)); static_cast<net::Error>(params.error_code));
@ -116,7 +105,7 @@ index f1df2ee8770c..adec7713be7a 100644
} }
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
@@ -4084,9 +4085,9 @@ void RenderFrameHostImpl::CommitNavigation( @@ -4115,9 +4116,9 @@ void RenderFrameHostImpl::CommitNavigation(
// is used. Currently we have this here to make sure we have non-racy // is used. Currently we have this here to make sure we have non-racy
// situation (https://crbug.com/849929). // situation (https://crbug.com/849929).
DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService)); DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService));
@ -128,6 +117,17 @@ index f1df2ee8770c..adec7713be7a 100644
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE, BrowserThread::IO, FROM_HERE,
base::BindOnce(&PrefetchURLLoaderService::GetFactory, base::BindOnce(&PrefetchURLLoaderService::GetFactory,
@@ -4811,8 +4812,8 @@ bool RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryInternal(
RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory(
this, false /* is_navigation */, false /* is_download */,
&default_factory_request);
- StoragePartitionImpl* storage_partition = static_cast<StoragePartitionImpl*>(
- BrowserContext::GetStoragePartition(context, GetSiteInstance()));
+ StoragePartition* storage_partition =
+ BrowserContext::GetStoragePartition(context, GetSiteInstance());
if (g_create_network_factory_callback_for_test.Get().is_null()) {
storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
std::move(default_factory_request), std::move(params));
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
index 2f32390f0b45..6324f0f738e8 100644 index 2f32390f0b45..6324f0f738e8 100644
--- content/browser/frame_host/render_frame_message_filter.cc --- content/browser/frame_host/render_frame_message_filter.cc
@ -179,10 +179,10 @@ index 74707ef31289..3c1c964f0cb7 100644
if (stale) { if (stale) {
// Refresh the plugins asynchronously. // Refresh the plugins asynchronously.
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
index b822ba75eef6..83fc7ea2aa51 100644 index 3a6480c71777..cf5c5c50507c 100644
--- content/browser/plugin_service_impl.cc --- content/browser/plugin_service_impl.cc
+++ content/browser/plugin_service_impl.cc +++ content/browser/plugin_service_impl.cc
@@ -286,6 +286,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, @@ -302,6 +302,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
int render_frame_id, int render_frame_id,
ResourceContext* context, ResourceContext* context,
const GURL& url, const GURL& url,
@ -190,7 +190,7 @@ index b822ba75eef6..83fc7ea2aa51 100644
const url::Origin& main_frame_origin, const url::Origin& main_frame_origin,
const std::string& mime_type, const std::string& mime_type,
bool allow_wildcard, bool allow_wildcard,
@@ -302,7 +303,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, @@ -318,7 +319,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
for (size_t i = 0; i < plugins.size(); ++i) { for (size_t i = 0; i < plugins.size(); ++i) {
if (!filter_ || if (!filter_ ||
filter_->IsPluginAvailable(render_process_id, render_frame_id, context, filter_->IsPluginAvailable(render_process_id, render_frame_id, context,
@ -201,10 +201,10 @@ index b822ba75eef6..83fc7ea2aa51 100644
if (actual_mime_type) if (actual_mime_type)
*actual_mime_type = mime_types[i]; *actual_mime_type = mime_types[i];
diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h
index 4e11056a3dc9..973ad50975e1 100644 index cb19abcd26b8..12d66dd7db6e 100644
--- content/browser/plugin_service_impl.h --- content/browser/plugin_service_impl.h
+++ content/browser/plugin_service_impl.h +++ content/browser/plugin_service_impl.h
@@ -65,6 +65,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService { @@ -57,6 +57,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
int render_frame_id, int render_frame_id,
ResourceContext* context, ResourceContext* context,
const GURL& url, const GURL& url,
@ -285,10 +285,10 @@ index 3009401dac6b..b4c5a9e2db50 100644
}; };
diff --git content/common/frame_messages.h content/common/frame_messages.h diff --git content/common/frame_messages.h content/common/frame_messages.h
index 4d0712eca8d0..ef1d88a7d42c 100644 index c42a88101a49..ddfc56a05f4f 100644
--- content/common/frame_messages.h --- content/common/frame_messages.h
+++ content/common/frame_messages.h +++ content/common/frame_messages.h
@@ -1379,9 +1379,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, @@ -1366,9 +1366,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
// type. If there is no matching plugin, |found| is false. // type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the // |actual_mime_type| is the actual mime type supported by the
// found plugin. // found plugin.
@ -301,7 +301,7 @@ index 4d0712eca8d0..ef1d88a7d42c 100644
std::string /* mime_type */, std::string /* mime_type */,
bool /* found */, bool /* found */,
diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h
index 27021d64244d..60f1ec1845d9 100644 index aed3085c7794..3b31542094d4 100644
--- content/public/browser/plugin_service.h --- content/public/browser/plugin_service.h
+++ content/public/browser/plugin_service.h +++ content/public/browser/plugin_service.h
@@ -73,6 +73,7 @@ class CONTENT_EXPORT PluginService { @@ -73,6 +73,7 @@ class CONTENT_EXPORT PluginService {
@ -325,10 +325,10 @@ index 3b610b1f554e..7c439e060779 100644
WebPluginInfo* plugin) = 0; WebPluginInfo* plugin) = 0;
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index d3762e8e9311..b84e0795c163 100644 index f1c9cc5997cb..f901f8354251 100644
--- content/public/renderer/content_renderer_client.h --- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h
@@ -74,6 +74,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -75,6 +75,9 @@ class CONTENT_EXPORT ContentRendererClient {
// Notifies us that the RenderThread has been created. // Notifies us that the RenderThread has been created.
virtual void RenderThreadStarted() {} virtual void RenderThreadStarted() {}
@ -338,7 +338,7 @@ index d3762e8e9311..b84e0795c163 100644
// Notifies that a new RenderFrame has been created. // Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {} virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -341,6 +344,10 @@ class CONTENT_EXPORT ContentRendererClient { @@ -347,6 +350,10 @@ class CONTENT_EXPORT ContentRendererClient {
// This method may invalidate the frame. // This method may invalidate the frame.
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
@ -364,10 +364,10 @@ index 88efca34d574..565f24148f7b 100644
virtual void FocusedNodeChanged(const blink::WebNode& node) {} virtual void FocusedNodeChanged(const blink::WebNode& node) {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index 9824bf608ed0..b99c320fd793 100644 index 81bd5faff7f4..f3bbf5f124de 100644
--- content/renderer/render_frame_impl.cc --- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc
@@ -3474,7 +3474,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( @@ -3577,7 +3577,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
std::string mime_type; std::string mime_type;
bool found = false; bool found = false;
Send(new FrameHostMsg_GetPluginInfo( Send(new FrameHostMsg_GetPluginInfo(
@ -377,7 +377,7 @@ index 9824bf608ed0..b99c320fd793 100644
params.mime_type.Utf8(), &found, &info, &mime_type)); params.mime_type.Utf8(), &found, &info, &mime_type));
if (!found) if (!found)
return nullptr; return nullptr;
@@ -3839,6 +3840,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { @@ -3948,6 +3949,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
void RenderFrameImpl::FrameFocused() { void RenderFrameImpl::FrameFocused() {
Send(new FrameHostMsg_FrameFocused(routing_id_)); Send(new FrameHostMsg_FrameFocused(routing_id_));
@ -387,10 +387,10 @@ index 9824bf608ed0..b99c320fd793 100644
void RenderFrameImpl::WillCommitProvisionalLoad() { void RenderFrameImpl::WillCommitProvisionalLoad() {
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index d0781332d8b8..f17614b61336 100644 index e0208d440f55..77ea92adb54d 100644
--- content/renderer/render_thread_impl.cc --- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc
@@ -865,6 +865,8 @@ void RenderThreadImpl::Init( @@ -829,6 +829,8 @@ void RenderThreadImpl::Init() {
StartServiceManagerConnection(); StartServiceManagerConnection();
@ -400,10 +400,10 @@ index d0781332d8b8..f17614b61336 100644
base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest, base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest,
base::Unretained(this))); base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 33626b1c8284..ebebf1f58c4c 100644 index 8d7631fb756f..5239dde4a1c9 100644
--- content/renderer/renderer_blink_platform_impl.cc --- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc
@@ -1107,6 +1107,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() { @@ -1192,6 +1192,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() {
base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory(); base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory();
} }
@ -419,10 +419,10 @@ index 33626b1c8284..ebebf1f58c4c 100644
if (!web_database_host_) { if (!web_database_host_) {
web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create( web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create(
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index d3ae4a5b44b6..ccfa2a131fe1 100644 index b3bde113adbd..cf4108f21cf8 100644
--- content/renderer/renderer_blink_platform_impl.h --- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h
@@ -219,6 +219,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -233,6 +233,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
mojo::ScopedDataPipeConsumerHandle handle) override; mojo::ScopedDataPipeConsumerHandle handle) override;
void RequestPurgeMemory() override; void RequestPurgeMemory() override;
@ -457,7 +457,7 @@ index 7767a620a9fd..8a95377f5f3b 100644
WebPluginInfo* plugin) override; WebPluginInfo* plugin) override;
diff --git content/test/fake_plugin_service.cc content/test/fake_plugin_service.cc diff --git content/test/fake_plugin_service.cc content/test/fake_plugin_service.cc
index dfc1e111ac10..23106007a32e 100644 index 6500af1d859f..0d078a4a4281 100644
--- content/test/fake_plugin_service.cc --- content/test/fake_plugin_service.cc
+++ content/test/fake_plugin_service.cc +++ content/test/fake_plugin_service.cc
@@ -29,6 +29,7 @@ bool FakePluginService::GetPluginInfo(int render_process_id, @@ -29,6 +29,7 @@ bool FakePluginService::GetPluginInfo(int render_process_id,
@ -469,7 +469,7 @@ index dfc1e111ac10..23106007a32e 100644
const std::string& mime_type, const std::string& mime_type,
bool allow_wildcard, bool allow_wildcard,
diff --git content/test/fake_plugin_service.h content/test/fake_plugin_service.h diff --git content/test/fake_plugin_service.h content/test/fake_plugin_service.h
index 84bed37848d9..1a66c0757437 100644 index 205dfc39dfa7..ec250828b0ba 100644
--- content/test/fake_plugin_service.h --- content/test/fake_plugin_service.h
+++ content/test/fake_plugin_service.h +++ content/test/fake_plugin_service.h
@@ -30,6 +30,7 @@ class FakePluginService : public PluginService { @@ -30,6 +30,7 @@ class FakePluginService : public PluginService {

View File

@ -27,7 +27,7 @@ index 53c7404ef1f9..ac33df7cfe0e 100644
auto* browser_context = web_contents->GetBrowserContext(); auto* browser_context = web_contents->GetBrowserContext();
StreamsPrivateAPI* streams_private = GetStreamsPrivateAPI(browser_context); StreamsPrivateAPI* streams_private = GetStreamsPrivateAPI(browser_context);
diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc
index 406302b6b760..5ab2f3d7157b 100644 index 49ad391a3133..b7216126976b 100644
--- content/browser/frame_host/render_frame_host_manager.cc --- content/browser/frame_host/render_frame_host_manager.cc
+++ content/browser/frame_host/render_frame_host_manager.cc +++ content/browser/frame_host/render_frame_host_manager.cc
@@ -928,10 +928,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( @@ -928,10 +928,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
@ -57,10 +57,10 @@ index 406302b6b760..5ab2f3d7157b 100644
// If |new_instance| is a new SiteInstance for a subframe that requires a // If |new_instance| is a new SiteInstance for a subframe that requires a
// dedicated process, set its process reuse policy so that such subframes are // dedicated process, set its process reuse policy so that such subframes are
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 5e35f1de540d..3e73ad586ab8 100644 index bc2b501331e9..acf916d35479 100644
--- content/public/browser/content_browser_client.h --- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h
@@ -396,6 +396,13 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -422,6 +422,13 @@ class CONTENT_EXPORT ContentBrowserClient {
// Returns true if error page should be isolated in its own process. // Returns true if error page should be isolated in its own process.
virtual bool ShouldIsolateErrorPage(bool in_main_frame); virtual bool ShouldIsolateErrorPage(bool in_main_frame);
@ -75,7 +75,7 @@ index 5e35f1de540d..3e73ad586ab8 100644
// current SiteInstance, if it does not yet have a site. // current SiteInstance, if it does not yet have a site.
virtual bool ShouldAssignSiteForURL(const GURL& url); virtual bool ShouldAssignSiteForURL(const GURL& url);
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
index b1bd45860305..5169b816f185 100644 index 6cf7f34bfbd7..a2dcdb88fbe3 100644
--- extensions/browser/extension_host.cc --- extensions/browser/extension_host.cc
+++ extensions/browser/extension_host.cc +++ extensions/browser/extension_host.cc
@@ -67,11 +67,12 @@ ExtensionHost::ExtensionHost(const Extension* extension, @@ -67,11 +67,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@ -145,7 +145,7 @@ index b1bd45860305..5169b816f185 100644
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this); ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
index 369f4451607e..1849f3a7bcb7 100644 index ad1ef1bd0b8f..8014a61c5083 100644
--- extensions/browser/extension_host.h --- extensions/browser/extension_host.h
+++ extensions/browser/extension_host.h +++ extensions/browser/extension_host.h
@@ -51,13 +51,19 @@ class ExtensionHost : public DeferredStartRenderHost, @@ -51,13 +51,19 @@ class ExtensionHost : public DeferredStartRenderHost,
@ -169,7 +169,7 @@ index 369f4451607e..1849f3a7bcb7 100644
content::RenderViewHost* render_view_host() const; content::RenderViewHost* render_view_host() const;
content::RenderProcessHost* render_process_host() const; content::RenderProcessHost* render_process_host() const;
bool has_loaded_once() const { return has_loaded_once_; } bool has_loaded_once() const { return has_loaded_once_; }
@@ -175,7 +181,8 @@ class ExtensionHost : public DeferredStartRenderHost, @@ -178,7 +184,8 @@ class ExtensionHost : public DeferredStartRenderHost,
content::BrowserContext* browser_context_; content::BrowserContext* browser_context_;
// The host for our HTML content. // The host for our HTML content.
@ -180,10 +180,10 @@ index 369f4451607e..1849f3a7bcb7 100644
// A weak pointer to the current or pending RenderViewHost. We don't access // A weak pointer to the current or pending RenderViewHost. We don't access
// this through the host_contents because we want to deal with the pending // this through the host_contents because we want to deal with the pending
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
index bb45a8acc909..d4b3fcb3dae5 100644 index 7e0c178e1e36..98066c8437a1 100644
--- extensions/browser/extensions_browser_client.h --- extensions/browser/extensions_browser_client.h
+++ extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h
@@ -54,6 +54,7 @@ class ComponentExtensionResourceManager; @@ -61,6 +61,7 @@ class ComponentExtensionResourceManager;
class Extension; class Extension;
class ExtensionCache; class ExtensionCache;
class ExtensionError; class ExtensionError;
@ -191,7 +191,7 @@ index bb45a8acc909..d4b3fcb3dae5 100644
class ExtensionHostDelegate; class ExtensionHostDelegate;
class ExtensionPrefsObserver; class ExtensionPrefsObserver;
class ExtensionApiFrameIdMap; class ExtensionApiFrameIdMap;
@@ -109,6 +110,11 @@ class ExtensionsBrowserClient { @@ -132,6 +133,11 @@ class ExtensionsBrowserClient {
virtual content::BrowserContext* GetOriginalContext( virtual content::BrowserContext* GetOriginalContext(
content::BrowserContext* context) = 0; content::BrowserContext* context) = 0;
@ -203,7 +203,7 @@ index bb45a8acc909..d4b3fcb3dae5 100644
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
// Returns a user id hash from |context| or an empty string if no hash could // Returns a user id hash from |context| or an empty string if no hash could
// be extracted. // be extracted.
@@ -191,6 +197,14 @@ class ExtensionsBrowserClient { @@ -214,6 +220,14 @@ class ExtensionsBrowserClient {
virtual std::unique_ptr<ExtensionHostDelegate> virtual std::unique_ptr<ExtensionHostDelegate>
CreateExtensionHostDelegate() = 0; CreateExtensionHostDelegate() = 0;
@ -219,10 +219,10 @@ index bb45a8acc909..d4b3fcb3dae5 100644
// once each time the extensions system is loaded per browser_context. The // once each time the extensions system is loaded per browser_context. The
// implementation may wish to use the BrowserContext to record the current // implementation may wish to use the BrowserContext to record the current
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
index 1f8c4ed09d60..933019a7a483 100644 index ceb2f535caab..6e57be3d9241 100644
--- extensions/browser/process_manager.cc --- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc
@@ -353,9 +353,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, @@ -358,9 +358,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
return true; // TODO(kalman): return false here? It might break things... return true; // TODO(kalman): return false here? It might break things...
DVLOG(1) << "CreateBackgroundHost " << extension->id(); DVLOG(1) << "CreateBackgroundHost " << extension->id();

View File

@ -1,8 +1,8 @@
diff --git .gn .gn diff --git .gn .gn
index c1a111364bed..566ffd815bc9 100644 index 6fd17634ee87..0563b730a180 100644
--- .gn --- .gn
+++ .gn +++ .gn
@@ -310,6 +310,8 @@ exec_script_whitelist = @@ -411,6 +411,8 @@ exec_script_whitelist =
# in the Chromium repo outside of //build. # in the Chromium repo outside of //build.
"//build_overrides/build.gni", "//build_overrides/build.gni",
@ -12,10 +12,10 @@ index c1a111364bed..566ffd815bc9 100644
# https://crbug.com/474506. # https://crbug.com/474506.
"//clank/java/BUILD.gn", "//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn diff --git BUILD.gn BUILD.gn
index 45b912d00cdd..4b3bbcd8cbf7 100644 index fd7e05257f9a..89d9e6c53d06 100644
--- BUILD.gn --- BUILD.gn
+++ BUILD.gn +++ BUILD.gn
@@ -188,6 +188,7 @@ group("gn_all") { @@ -187,6 +187,7 @@ group("gn_all") {
if (!is_ios && !is_fuchsia) { if (!is_ios && !is_fuchsia) {
deps += [ deps += [
@ -56,7 +56,7 @@ index 982fbe8d3f0d..e757be4688f1 100644
+ "studio path") + "studio path")
} }
diff --git build/toolchain/win/BUILD.gn build/toolchain/win/BUILD.gn diff --git build/toolchain/win/BUILD.gn build/toolchain/win/BUILD.gn
index eb3e2b2b377d..343b039f3a50 100644 index 3c6c9d05d2c8..d475747fa12d 100644
--- build/toolchain/win/BUILD.gn --- build/toolchain/win/BUILD.gn
+++ build/toolchain/win/BUILD.gn +++ build/toolchain/win/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni") @@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni")

View File

@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids
index 7adeec49c098..5b60ee904910 100644 index 4d9d81bcc3fd..c57df19fa613 100644
--- tools/gritsettings/resource_ids --- tools/gritsettings/resource_ids
+++ tools/gritsettings/resource_ids +++ tools/gritsettings/resource_ids
@@ -419,4 +419,11 @@ @@ -427,4 +427,11 @@
# Please read the header and find the right section above instead. # Please read the header and find the right section above instead.
# Resource ids starting at 31000 are reserved for projects built on Chromium. # Resource ids starting at 31000 are reserved for projects built on Chromium.

View File

@ -1,8 +1,8 @@
diff --git ui/base/ime/input_method_win_base.cc ui/base/ime/input_method_win_base.cc diff --git ui/base/ime/input_method_win_base.cc ui/base/ime/input_method_win_base.cc
index db76ef3d5f87..816473414034 100644 index 046f0d05268c..abbe8763e8fb 100644
--- ui/base/ime/input_method_win_base.cc --- ui/base/ime/input_method_win_base.cc
+++ ui/base/ime/input_method_win_base.cc +++ ui/base/ime/input_method_win_base.cc
@@ -72,8 +72,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const { @@ -266,8 +266,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const {
// receiving keyboard input as long as it is an active window. This works well // receiving keyboard input as long as it is an active window. This works well
// even when the |attached_window_handle| becomes active but has not received // even when the |attached_window_handle| becomes active but has not received
// WM_FOCUS yet. // WM_FOCUS yet.

View File

@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 7cb21711aa1b..afbddcd5b394 100644 index d1bb5597f206..8c54651b3bce 100644
--- build/config/compiler/BUILD.gn --- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn
@@ -153,7 +153,7 @@ declare_args() { @@ -162,7 +162,7 @@ declare_args() {
!use_clang_coverage && !(is_android && use_order_profiling) && !use_clang_coverage && !(is_android && use_order_profiling) &&
(use_lld || (use_lld ||
(use_gold && (use_gold &&
@ -11,77 +11,3 @@ index 7cb21711aa1b..afbddcd5b394 100644
!(current_cpu == "x86" || current_cpu == "x64")))) !(current_cpu == "x86" || current_cpu == "x64"))))
} }
diff --git chrome/browser/ui/libgtkui/gtk_util.cc chrome/browser/ui/libgtkui/gtk_util.cc
index 39bf49c7b111..ad7b054e185f 100644
--- chrome/browser/ui/libgtkui/gtk_util.cc
+++ chrome/browser/ui/libgtkui/gtk_util.cc
@@ -239,6 +239,7 @@ float GetDeviceScaleFactor() {
return linux_ui ? linux_ui->GetDeviceScaleFactor() : 1;
}
+#if GTK_MAJOR_VERSION > 2
using GtkSetState = void (*)(GtkWidgetPath*, gint, GtkStateFlags);
PROTECTED_MEMORY_SECTION base::ProtectedMemory<GtkSetState>
_gtk_widget_path_iter_set_state;
@@ -246,6 +247,7 @@ PROTECTED_MEMORY_SECTION base::ProtectedMemory<GtkSetState>
using GtkSetObjectName = void (*)(GtkWidgetPath*, gint, const char*);
PROTECTED_MEMORY_SECTION base::ProtectedMemory<GtkSetObjectName>
_gtk_widget_path_iter_set_object_name;
+#endif
} // namespace
@@ -403,10 +405,12 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context,
NOTREACHED();
}
} else {
+#if GTK_MAJOR_VERSION > 2
static base::ProtectedMemory<GtkSetObjectName>::Initializer init(
&_gtk_widget_path_iter_set_object_name,
reinterpret_cast<GtkSetObjectName>(dlsym(
GetGtkSharedLibrary(), "gtk_widget_path_iter_set_object_name")));
+#endif
switch (part_type) {
case CSS_NAME: {
if (GtkVersionCheck(3, 20)) {
@@ -451,6 +455,7 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context,
// widgets specially if they want to.
gtk_widget_path_iter_add_class(path, -1, "chromium");
+#if GTK_MAJOR_VERSION > 2
if (GtkVersionCheck(3, 14)) {
static base::ProtectedMemory<GtkSetState>::Initializer init(
&_gtk_widget_path_iter_set_state,
@@ -459,6 +464,7 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context,
DCHECK(*_gtk_widget_path_iter_set_state);
base::UnsanitizedCfiCall(_gtk_widget_path_iter_set_state)(path, -1, state);
}
+#endif
ScopedStyleContext child_context(gtk_style_context_new());
gtk_style_context_set_path(child_context, path);
diff --git chrome/browser/ui/libgtkui/native_theme_gtk2.cc chrome/browser/ui/libgtkui/native_theme_gtk2.cc
index b24ff4b95f97..49e80717b1d6 100644
--- chrome/browser/ui/libgtkui/native_theme_gtk2.cc
+++ chrome/browser/ui/libgtkui/native_theme_gtk2.cc
@@ -163,6 +163,8 @@ SkColor NativeThemeGtk2::GetSystemColor(ColorId color_id) const {
return GetBgColor(GetMenu(), NORMAL);
// Label
+ case kColorId_ActionableSubmenuVerticalSeparatorColor:
+ case kColorId_TouchableMenuItemLabelColor:
case kColorId_LabelEnabledColor:
return GetTextColor(GetEntry(), NORMAL);
case kColorId_LabelDisabledColor:
diff --git ui/accessibility/platform/atk_util_auralinux_gtk2.cc ui/accessibility/platform/atk_util_auralinux_gtk2.cc
index 5bcccd9cd98c..fa581fbe23b1 100644
--- ui/accessibility/platform/atk_util_auralinux_gtk2.cc
+++ ui/accessibility/platform/atk_util_auralinux_gtk2.cc
@@ -48,6 +48,7 @@ GnomeAccessibilityModuleInitFunc GetAccessibilityModuleInitFunc() {
return init_func;
}
+NO_SANITIZE("cfi-icall")
void FinishAccessibilityInitOnMainThread(
GnomeAccessibilityModuleInitFunc init_func) {
if (!init_func) {

View File

@ -1,8 +1,8 @@
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
index f4789ebf3b0e..73d66e8f5165 100644 index a89aad20c34c..f3bfc3973a10 100644
--- ui/gl/init/gl_initializer_mac.cc --- ui/gl/init/gl_initializer_mac.cc
+++ ui/gl/init/gl_initializer_mac.cc +++ ui/gl/init/gl_initializer_mac.cc
@@ -47,11 +47,8 @@ bool InitializeOneOffForSandbox() { @@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() {
// GPU-related stuff is very slow without this, probably because // GPU-related stuff is very slow without this, probably because
// the sandbox prevents loading graphics drivers or some such. // the sandbox prevents loading graphics drivers or some such.
std::vector<CGLPixelFormatAttribute> attribs; std::vector<CGLPixelFormatAttribute> attribs;
@ -16,7 +16,7 @@ index f4789ebf3b0e..73d66e8f5165 100644
if (GetGLImplementation() == kGLImplementationAppleGL) { if (GetGLImplementation() == kGLImplementationAppleGL) {
attribs.push_back(kCGLPFARendererID); attribs.push_back(kCGLPFARendererID);
attribs.push_back( attribs.push_back(
@@ -146,8 +143,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { @@ -102,8 +99,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
// as app bundles. In that case, the .dylib is next to the executable. // as app bundles. In that case, the .dylib is next to the executable.
base::FilePath base_dir; base::FilePath base_dir;
if (base::mac::AmIBundled()) { if (base::mac::AmIBundled()) {

View File

@ -1,8 +1,8 @@
diff --git base/message_loop/message_loop.cc base/message_loop/message_loop.cc diff --git base/message_loop/message_loop.cc base/message_loop/message_loop.cc
index 7f063693a0f2..14f50b6f7d5f 100644 index ff55a15ce0f0..30a903dffcdc 100644
--- base/message_loop/message_loop.cc --- base/message_loop/message_loop.cc
+++ base/message_loop/message_loop.cc +++ base/message_loop/message_loop.cc
@@ -610,6 +610,9 @@ MessageLoopForUI::MessageLoopForUI(Type type) : MessageLoop(type) { @@ -613,6 +613,9 @@ MessageLoopForUI::MessageLoopForUI(Type type) : MessageLoop(type) {
#endif #endif
} }
@ -13,10 +13,10 @@ index 7f063693a0f2..14f50b6f7d5f 100644
MessageLoopCurrentForUI MessageLoopForUI::current() { MessageLoopCurrentForUI MessageLoopForUI::current() {
return MessageLoopCurrentForUI::Get(); return MessageLoopCurrentForUI::Get();
diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h
index 52b474310074..35f4cc41a572 100644 index dae6c35eab00..adbd6e72c7a3 100644
--- base/message_loop/message_loop.h --- base/message_loop/message_loop.h
+++ base/message_loop/message_loop.h +++ base/message_loop/message_loop.h
@@ -362,6 +362,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate, @@ -366,6 +366,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
class BASE_EXPORT MessageLoopForUI : public MessageLoop { class BASE_EXPORT MessageLoopForUI : public MessageLoop {
public: public:
explicit MessageLoopForUI(Type type = TYPE_UI); explicit MessageLoopForUI(Type type = TYPE_UI);
@ -25,7 +25,7 @@ index 52b474310074..35f4cc41a572 100644
// TODO(gab): Mass migrate callers to MessageLoopCurrentForUI::Get()/IsSet(). // TODO(gab): Mass migrate callers to MessageLoopCurrentForUI::Get()/IsSet().
static MessageLoopCurrentForUI current(); static MessageLoopCurrentForUI current();
diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h
index 2a2e761e87e8..37881c184940 100644 index d623cbc7f7b2..04d83792f98d 100644
--- base/message_loop/message_loop_current.h --- base/message_loop/message_loop_current.h
+++ base/message_loop/message_loop_current.h +++ base/message_loop/message_loop_current.h
@@ -124,6 +124,16 @@ class BASE_EXPORT MessageLoopCurrent { @@ -124,6 +124,16 @@ class BASE_EXPORT MessageLoopCurrent {
@ -60,7 +60,7 @@ index 2a2e761e87e8..37881c184940 100644
#if !defined(OS_NACL) #if !defined(OS_NACL)
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
index c95f85abfee1..b28ac0a0faa1 100644 index bba71fa7929f..9abffd154557 100644
--- base/message_loop/message_pump_win.cc --- base/message_loop/message_pump_win.cc
+++ base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
@ -71,7 +71,7 @@ index c95f85abfee1..b28ac0a0faa1 100644
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
@@ -375,20 +376,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) { @@ -387,20 +388,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
} }
bool MessagePumpForUI::ProcessPumpReplacementMessage() { bool MessagePumpForUI::ProcessPumpReplacementMessage() {

View File

@ -1,5 +1,5 @@
diff --git net/base/network_delegate.h net/base/network_delegate.h diff --git net/base/network_delegate.h net/base/network_delegate.h
index c28d0bb3b676..1acbb4c94495 100644 index ea4316257a61..58bf1443f1ae 100644
--- net/base/network_delegate.h --- net/base/network_delegate.h
+++ net/base/network_delegate.h +++ net/base/network_delegate.h
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
@ -10,7 +10,7 @@ index c28d0bb3b676..1acbb4c94495 100644
#include "net/proxy_resolution/proxy_retry_info.h" #include "net/proxy_resolution/proxy_retry_info.h"
class GURL; class GURL;
@@ -125,6 +126,10 @@ class NET_EXPORT NetworkDelegate { @@ -122,6 +123,10 @@ class NET_EXPORT NetworkDelegate {
bool CanUseReportingClient(const url::Origin& origin, bool CanUseReportingClient(const url::Origin& origin,
const GURL& endpoint) const; const GURL& endpoint) const;

View File

@ -1,10 +1,10 @@
diff --git net/url_request/url_request.h net/url_request/url_request.h diff --git net/url_request/url_request.h net/url_request/url_request.h
index 6f23eedfd4f9..82d1f81e4081 100644 index a64498d1786c..bf440a5b5f6b 100644
--- net/url_request/url_request.h --- net/url_request/url_request.h
+++ net/url_request/url_request.h +++ net/url_request/url_request.h
@@ -734,10 +734,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { @@ -737,10 +737,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
}
bool upgrade_if_insecure() const { return upgrade_if_insecure_; } base::WeakPtr<URLRequest> GetWeakPtr();
- protected: - protected:
// Allow the URLRequestJob class to control the is_pending() flag. // Allow the URLRequestJob class to control the is_pending() flag.

View File

@ -1,8 +1,8 @@
diff --git BUILD.gn BUILD.gn diff --git BUILD.gn BUILD.gn
index afa83e358..90e6473af 100644 index 27e4b2615..80764bec2 100644
--- BUILD.gn --- BUILD.gn
+++ BUILD.gn +++ BUILD.gn
@@ -239,6 +239,10 @@ jumbo_static_library("pdfium") { @@ -240,6 +240,10 @@ jumbo_static_library("pdfium") {
complete_static_lib = true complete_static_lib = true
configs -= [ "//build/config/compiler:thin_archive" ] configs -= [ "//build/config/compiler:thin_archive" ]
} }
@ -14,18 +14,18 @@ index afa83e358..90e6473af 100644
jumbo_static_library("test_support") { jumbo_static_library("test_support") {
diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp
index c44d582fd..6debf1e38 100644 index 0cfa36290..302fa174b 100644
--- fpdfsdk/fpdf_view.cpp --- fpdfsdk/fpdf_view.cpp
+++ fpdfsdk/fpdf_view.cpp +++ fpdfsdk/fpdf_view.cpp
@@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
#include "fpdfsdk/cpdfsdk_memoryaccess.h" #include "fpdfsdk/cpdfsdk_helpers.h"
#include "fpdfsdk/cpdfsdk_pageview.h" #include "fpdfsdk/cpdfsdk_pageview.h"
#include "fpdfsdk/ipdfsdk_pauseadapter.h" #include "fpdfsdk/ipdfsdk_pauseadapter.h"
+#include "fxjs/cfxjs_engine.h" +#include "fxjs/cfxjs_engine.h"
#include "fxjs/ijs_runtime.h" #include "fxjs/ijs_runtime.h"
#include "public/fpdf_formfill.h" #include "public/fpdf_formfill.h"
#include "third_party/base/ptr_util.h" #include "third_party/base/ptr_util.h"
@@ -194,6 +195,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() { @@ -195,6 +196,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
CPDF_ModuleMgr::Destroy(); CPDF_ModuleMgr::Destroy();
CFX_GEModule::Destroy(); CFX_GEModule::Destroy();

View File

@ -1,8 +1,8 @@
diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h
index 8b7955b58e6f..96a801e55e96 100644 index 64de36aa7450..3795fb7dffbe 100644
--- content/public/common/common_param_traits_macros.h --- content/public/common/common_param_traits_macros.h
+++ content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h
@@ -187,6 +187,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) @@ -188,6 +188,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes) IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
@ -11,7 +11,7 @@ index 8b7955b58e6f..96a801e55e96 100644
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop) IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc
index 8378aefaf81a..f831c4aa6d26 100644 index bd8facb2d850..fba8020aa90e 100644
--- content/public/common/web_preferences.cc --- content/public/common/web_preferences.cc
+++ content/public/common/web_preferences.cc +++ content/public/common/web_preferences.cc
@@ -178,6 +178,7 @@ WebPreferences::WebPreferences() @@ -178,6 +178,7 @@ WebPreferences::WebPreferences()
@ -23,7 +23,7 @@ index 8378aefaf81a..f831c4aa6d26 100644
record_whole_document(false), record_whole_document(false),
save_previous_document_resources(SavePreviousDocumentResources::NEVER), save_previous_document_resources(SavePreviousDocumentResources::NEVER),
diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h
index 78cbf5f3db86..9a4906a32336 100644 index e21f52c4dde5..b7da33f1b9a3 100644
--- content/public/common/web_preferences.h --- content/public/common/web_preferences.h
+++ content/public/common/web_preferences.h +++ content/public/common/web_preferences.h
@@ -198,6 +198,7 @@ struct CONTENT_EXPORT WebPreferences { @@ -198,6 +198,7 @@ struct CONTENT_EXPORT WebPreferences {
@ -35,10 +35,10 @@ index 78cbf5f3db86..9a4906a32336 100644
bool record_whole_document; bool record_whole_document;
SavePreviousDocumentResources save_previous_document_resources; SavePreviousDocumentResources save_previous_document_resources;
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
index b97c67a53e1f..d7e56c72c521 100644 index 059aaa640ef3..e2e0e58726b8 100644
--- content/renderer/render_view_impl.cc --- content/renderer/render_view_impl.cc
+++ content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc
@@ -1269,6 +1269,7 @@ void RenderViewImpl::SendFrameStateUpdates() { @@ -1308,6 +1308,7 @@ void RenderViewImpl::SendFrameStateUpdates() {
void RenderViewImpl::ApplyWebPreferencesInternal(const WebPreferences& prefs, void RenderViewImpl::ApplyWebPreferencesInternal(const WebPreferences& prefs,
blink::WebView* web_view) { blink::WebView* web_view) {
ApplyWebPreferences(prefs, web_view); ApplyWebPreferences(prefs, web_view);

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 13b42917efe0..2b292871222e 100644 index 58bfe0e13733..371653fc39e8 100644
--- chrome/browser/ui/BUILD.gn --- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn
@@ -874,6 +874,7 @@ jumbo_split_static_library("ui") { @@ -828,6 +828,7 @@ jumbo_split_static_library("ui") {
"//base:i18n", "//base:i18n",
"//base/allocator:buildflags", "//base/allocator:buildflags",
"//cc/paint", "//cc/paint",
@ -133,10 +133,10 @@ index 18df7614a988..9f86016d3e68 100644
} }
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h
index d29bb6aedecd..db7110ce80be 100644 index e3c11e1302ff..0ae7dbd8851a 100644
--- components/printing/common/print_messages.h --- components/printing/common/print_messages.h
+++ components/printing/common/print_messages.h +++ components/printing/common/print_messages.h
@@ -86,7 +86,6 @@ struct PrintMsg_PrintFrame_Params { @@ -85,7 +85,6 @@ struct PrintMsg_PrintFrame_Params {
int document_cookie; int document_cookie;
}; };
@ -144,7 +144,7 @@ index d29bb6aedecd..db7110ce80be 100644
struct PrintHostMsg_RequestPrintPreview_Params { struct PrintHostMsg_RequestPrintPreview_Params {
PrintHostMsg_RequestPrintPreview_Params(); PrintHostMsg_RequestPrintPreview_Params();
~PrintHostMsg_RequestPrintPreview_Params(); ~PrintHostMsg_RequestPrintPreview_Params();
@@ -113,7 +112,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params { @@ -112,7 +111,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params {
printing::DuplexMode duplex; printing::DuplexMode duplex;
printing::PageRanges page_ranges; printing::PageRanges page_ranges;
}; };
@ -152,7 +152,7 @@ index d29bb6aedecd..db7110ce80be 100644
#endif // INTERNAL_COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ #endif // INTERNAL_COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
@@ -212,7 +210,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange) @@ -211,7 +209,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange)
IPC_STRUCT_TRAITS_MEMBER(to) IPC_STRUCT_TRAITS_MEMBER(to)
IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_END()
@ -160,7 +160,7 @@ index d29bb6aedecd..db7110ce80be 100644
IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params) IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params)
IPC_STRUCT_TRAITS_MEMBER(is_modifiable) IPC_STRUCT_TRAITS_MEMBER(is_modifiable)
IPC_STRUCT_TRAITS_MEMBER(webnode_only) IPC_STRUCT_TRAITS_MEMBER(webnode_only)
@@ -238,7 +235,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params) @@ -237,7 +234,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params)
// Specifies page range to be printed. // Specifies page range to be printed.
IPC_STRUCT_TRAITS_MEMBER(page_ranges) IPC_STRUCT_TRAITS_MEMBER(page_ranges)
IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_END()
@ -168,23 +168,23 @@ index d29bb6aedecd..db7110ce80be 100644
IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins)
IPC_STRUCT_TRAITS_MEMBER(content_width) IPC_STRUCT_TRAITS_MEMBER(content_width)
@@ -283,7 +279,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintContent_Params) @@ -282,7 +278,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintContent_Params)
IPC_STRUCT_MEMBER(printing::ContentToProxyIdMap, subframe_content_info) IPC_STRUCT_MEMBER(printing::ContentToProxyIdMap, subframe_content_info)
IPC_STRUCT_END() IPC_STRUCT_END()
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW) -#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Parameters to describe a rendered document. // Parameters to describe the to-be-rendered preview document.
IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params) IPC_STRUCT_BEGIN(PrintHostMsg_DidStartPreview_Params)
// Document's content including metafile data and subframe info. // Total page count for the rendered preview. (Not the number of pages the
@@ -319,7 +314,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params) @@ -316,7 +311,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params)
// Scaling % to fit to page // Store the expected pages count.
IPC_STRUCT_MEMBER(int, fit_to_page_scaling) IPC_STRUCT_MEMBER(int, expected_pages_count)
IPC_STRUCT_END() IPC_STRUCT_END()
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Parameters to describe a rendered page. // Parameters to describe a rendered page.
IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintDocument_Params) IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintDocument_Params)
@@ -355,20 +349,18 @@ IPC_STRUCT_END() @@ -351,20 +345,18 @@ IPC_STRUCT_END()
// Messages sent from the browser to the renderer. // Messages sent from the browser to the renderer.
@ -206,7 +206,7 @@ index d29bb6aedecd..db7110ce80be 100644
// Like PrintMsg_PrintPages, but using the print preview document's frame/node. // Like PrintMsg_PrintPages, but using the print preview document's frame/node.
IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog)
#endif #endif
@@ -383,13 +375,13 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, @@ -379,13 +371,13 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
// Tells the RenderFrame whether printing is enabled or not. // Tells the RenderFrame whether printing is enabled or not.
IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */) IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */)
@ -221,7 +221,7 @@ index d29bb6aedecd..db7110ce80be 100644
// Tells the RenderFrame that print preview dialog was closed. // Tells the RenderFrame that print preview dialog was closed.
IPC_MESSAGE_ROUTED0(PrintMsg_ClosePrintPreviewDialog) IPC_MESSAGE_ROUTED0(PrintMsg_ClosePrintPreviewDialog)
#endif #endif
@@ -455,7 +447,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten, @@ -451,7 +443,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten,
int /* page count */) int /* page count */)
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
@ -229,7 +229,7 @@ index d29bb6aedecd..db7110ce80be 100644
// Asks the browser to do print preview. // Asks the browser to do print preview.
IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview,
PrintHostMsg_RequestPrintPreview_Params /* params */) PrintHostMsg_RequestPrintPreview_Params /* params */)
@@ -492,7 +483,6 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_CheckForCancel, @@ -488,7 +479,6 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_CheckForCancel,
IPC_MESSAGE_ROUTED2(PrintHostMsg_MetafileReadyForPrinting, IPC_MESSAGE_ROUTED2(PrintHostMsg_MetafileReadyForPrinting,
PrintHostMsg_DidPreviewDocument_Params /* params */, PrintHostMsg_DidPreviewDocument_Params /* params */,
PrintHostMsg_PreviewIds /* ids */) PrintHostMsg_PreviewIds /* ids */)
@ -237,7 +237,7 @@ index d29bb6aedecd..db7110ce80be 100644
// This is sent when there are invalid printer settings. // This is sent when there are invalid printer settings.
IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
@@ -501,7 +491,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) @@ -497,7 +487,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed,
int /* document cookie */) int /* document cookie */)
@ -245,7 +245,7 @@ index d29bb6aedecd..db7110ce80be 100644
// Tell the browser print preview failed. // Tell the browser print preview failed.
IPC_MESSAGE_ROUTED2(PrintHostMsg_PrintPreviewFailed, IPC_MESSAGE_ROUTED2(PrintHostMsg_PrintPreviewFailed,
int /* document cookie */, int /* document cookie */,
@@ -532,6 +521,5 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, @@ -528,6 +517,5 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
IPC_MESSAGE_ROUTED2(PrintHostMsg_SetOptionsFromDocument, IPC_MESSAGE_ROUTED2(PrintHostMsg_SetOptionsFromDocument,
PrintHostMsg_SetOptionsFromDocument_Params /* params */, PrintHostMsg_SetOptionsFromDocument_Params /* params */,
PrintHostMsg_PreviewIds /* ids */) PrintHostMsg_PreviewIds /* ids */)
@ -253,10 +253,10 @@ index d29bb6aedecd..db7110ce80be 100644
#endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ #endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc
index 89d54c441107..ca90c04eb841 100644 index 86a68c361f06..3cd1008f35b0 100644
--- components/printing/renderer/print_render_frame_helper.cc --- components/printing/renderer/print_render_frame_helper.cc
+++ components/printing/renderer/print_render_frame_helper.cc +++ components/printing/renderer/print_render_frame_helper.cc
@@ -341,7 +341,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, @@ -340,7 +340,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
return plugin && plugin->SupportsPaginatedPrint(); return plugin && plugin->SupportsPaginatedPrint();
} }
@ -264,7 +264,7 @@ index 89d54c441107..ca90c04eb841 100644
// Returns true if the current destination printer is PRINT_TO_PDF. // Returns true if the current destination printer is PRINT_TO_PDF.
bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) { bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) {
bool print_to_pdf = false; bool print_to_pdf = false;
@@ -363,7 +362,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, @@ -362,7 +361,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame,
} }
return frame_has_custom_page_size_style; return frame_has_custom_page_size_style;
} }
@ -272,7 +272,7 @@ index 89d54c441107..ca90c04eb841 100644
#if BUILDFLAG(ENABLE_PRINTING) #if BUILDFLAG(ENABLE_PRINTING)
// Disable scaling when either: // Disable scaling when either:
@@ -418,7 +416,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, @@ -417,7 +415,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
: PRINTABLE_AREA_MARGINS; : PRINTABLE_AREA_MARGINS;
} }
@ -280,7 +280,7 @@ index 89d54c441107..ca90c04eb841 100644
bool FitToPageEnabled(const base::DictionaryValue& job_settings) { bool FitToPageEnabled(const base::DictionaryValue& job_settings) {
bool fit_to_paper_size = false; bool fit_to_paper_size = false;
if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) { if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) {
@@ -460,7 +457,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( @@ -459,7 +456,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
} }
return blink::kWebPrintScalingOptionFitToPrintableArea; return blink::kWebPrintScalingOptionFitToPrintableArea;
} }
@ -288,7 +288,7 @@ index 89d54c441107..ca90c04eb841 100644
// Helper function to scale and round an integer value with a double valued // Helper function to scale and round an integer value with a double valued
// scaling. // scaling.
@@ -1023,10 +1019,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { @@ -1021,10 +1017,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
return; return;
if (g_is_preview_enabled) { if (g_is_preview_enabled) {
@ -299,7 +299,7 @@ index 89d54c441107..ca90c04eb841 100644
} else { } else {
auto weak_this = weak_ptr_factory_.GetWeakPtr(); auto weak_this = weak_ptr_factory_.GetWeakPtr();
web_frame->DispatchBeforePrintEvent(); web_frame->DispatchBeforePrintEvent();
@@ -1054,10 +1048,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { @@ -1052,10 +1046,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(PrintRenderFrameHelper, message) IPC_BEGIN_MESSAGE_MAP(PrintRenderFrameHelper, message)
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages) IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog) IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
@ -311,7 +311,7 @@ index 89d54c441107..ca90c04eb841 100644
IPC_MESSAGE_HANDLER(PrintMsg_ClosePrintPreviewDialog, IPC_MESSAGE_HANDLER(PrintMsg_ClosePrintPreviewDialog,
OnClosePrintPreviewDialog) OnClosePrintPreviewDialog)
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -1139,7 +1133,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( @@ -1137,7 +1131,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo(
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS); ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
} }
@ -319,7 +319,7 @@ index 89d54c441107..ca90c04eb841 100644
void PrintRenderFrameHelper::OnPrintPreview( void PrintRenderFrameHelper::OnPrintPreview(
const base::DictionaryValue& settings) { const base::DictionaryValue& settings) {
if (ipc_nesting_level_ > 1) if (ipc_nesting_level_ > 1)
@@ -1394,7 +1387,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor( @@ -1391,7 +1384,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor(
printable_height / static_cast<double>(uniform_page_size.height); printable_height / static_cast<double>(uniform_page_size.height);
return static_cast<int>(100.0f * std::min(scale_width, scale_height)); return static_cast<int>(100.0f * std::min(scale_width, scale_height));
} }
@ -327,7 +327,7 @@ index 89d54c441107..ca90c04eb841 100644
void PrintRenderFrameHelper::OnPrintingDone(bool success) { void PrintRenderFrameHelper::OnPrintingDone(bool success) {
if (ipc_nesting_level_ > 1) if (ipc_nesting_level_ > 1)
@@ -1409,7 +1401,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { @@ -1406,7 +1398,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) {
is_printing_enabled_ = enabled; is_printing_enabled_ = enabled;
} }
@ -335,7 +335,7 @@ index 89d54c441107..ca90c04eb841 100644
void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
if (ipc_nesting_level_ > 1) if (ipc_nesting_level_ > 1)
return; return;
@@ -1420,7 +1411,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { @@ -1417,7 +1408,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
// that instead. // that instead.
auto plugin = delegate_->GetPdfElement(frame); auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.IsNull()) { if (!plugin.IsNull()) {
@ -345,7 +345,7 @@ index 89d54c441107..ca90c04eb841 100644
return; return;
} }
print_preview_context_.InitWithFrame(frame); print_preview_context_.InitWithFrame(frame);
@@ -1429,6 +1422,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { @@ -1426,6 +1419,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME); : PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
} }
@ -353,7 +353,7 @@ index 89d54c441107..ca90c04eb841 100644
void PrintRenderFrameHelper::OnClosePrintPreviewDialog() { void PrintRenderFrameHelper::OnClosePrintPreviewDialog() {
print_preview_context_.source_frame()->DispatchAfterPrintEvent(); print_preview_context_.source_frame()->DispatchAfterPrintEvent();
} }
@@ -1516,11 +1510,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { @@ -1513,11 +1507,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
print_node_in_progress_ = true; print_node_in_progress_ = true;
@ -366,7 +366,7 @@ index 89d54c441107..ca90c04eb841 100644
} else { } else {
// Make a copy of the node, in case RenderView::OnContextMenuClosed() resets // Make a copy of the node, in case RenderView::OnContextMenuClosed() resets
// its |context_menu_node_|. // its |context_menu_node_|.
@@ -1596,13 +1588,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, @@ -1593,13 +1585,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
int cookie = int cookie =
print_pages_params_ ? print_pages_params_->params.document_cookie : 0; print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
@ -380,7 +380,7 @@ index 89d54c441107..ca90c04eb841 100644
switch (result) { switch (result) {
case OK: case OK:
break; break;
@@ -1617,7 +1607,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { @@ -1614,7 +1604,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
} }
break; break;
@ -388,7 +388,7 @@ index 89d54c441107..ca90c04eb841 100644
case FAIL_PREVIEW: case FAIL_PREVIEW:
if (!is_print_ready_metafile_sent_) { if (!is_print_ready_metafile_sent_) {
if (notify_browser_of_print_failure_) { if (notify_browser_of_print_failure_) {
@@ -1635,7 +1624,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { @@ -1632,7 +1621,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
cookie, ids)); cookie, ids));
print_preview_context_.Failed(false); print_preview_context_.Failed(false);
break; break;
@ -396,7 +396,7 @@ index 89d54c441107..ca90c04eb841 100644
} }
prep_frame_view_.reset(); prep_frame_view_.reset();
print_pages_params_.reset(); print_pages_params_.reset();
@@ -1807,7 +1795,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, @@ -1804,7 +1792,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
return true; return true;
} }
@ -404,7 +404,7 @@ index 89d54c441107..ca90c04eb841 100644
bool PrintRenderFrameHelper::SetOptionsFromPdfDocument( bool PrintRenderFrameHelper::SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options) { PrintHostMsg_SetOptionsFromDocument_Params* options) {
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame(); blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
@@ -1901,7 +1888,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( @@ -1897,7 +1884,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings(
print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS); print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS);
return false; return false;
} }
@ -412,7 +412,7 @@ index 89d54c441107..ca90c04eb841 100644
void PrintRenderFrameHelper::GetPrintSettingsFromUser( void PrintRenderFrameHelper::GetPrintSettingsFromUser(
blink::WebLocalFrame* frame, blink::WebLocalFrame* frame,
@@ -2058,7 +2044,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( @@ -2054,7 +2040,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem(
return true; return true;
} }
@ -420,7 +420,7 @@ index 89d54c441107..ca90c04eb841 100644
void PrintRenderFrameHelper::ShowScriptedPrintPreview() { void PrintRenderFrameHelper::ShowScriptedPrintPreview() {
if (is_scripted_preview_delayed_) { if (is_scripted_preview_delayed_) {
is_scripted_preview_delayed_ = false; is_scripted_preview_delayed_ = false;
@@ -2184,7 +2169,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( @@ -2180,7 +2165,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params, ids)); Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params, ids));
return true; return true;
} }
@ -429,10 +429,10 @@ index 89d54c441107..ca90c04eb841 100644
PrintRenderFrameHelper::PrintPreviewContext::PrintPreviewContext() = default; PrintRenderFrameHelper::PrintPreviewContext::PrintPreviewContext() = default;
diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h
index 947ab972c1ef..e3bb2c2efab4 100644 index d09db4d500ca..83d265cf503e 100644
--- components/printing/renderer/print_render_frame_helper.h --- components/printing/renderer/print_render_frame_helper.h
+++ components/printing/renderer/print_render_frame_helper.h +++ components/printing/renderer/print_render_frame_helper.h
@@ -149,10 +149,8 @@ class PrintRenderFrameHelper @@ -150,10 +150,8 @@ class PrintRenderFrameHelper
OK, OK,
FAIL_PRINT_INIT, FAIL_PRINT_INIT,
FAIL_PRINT, FAIL_PRINT,
@ -443,7 +443,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644
}; };
// These values are persisted to logs. Entries should not be renumbered and // These values are persisted to logs. Entries should not be renumbered and
@@ -188,9 +186,9 @@ class PrintRenderFrameHelper @@ -189,9 +187,9 @@ class PrintRenderFrameHelper
// Message handlers --------------------------------------------------------- // Message handlers ---------------------------------------------------------
void OnPrintPages(); void OnPrintPages();
void OnPrintForSystemDialog(); void OnPrintForSystemDialog();
@ -454,7 +454,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644
void OnClosePrintPreviewDialog(); void OnClosePrintPreviewDialog();
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
void OnPrintFrameContent(const PrintMsg_PrintFrame_Params& params); void OnPrintFrameContent(const PrintMsg_PrintFrame_Params& params);
@@ -206,7 +204,6 @@ class PrintRenderFrameHelper @@ -207,7 +205,6 @@ class PrintRenderFrameHelper
// Update |ignore_css_margins_| based on settings. // Update |ignore_css_margins_| based on settings.
void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings); void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings);
@ -462,7 +462,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644
// Prepare frame for creating preview document. // Prepare frame for creating preview document.
void PrepareFrameForPreviewDocument(); void PrepareFrameForPreviewDocument();
@@ -226,7 +223,6 @@ class PrintRenderFrameHelper @@ -227,7 +224,6 @@ class PrintRenderFrameHelper
// Helper method to calculate the scale factor for fit-to-page. // Helper method to calculate the scale factor for fit-to-page.
int GetFitToPageScaleFactor(const gfx::Rect& printable_area_in_points); int GetFitToPageScaleFactor(const gfx::Rect& printable_area_in_points);
@ -470,7 +470,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644
// Enable/Disable printing. // Enable/Disable printing.
void OnSetPrintingEnabled(bool enabled); void OnSetPrintingEnabled(bool enabled);
@@ -254,7 +250,6 @@ class PrintRenderFrameHelper @@ -255,7 +251,6 @@ class PrintRenderFrameHelper
const blink::WebNode& node, const blink::WebNode& node,
int* number_of_pages); int* number_of_pages);
@ -478,7 +478,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644
// Set options for print preset from source PDF document. // Set options for print preset from source PDF document.
bool SetOptionsFromPdfDocument( bool SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options); PrintHostMsg_SetOptionsFromDocument_Params* options);
@@ -265,7 +260,6 @@ class PrintRenderFrameHelper @@ -266,7 +261,6 @@ class PrintRenderFrameHelper
bool UpdatePrintSettings(blink::WebLocalFrame* frame, bool UpdatePrintSettings(blink::WebLocalFrame* frame,
const blink::WebNode& node, const blink::WebNode& node,
const base::DictionaryValue& passed_job_settings); const base::DictionaryValue& passed_job_settings);
@ -486,7 +486,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644
// Get final print settings from the user. // Get final print settings from the user.
// WARNING: |this| may be gone after this method returns. // WARNING: |this| may be gone after this method returns.
@@ -350,7 +344,6 @@ class PrintRenderFrameHelper @@ -348,7 +342,6 @@ class PrintRenderFrameHelper
bool IsScriptInitiatedPrintAllowed(blink::WebLocalFrame* frame, bool IsScriptInitiatedPrintAllowed(blink::WebLocalFrame* frame,
bool user_initiated); bool user_initiated);
@ -494,15 +494,15 @@ index 947ab972c1ef..e3bb2c2efab4 100644
// Shows scripted print preview when options from plugin are available. // Shows scripted print preview when options from plugin are available.
void ShowScriptedPrintPreview(); void ShowScriptedPrintPreview();
@@ -369,7 +362,6 @@ class PrintRenderFrameHelper @@ -367,7 +360,6 @@ class PrintRenderFrameHelper
// Returns true if print preview should continue, false on failure. // Returns true if print preview should continue, false on failure.
bool PreviewPageRendered(int page_number, bool PreviewPageRendered(int page_number,
std::unique_ptr<PdfMetafileSkia> metafile); std::unique_ptr<MetafileSkia> metafile);
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings); void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings);
@@ -523,6 +515,7 @@ class PrintRenderFrameHelper @@ -521,6 +513,7 @@ class PrintRenderFrameHelper
ScriptingThrottler scripting_throttler_; ScriptingThrottler scripting_throttler_;
bool print_node_in_progress_ = false; bool print_node_in_progress_ = false;

View File

@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 881bb2117f4c..b949c81e3ef4 100644 index 126b857e541b..86dccf223b0a 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc --- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -718,10 +718,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { @@ -718,10 +718,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const {
@ -19,7 +19,7 @@ index 881bb2117f4c..b949c81e3ef4 100644
} }
void RenderWidgetHostViewAura::WindowTitleChanged() { void RenderWidgetHostViewAura::WindowTitleChanged() {
@@ -1921,6 +1923,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { @@ -1932,6 +1934,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
if (frame_sink_id_.is_valid()) if (frame_sink_id_.is_valid())
window_->SetEmbedFrameSinkId(frame_sink_id_); window_->SetEmbedFrameSinkId(frame_sink_id_);
@ -32,6 +32,6 @@ index 881bb2117f4c..b949c81e3ef4 100644
+ ignore_result(rvh->GetWebkitPreferences()); + ignore_result(rvh->GetWebkitPreferences());
+ } + }
+ +
if (features::IsAshInBrowserProcess()) if (!features::IsUsingWindowService())
return; return;

View File

@ -96,51 +96,48 @@ index 2907619549ba..f941fba363b5 100644
SupervisedUserSettingsServiceFactory>; SupervisedUserSettingsServiceFactory>;
SupervisedUserSettingsServiceFactory(); SupervisedUserSettingsServiceFactory();
diff --git chrome/browser/ui/prefs/prefs_tab_helper.cc chrome/browser/ui/prefs/prefs_tab_helper.cc diff --git chrome/browser/ui/prefs/pref_watcher.cc chrome/browser/ui/prefs/pref_watcher.cc
index 7e3591ae2f28..55f0d4ce1e28 100644 index e38f8c50b10f..3b486f3b8daf 100644
--- chrome/browser/ui/prefs/prefs_tab_helper.cc --- chrome/browser/ui/prefs/pref_watcher.cc
+++ chrome/browser/ui/prefs/prefs_tab_helper.cc +++ chrome/browser/ui/prefs/pref_watcher.cc
@@ -11,8 +11,8 @@ @@ -46,6 +46,9 @@ const char* const kWebPrefsToObserve[] = {
#include <string>
const int kWebPrefsToObserveLength = base::size(kWebPrefsToObserve);
+base::LazyInstance<PrefWatcherFactory>::Leaky g_pref_watcher_factory =
+ LAZY_INSTANCE_INITIALIZER;
+
} // namespace
// Watching all these settings per tab is slow when a user has a lot of tabs and
@@ -124,7 +127,7 @@ PrefWatcher* PrefWatcherFactory::GetForProfile(Profile* profile) {
// static
PrefWatcherFactory* PrefWatcherFactory::GetInstance() {
- return base::Singleton<PrefWatcherFactory>::get();
+ return g_pref_watcher_factory.Pointer();
}
PrefWatcherFactory::PrefWatcherFactory()
diff --git chrome/browser/ui/prefs/pref_watcher.h chrome/browser/ui/prefs/pref_watcher.h
index 061ca27681fa..0538f62f3f25 100644
--- chrome/browser/ui/prefs/pref_watcher.h
+++ chrome/browser/ui/prefs/pref_watcher.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_PREFS_PREF_WATCHER_H_
#define CHROME_BROWSER_UI_PREFS_PREF_WATCHER_H_
#include "base/command_line.h"
+#include "base/lazy_instance.h"
#include "base/macros.h"
-#include "base/memory/singleton.h" -#include "base/memory/singleton.h"
#include "base/strings/string_number_conversions.h" +#include "base/lazy_instance.h"
#include "base/strings/string_util.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
#include "base/strings/stringprintf.h" #include "components/keyed_service/core/keyed_service.h"
@@ -387,12 +387,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory { #include "components/prefs/pref_change_registrar.h"
GetInstance()->GetServiceForBrowserContext(profile, true)); @@ -58,7 +58,7 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
} static PrefWatcherFactory* GetInstance();
- static PrefWatcherFactory* GetInstance() {
- return base::Singleton<PrefWatcherFactory>::get();
- }
+ static PrefWatcherFactory* GetInstance();
private: private:
- friend struct base::DefaultSingletonTraits<PrefWatcherFactory>; - friend struct base::DefaultSingletonTraits<PrefWatcherFactory>;
+ friend struct base::LazyInstanceTraitsBase<PrefWatcherFactory>; + friend struct base::LazyInstanceTraitsBase<PrefWatcherFactory>;
PrefWatcherFactory() : BrowserContextKeyedServiceFactory( PrefWatcherFactory();
"PrefWatcher", ~PrefWatcherFactory() override;
@@ -413,6 +411,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
}
};
+namespace {
+
+base::LazyInstance<PrefWatcherFactory>::Leaky g_pref_watcher_factory =
+ LAZY_INSTANCE_INITIALIZER;
+
+} // namespace
+
+// static
+PrefWatcherFactory* PrefWatcherFactory::GetInstance() {
+ return g_pref_watcher_factory.Pointer();
+}
+
// static
PrefWatcher* PrefWatcher::Get(Profile* profile) {
return PrefWatcherFactory::GetForProfile(profile);

View File

@ -1,5 +1,5 @@
diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc
index f33713440f4f..f5cb6cd28a08 100644 index d95dcaf34949..5794a5fdf506 100644
--- content/browser/appcache/appcache_internals_ui.cc --- content/browser/appcache/appcache_internals_ui.cc
+++ content/browser/appcache/appcache_internals_ui.cc +++ content/browser/appcache/appcache_internals_ui.cc
@@ -375,8 +375,8 @@ void AppCacheInternalsUI::CreateProxyForPartition( @@ -375,8 +375,8 @@ void AppCacheInternalsUI::CreateProxyForPartition(
@ -14,10 +14,10 @@ index f33713440f4f..f5cb6cd28a08 100644
} }
diff --git content/browser/background_fetch/background_fetch_service_impl.cc content/browser/background_fetch/background_fetch_service_impl.cc diff --git content/browser/background_fetch/background_fetch_service_impl.cc content/browser/background_fetch/background_fetch_service_impl.cc
index 6aa5ad29416a..77f7edfa51fe 100644 index f116ff5aad35..73544f3181d6 100644
--- content/browser/background_fetch/background_fetch_service_impl.cc --- content/browser/background_fetch/background_fetch_service_impl.cc
+++ content/browser/background_fetch/background_fetch_service_impl.cc +++ content/browser/background_fetch/background_fetch_service_impl.cc
@@ -39,8 +39,7 @@ void BackgroundFetchServiceImpl::Create( @@ -42,8 +42,7 @@ void BackgroundFetchServiceImpl::CreateForWorker(
BrowserThread::IO, FROM_HERE, BrowserThread::IO, FROM_HERE,
base::BindOnce( base::BindOnce(
BackgroundFetchServiceImpl::CreateOnIoThread, BackgroundFetchServiceImpl::CreateOnIoThread,
@ -25,8 +25,18 @@ index 6aa5ad29416a..77f7edfa51fe 100644
- render_process_host->GetStoragePartition()) - render_process_host->GetStoragePartition())
+ WrapRefCounted(render_process_host->GetStoragePartition() + WrapRefCounted(render_process_host->GetStoragePartition()
->GetBackgroundFetchContext()), ->GetBackgroundFetchContext()),
origin, std::move(request))); origin, nullptr /* render_frame_host */, std::move(request)));
} }
@@ -64,8 +63,7 @@ void BackgroundFetchServiceImpl::CreateForFrame(
BrowserThread::IO, FROM_HERE,
base::BindOnce(
BackgroundFetchServiceImpl::CreateOnIoThread,
- WrapRefCounted(static_cast<StoragePartitionImpl*>(
- render_process_host->GetStoragePartition())
+ WrapRefCounted(render_process_host->GetStoragePartition()
->GetBackgroundFetchContext()),
render_frame_host->GetLastCommittedOrigin(), render_frame_host,
std::move(request)));
diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc
index 203e9c7e94a9..b4260e27ae6a 100644 index 203e9c7e94a9..b4260e27ae6a 100644
--- content/browser/blob_storage/chrome_blob_storage_context.cc --- content/browser/blob_storage/chrome_blob_storage_context.cc
@ -241,10 +251,10 @@ index 37cabf2c9ffa..a5165fdbfdf6 100644
CreateDownloadURLLoaderFactoryGetter(storage_partition, rfh, true); CreateDownloadURLLoaderFactoryGetter(storage_partition, rfh, true);
} }
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index c0948b6588ee..38d1b0ae64e2 100644 index d9034953e7f8..0e7c34daa4f8 100644
--- content/browser/loader/navigation_url_loader_impl.cc --- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc
@@ -1068,7 +1068,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController @@ -1131,7 +1131,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
// path does as well for navigations. // path does as well for navigations.
bool has_plugin = PluginService::GetInstance()->GetPluginInfo( bool has_plugin = PluginService::GetInstance()->GetPluginInfo(
-1 /* render_process_id */, -1 /* render_frame_id */, resource_context_, -1 /* render_process_id */, -1 /* render_frame_id */, resource_context_,
@ -253,10 +263,10 @@ index c0948b6588ee..38d1b0ae64e2 100644
false /* allow_wildcard */, &stale, &plugin, nullptr); false /* allow_wildcard */, &stale, &plugin, nullptr);
if (stale) { if (stale) {
@@ -1417,7 +1417,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( @@ -1495,7 +1495,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl(
network::mojom::URLLoaderFactoryPtrInfo proxied_factory_info; network::mojom::URLLoaderFactoryPtrInfo proxied_factory_info;
network::mojom::URLLoaderFactoryRequest proxied_factory_request; network::mojom::URLLoaderFactoryRequest proxied_factory_request;
scoped_refptr<RedirectChecker> redirect_checker; bool bypass_redirect_checks = false;
- auto* partition = static_cast<StoragePartitionImpl*>(storage_partition); - auto* partition = static_cast<StoragePartitionImpl*>(storage_partition);
+ auto* partition = storage_partition; + auto* partition = storage_partition;
if (frame_tree_node) { if (frame_tree_node) {
@ -309,10 +319,10 @@ index 3cfa0bde2bca..96da49496944 100644
partition->GetPaymentAppContext(); partition->GetPaymentAppContext();
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
index 3dcc6e5c2d38..90180d0cfbbb 100644 index 989b52793c48..a9c5e6c9755b 100644
--- content/browser/renderer_host/render_process_host_impl.cc --- content/browser/renderer_host/render_process_host_impl.cc
+++ content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc
@@ -735,11 +735,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, @@ -739,11 +739,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
// Gets the correct render process to use for this SiteInstance. // Gets the correct render process to use for this SiteInstance.
RenderProcessHost* GetProcessHost(SiteInstance* site_instance, RenderProcessHost* GetProcessHost(SiteInstance* site_instance,
bool is_for_guests_only) { bool is_for_guests_only) {
@ -328,7 +338,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
// Is this the default storage partition? If it isn't, then just give it its // Is this the default storage partition? If it isn't, then just give it its
// own non-shared process. // own non-shared process.
@@ -1343,7 +1342,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { @@ -1474,7 +1473,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() {
// static // static
RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
BrowserContext* browser_context, BrowserContext* browser_context,
@ -337,7 +347,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
SiteInstance* site_instance, SiteInstance* site_instance,
bool is_for_guests_only) { bool is_for_guests_only) {
if (g_render_process_host_factory_) { if (g_render_process_host_factory_) {
@@ -1352,8 +1351,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( @@ -1483,8 +1482,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
} }
if (!storage_partition_impl) { if (!storage_partition_impl) {
@ -348,7 +358,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
} }
// If we've made a StoragePartition for guests (e.g., for the <webview> tag), // If we've made a StoragePartition for guests (e.g., for the <webview> tag),
// stash the Site URL on it. This way, when we start a service worker inside // stash the Site URL on it. This way, when we start a service worker inside
@@ -1378,7 +1377,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = @@ -1509,7 +1508,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority =
RenderProcessHostImpl::RenderProcessHostImpl( RenderProcessHostImpl::RenderProcessHostImpl(
BrowserContext* browser_context, BrowserContext* browser_context,
@ -357,7 +367,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
bool is_for_guests_only) bool is_for_guests_only)
: fast_shutdown_started_(false), : fast_shutdown_started_(false),
deleting_soon_(false), deleting_soon_(false),
@@ -1412,10 +1411,12 @@ RenderProcessHostImpl::RenderProcessHostImpl( @@ -1562,10 +1561,12 @@ RenderProcessHostImpl::RenderProcessHostImpl(
indexed_db_factory_(new IndexedDBDispatcherHost( indexed_db_factory_(new IndexedDBDispatcherHost(
id_, id_,
storage_partition_impl_->GetURLRequestContext(), storage_partition_impl_->GetURLRequestContext(),
@ -372,7 +382,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
id_)), id_)),
channel_connected_(false), channel_connected_(false),
sent_render_process_ready_(false), sent_render_process_ready_(false),
@@ -1450,7 +1451,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( @@ -1600,7 +1601,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
} }
push_messaging_manager_.reset(new PushMessagingManager( push_messaging_manager_.reset(new PushMessagingManager(
@ -382,7 +392,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
AddObserver(indexed_db_factory_.get()); AddObserver(indexed_db_factory_.get());
AddObserver(service_worker_dispatcher_host_.get()); AddObserver(service_worker_dispatcher_host_.get());
@@ -1783,6 +1785,17 @@ void RenderProcessHostImpl::ResetChannelProxy() { @@ -1936,6 +1938,17 @@ void RenderProcessHostImpl::ResetChannelProxy() {
void RenderProcessHostImpl::CreateMessageFilters() { void RenderProcessHostImpl::CreateMessageFilters() {
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
@ -400,7 +410,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
MediaInternals* media_internals = MediaInternals::GetInstance(); MediaInternals* media_internals = MediaInternals::GetInstance();
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
// from guests. // from guests.
@@ -1797,7 +1810,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1950,7 +1963,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
base::MakeRefCounted<RenderMessageFilter>( base::MakeRefCounted<RenderMessageFilter>(
GetID(), GetBrowserContext(), request_context.get(), GetID(), GetBrowserContext(), request_context.get(),
widget_helper_.get(), media_internals, widget_helper_.get(), media_internals,
@ -409,7 +419,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
storage_partition_impl_->GetGeneratedCodeCacheContext()); storage_partition_impl_->GetGeneratedCodeCacheContext());
AddFilter(render_message_filter.get()); AddFilter(render_message_filter.get());
@@ -1825,10 +1838,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1978,10 +1991,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
ChromeBlobStorageContext::GetFor(browser_context); ChromeBlobStorageContext::GetFor(browser_context);
resource_message_filter_ = new ResourceMessageFilter( resource_message_filter_ = new ResourceMessageFilter(
@ -422,7 +432,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
storage_partition_impl_->GetPrefetchURLLoaderService(), storage_partition_impl_->GetPrefetchURLLoaderService(),
std::move(get_contexts_callback), std::move(get_contexts_callback),
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
@@ -1837,8 +1850,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1990,8 +2003,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter( AddFilter(
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service())); new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service()));
@ -432,7 +442,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID());
AddFilter(peer_connection_tracker_host_.get()); AddFilter(peer_connection_tracker_host_.get());
@@ -1859,10 +1871,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -2008,10 +2020,6 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(new TraceMessageFilter(GetID())); AddFilter(new TraceMessageFilter(GetID()));
AddFilter(new ResolveProxyMsgHelper(GetID())); AddFilter(new ResolveProxyMsgHelper(GetID()));
@ -443,7 +453,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
} }
void RenderProcessHostImpl::BindCacheStorage( void RenderProcessHostImpl::BindCacheStorage(
@@ -1874,7 +1882,8 @@ void RenderProcessHostImpl::BindCacheStorage( @@ -2023,7 +2031,8 @@ void RenderProcessHostImpl::BindCacheStorage(
cache_storage_dispatcher_host_ = cache_storage_dispatcher_host_ =
base::MakeRefCounted<CacheStorageDispatcherHost>(); base::MakeRefCounted<CacheStorageDispatcherHost>();
cache_storage_dispatcher_host_->Init( cache_storage_dispatcher_host_->Init(
@ -453,7 +463,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
} }
// Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO // Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO
// thread entirely. // thread entirely.
@@ -2031,7 +2040,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { @@ -2198,7 +2207,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
registry->AddInterface(base::BindRepeating( registry->AddInterface(base::BindRepeating(
&AppCacheDispatcherHost::Create, &AppCacheDispatcherHost::Create,
@ -463,7 +473,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
GetID())); GetID()));
AddUIThreadInterface( AddUIThreadInterface(
@@ -2068,6 +2078,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { @@ -2235,6 +2245,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
plugin_registry_.reset( plugin_registry_.reset(
new PluginRegistryImpl(GetBrowserContext()->GetResourceContext())); new PluginRegistryImpl(GetBrowserContext()->GetResourceContext()));
} }
@ -474,10 +484,10 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644
&PluginRegistryImpl::Bind, base::Unretained(plugin_registry_.get()))); &PluginRegistryImpl::Bind, base::Unretained(plugin_registry_.get())));
#endif #endif
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
index 607eefb29440..c465d03b6373 100644 index 37bc9b79afd7..ed496b1c7439 100644
--- content/browser/renderer_host/render_process_host_impl.h --- content/browser/renderer_host/render_process_host_impl.h
+++ content/browser/renderer_host/render_process_host_impl.h +++ content/browser/renderer_host/render_process_host_impl.h
@@ -92,7 +92,6 @@ class ServiceWorkerDispatcherHost; @@ -97,7 +97,6 @@ class ServiceWorkerDispatcherHost;
class SiteInstance; class SiteInstance;
class SiteInstanceImpl; class SiteInstanceImpl;
class StoragePartition; class StoragePartition;
@ -485,7 +495,7 @@ index 607eefb29440..c465d03b6373 100644
struct ChildProcessTerminationInfo; struct ChildProcessTerminationInfo;
typedef base::Thread* (*RendererMainThreadFactoryFunction)( typedef base::Thread* (*RendererMainThreadFactoryFunction)(
@@ -135,7 +134,7 @@ class CONTENT_EXPORT RenderProcessHostImpl @@ -140,7 +139,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
// null. // null.
static RenderProcessHost* CreateRenderProcessHost( static RenderProcessHost* CreateRenderProcessHost(
BrowserContext* browser_context, BrowserContext* browser_context,
@ -494,7 +504,7 @@ index 607eefb29440..c465d03b6373 100644
SiteInstance* site_instance, SiteInstance* site_instance,
bool is_for_guests_only); bool is_for_guests_only);
@@ -445,7 +444,7 @@ class CONTENT_EXPORT RenderProcessHostImpl @@ -484,7 +483,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
// Use CreateRenderProcessHost() instead of calling this constructor // Use CreateRenderProcessHost() instead of calling this constructor
// directly. // directly.
RenderProcessHostImpl(BrowserContext* browser_context, RenderProcessHostImpl(BrowserContext* browser_context,
@ -503,7 +513,7 @@ index 607eefb29440..c465d03b6373 100644
bool is_for_guests_only); bool is_for_guests_only);
// Initializes a new IPC::ChannelProxy in |channel_|, which will be connected // Initializes a new IPC::ChannelProxy in |channel_|, which will be connected
@@ -715,10 +714,10 @@ class CONTENT_EXPORT RenderProcessHostImpl @@ -753,10 +752,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
// called. // called.
int instance_id_ = 1; int instance_id_ = 1;
@ -515,9 +525,9 @@ index 607eefb29440..c465d03b6373 100644
+ StoragePartition* storage_partition_impl_; + StoragePartition* storage_partition_impl_;
// The observers watching our lifetime. // The observers watching our lifetime.
base::ObserverList<RenderProcessHostObserver> observers_; base::ObserverList<RenderProcessHostObserver>::Unchecked observers_;
diff --git content/browser/renderer_interface_binders.cc content/browser/renderer_interface_binders.cc diff --git content/browser/renderer_interface_binders.cc content/browser/renderer_interface_binders.cc
index 896f1b27ded7..b8d7d423e555 100644 index c3a8bdc572de..73f66acbe200 100644
--- content/browser/renderer_interface_binders.cc --- content/browser/renderer_interface_binders.cc
+++ content/browser/renderer_interface_binders.cc +++ content/browser/renderer_interface_binders.cc
@@ -139,7 +139,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { @@ -139,7 +139,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
@ -574,10 +584,10 @@ index 2fe70f50171f..98244cd5ddf8 100644
std::move(client), creation_context_type, std::move(client), creation_context_type,
blink::MessagePortChannel(std::move(message_port)), blink::MessagePortChannel(std::move(message_port)),
diff --git content/browser/shared_worker/shared_worker_service_impl.cc content/browser/shared_worker/shared_worker_service_impl.cc diff --git content/browser/shared_worker/shared_worker_service_impl.cc content/browser/shared_worker/shared_worker_service_impl.cc
index 1defce7079cc..48010c26f2b2 100644 index 51f91bdd7e2f..a67745058ed3 100644
--- content/browser/shared_worker/shared_worker_service_impl.cc --- content/browser/shared_worker/shared_worker_service_impl.cc
+++ content/browser/shared_worker/shared_worker_service_impl.cc +++ content/browser/shared_worker/shared_worker_service_impl.cc
@@ -339,8 +339,8 @@ void SharedWorkerServiceImpl::CreateWorker( @@ -344,8 +344,8 @@ void SharedWorkerServiceImpl::CreateWorker(
BrowserThread::IO, FROM_HERE, BrowserThread::IO, FROM_HERE,
base::BindOnce( base::BindOnce(
&CreateScriptLoaderOnIO, &CreateScriptLoaderOnIO,
@ -586,7 +596,7 @@ index 1defce7079cc..48010c26f2b2 100644
+ base::WrapRefCounted(service_worker_context_->storage_partition() + base::WrapRefCounted(service_worker_context_->storage_partition()
+ ->url_loader_factory_getter()), + ->url_loader_factory_getter()),
std::move(factory_bundle_for_browser), std::move(factory_bundle_for_browser),
std::move(factory_bundle_for_renderer), service_worker_context_, std::move(subresource_loader_factories), service_worker_context_,
appcache_handle_core, appcache_handle_core,
diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h
index 6f6c5c1e504a..097095a613dd 100644 index 6f6c5c1e504a..097095a613dd 100644
@ -829,7 +839,7 @@ index f55e28d79cda..297541d0a99a 100644
virtual ~StoragePartition() {} virtual ~StoragePartition() {}
}; };
diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc
index d33b70677f3c..a8a846e978f0 100644 index e18b8180bb5e..f775176238ac 100644
--- storage/browser/database/database_tracker.cc --- storage/browser/database/database_tracker.cc
+++ storage/browser/database/database_tracker.cc +++ storage/browser/database/database_tracker.cc
@@ -481,7 +481,7 @@ bool DatabaseTracker::LazyInit() { @@ -481,7 +481,7 @@ bool DatabaseTracker::LazyInit() {

View File

@ -295,10 +295,10 @@ index 9c78b30ab3a0..999eb4048f5c 100644
std::unique_ptr<SelectionController> selection_controller_; std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index ee2852fefa84..bbba1786e1a4 100644 index b4da2b5128c8..d030d6e81c19 100644
--- ui/views/controls/menu/menu_controller.cc --- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc
@@ -2430,8 +2430,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( @@ -2441,8 +2441,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item; MenuItemView* item = pending_state_.item;
@ -313,7 +313,7 @@ index ee2852fefa84..bbba1786e1a4 100644
MenuItemView* to_select = NULL; MenuItemView* to_select = NULL;
if (item->GetSubmenu()->GetMenuItemCount() > 0) if (item->GetSubmenu()->GetMenuItemCount() > 0)
to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN);
@@ -2446,8 +2451,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { @@ -2457,8 +2462,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() { void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item; MenuItemView* item = state_.item;
DCHECK(item); DCHECK(item);
@ -326,20 +326,12 @@ index ee2852fefa84..bbba1786e1a4 100644
SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); SetSelection(item, SELECTION_UPDATE_IMMEDIATELY);
else if (item->GetParentMenuItem()->GetParentMenuItem()) else if (item->GetParentMenuItem()->GetParentMenuItem())
diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h
index 4dea63f9f286..ef50b710c5af 100644 index 706605182f9a..e97d0495bc72 100644
--- ui/views/controls/menu/menu_delegate.h --- ui/views/controls/menu/menu_delegate.h
+++ ui/views/controls/menu/menu_delegate.h +++ ui/views/controls/menu/menu_delegate.h
@@ -10,6 +10,7 @@ @@ -81,6 +81,22 @@ class VIEWS_EXPORT MenuDelegate {
// parts of |style| or leave it unmodified.
#include "base/logging.h" virtual void GetLabelStyle(int id, LabelStyle* style) const;
#include "base/strings/string16.h"
+#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/ui_base_types.h"
@@ -76,6 +77,22 @@ class VIEWS_EXPORT MenuDelegate {
// it's disabled.
virtual bool GetShouldUseNormalForegroundColor(int command_id) const;
+ // Override the text color of a given menu item dependent on the |command_id| + // Override the text color of a given menu item dependent on the |command_id|
+ // and its |is_hovered| state. |is_minor| will be true for accelerator text. + // and its |is_hovered| state. |is_minor| will be true for accelerator text.
@ -360,7 +352,7 @@ index 4dea63f9f286..ef50b710c5af 100644
// The tooltip shown for the menu item. This is invoked when the user // The tooltip shown for the menu item. This is invoked when the user
// hovers over the item, and no tooltip text has been set for that item. // hovers over the item, and no tooltip text has been set for that item.
virtual base::string16 GetTooltipText(int id, virtual base::string16 GetTooltipText(int id,
@@ -208,6 +225,11 @@ class VIEWS_EXPORT MenuDelegate { @@ -213,6 +229,11 @@ class VIEWS_EXPORT MenuDelegate {
bool* has_mnemonics, bool* has_mnemonics,
MenuButton** button); MenuButton** button);
@ -373,10 +365,10 @@ index 4dea63f9f286..ef50b710c5af 100644
virtual int GetMaxWidthForMenu(MenuItemView* menu); virtual int GetMaxWidthForMenu(MenuItemView* menu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index 4ede4cb5fa04..8f4af6c91969 100644 index 6c007a1030cf..e63b03f0534c 100644
--- ui/views/controls/menu/menu_item_view.cc --- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc
@@ -914,7 +914,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { @@ -915,7 +915,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
// only need the background when we want it to look different, as when we're // only need the background when we want it to look different, as when we're
// selected. // selected.
ui::NativeTheme* native_theme = GetNativeTheme(); ui::NativeTheme* native_theme = GetNativeTheme();
@ -390,10 +382,10 @@ index 4ede4cb5fa04..8f4af6c91969 100644
gfx::Rect item_bounds(0, 0, width(), height()); gfx::Rect item_bounds(0, 0, width(), height());
if (type_ == ACTIONABLE_SUBMENU) { if (type_ == ACTIONABLE_SUBMENU) {
if (submenu_area_of_actionable_submenu_selected_) { if (submenu_area_of_actionable_submenu_selected_) {
@@ -1033,6 +1038,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { @@ -1035,6 +1040,13 @@ void MenuItemView::PaintMinorIconAndText(
SkColor MenuItemView::GetTextColor(bool minor, }
bool render_selection,
bool emphasized) const { SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const {
+ SkColor text_color; + SkColor text_color;
+ const MenuDelegate *delegate = GetDelegate(); + const MenuDelegate *delegate = GetDelegate();
+ if (delegate && delegate->GetTextColor(GetCommand(), minor, render_selection, + if (delegate && delegate->GetTextColor(GetCommand(), minor, render_selection,
@ -405,10 +397,10 @@ index 4ede4cb5fa04..8f4af6c91969 100644
minor ? ui::NativeTheme::kColorId_MenuItemMinorTextColor minor ? ui::NativeTheme::kColorId_MenuItemMinorTextColor
: ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor; : ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor;
diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc
index 784cad79f9db..0e7436792b59 100644 index cbccee16e4c7..e14173e9e832 100644
--- ui/views/controls/menu/menu_model_adapter.cc --- ui/views/controls/menu/menu_model_adapter.cc
+++ ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc
@@ -231,6 +231,77 @@ void MenuModelAdapter::SelectionChanged(MenuItemView* menu) { @@ -233,6 +233,77 @@ void MenuModelAdapter::SelectionChanged(MenuItemView* menu) {
NOTREACHED(); NOTREACHED();
} }
@ -487,7 +479,7 @@ index 784cad79f9db..0e7436792b59 100644
// Look up the menu model for this menu. // Look up the menu model for this menu.
const std::map<MenuItemView*, ui::MenuModel*>::const_iterator map_iterator = const std::map<MenuItemView*, ui::MenuModel*>::const_iterator map_iterator =
diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h
index 0ac493c3c6a0..741769e90eb0 100644 index e52edfe5edd7..ab23f3df914e 100644
--- ui/views/controls/menu/menu_model_adapter.h --- ui/views/controls/menu/menu_model_adapter.h
+++ ui/views/controls/menu/menu_model_adapter.h +++ ui/views/controls/menu/menu_model_adapter.h
@@ -76,6 +76,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate { @@ -76,6 +76,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate {
@ -543,7 +535,7 @@ index 3ec1dcbdf822..e2658cec8095 100644
// Move the cursor because EnterNotify/LeaveNotify are generated with the // Move the cursor because EnterNotify/LeaveNotify are generated with the
// current mouse position as a result of XGrabPointer() // current mouse position as a result of XGrabPointer()
diff --git ui/views/view.h ui/views/view.h diff --git ui/views/view.h ui/views/view.h
index bae6ce42102e..f02008bdc354 100644 index 4248609dd3c3..e254ce5a940a 100644
--- ui/views/view.h --- ui/views/view.h
+++ ui/views/view.h +++ ui/views/view.h
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index bb9aa275f5b4..b588f16aaa27 100644 index fae4c74c977b..b1d60ee9421b 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc --- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -480,6 +480,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { @@ -501,6 +501,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const {
return screen_info.device_scale_factor; return screen_info.device_scale_factor;
} }
@ -18,7 +18,7 @@ index bb9aa275f5b4..b588f16aaa27 100644
return renderer_frame_number_; return renderer_frame_number_;
} }
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index 922f7897e8fd..b43fdd6d55fb 100644 index 08454f68a01d..768fbb5d8f9d 100644
--- content/browser/renderer_host/render_widget_host_view_base.h --- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -83,6 +83,7 @@ class CursorManager; @@ -83,6 +83,7 @@ class CursorManager;
@ -39,7 +39,7 @@ index 922f7897e8fd..b43fdd6d55fb 100644
// Returns the focused RenderWidgetHost inside this |view|'s RWH. // Returns the focused RenderWidgetHost inside this |view|'s RWH.
RenderWidgetHostImpl* GetFocusedWidget() const; RenderWidgetHostImpl* GetFocusedWidget() const;
@@ -140,6 +144,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase @@ -141,6 +145,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
void DisableAutoResize(const gfx::Size& new_size) override; void DisableAutoResize(const gfx::Size& new_size) override;
bool IsScrollOffsetAtTop() const override; bool IsScrollOffsetAtTop() const override;
float GetDeviceScaleFactor() const final; float GetDeviceScaleFactor() const final;
@ -48,7 +48,7 @@ index 922f7897e8fd..b43fdd6d55fb 100644
TouchSelectionControllerClientManager* TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override; GetTouchSelectionControllerClientManager() override;
@@ -458,6 +464,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase @@ -471,6 +477,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
// helps to position the full screen widget on the correct monitor. // helps to position the full screen widget on the correct monitor.
virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0; virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0;
@ -61,7 +61,7 @@ index 922f7897e8fd..b43fdd6d55fb 100644
// Sets the cursor for this view to the one associated with the specified // Sets the cursor for this view to the one associated with the specified
// cursor_type. // cursor_type.
virtual void UpdateCursor(const WebCursor& cursor) = 0; virtual void UpdateCursor(const WebCursor& cursor) = 0;
@@ -644,6 +656,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase @@ -659,6 +671,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
bool use_viz_hit_test_ = false; bool use_viz_hit_test_ = false;
@ -103,10 +103,10 @@ index 940d9c107664..f7a35655c757 100644
// TODO(wjmaclean): can host_ ever be null? // TODO(wjmaclean): can host_ ever be null?
if (host_ && set_focus_on_mouse_down_or_key_event_) { if (host_ && set_focus_on_mouse_down_or_key_event_) {
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
index c4b21150bbcf..fad3d9e3ebbd 100644 index c662115a7177..1a5ca9a0b140 100644
--- content/public/browser/render_widget_host_view.h --- content/public/browser/render_widget_host_view.h
+++ content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h
@@ -253,6 +253,14 @@ class CONTENT_EXPORT RenderWidgetHostView { @@ -257,6 +257,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
// This must always return the same device scale factor as GetScreenInfo. // This must always return the same device scale factor as GetScreenInfo.
virtual float GetDeviceScaleFactor() const = 0; virtual float GetDeviceScaleFactor() const = 0;
@ -135,7 +135,7 @@ index f772f64d656e..7d13f9f81b6c 100644
return host ? host->GetAcceleratedWidget() : NULL; return host ? host->GetAcceleratedWidget() : NULL;
} }
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 9c6b588516f2..90e804d0cc68 100644 index 9ab47c863902..9d9bfecd20ba 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -87,6 +87,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin( @@ -87,6 +87,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
@ -179,10 +179,10 @@ index 9c6b588516f2..90e804d0cc68 100644
bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index 022de4037ff0..c54ef87f2f7f 100644 index 364d6df184c5..0d32a4579c87 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -284,6 +284,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -285,6 +285,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// True if the window should have the frame removed. // True if the window should have the frame removed.
bool remove_standard_frame_; bool remove_standard_frame_;
@ -194,7 +194,7 @@ index 022de4037ff0..c54ef87f2f7f 100644
// a reference. // a reference.
corewm::TooltipWin* tooltip_; corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 22a9914957a7..d315f07eca5e 100644 index 590de782aca3..e87ee9935760 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -145,6 +145,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( @@ -145,6 +145,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@ -232,7 +232,7 @@ index 22a9914957a7..d315f07eca5e 100644
xwindow_ = x11::None; xwindow_ = x11::None;
desktop_native_widget_aura_->OnHostClosed(); desktop_native_widget_aura_->OnHostClosed();
@@ -645,6 +650,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement( @@ -646,6 +651,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
} }
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const { gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
@ -241,7 +241,7 @@ index 22a9914957a7..d315f07eca5e 100644
return ToDIPRect(bounds_in_pixels_); return ToDIPRect(bounds_in_pixels_);
} }
@@ -1270,6 +1277,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels( @@ -1271,6 +1278,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
} }
gfx::Point DesktopWindowTreeHostX11::GetLocationOnScreenInPixels() const { gfx::Point DesktopWindowTreeHostX11::GetLocationOnScreenInPixels() const {
@ -250,7 +250,7 @@ index 22a9914957a7..d315f07eca5e 100644
return bounds_in_pixels_.origin(); return bounds_in_pixels_.origin();
} }
@@ -1414,7 +1423,6 @@ void DesktopWindowTreeHostX11::InitX11Window( @@ -1415,7 +1424,6 @@ void DesktopWindowTreeHostX11::InitX11Window(
::Atom window_type; ::Atom window_type;
switch (params.type) { switch (params.type) {
case Widget::InitParams::TYPE_MENU: case Widget::InitParams::TYPE_MENU:
@ -258,7 +258,7 @@ index 22a9914957a7..d315f07eca5e 100644
window_type = gfx::GetAtom("_NET_WM_WINDOW_TYPE_MENU"); window_type = gfx::GetAtom("_NET_WM_WINDOW_TYPE_MENU");
break; break;
case Widget::InitParams::TYPE_TOOLTIP: case Widget::InitParams::TYPE_TOOLTIP:
@@ -1470,9 +1478,15 @@ void DesktopWindowTreeHostX11::InitX11Window( @@ -1471,9 +1479,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
attribute_mask |= CWBorderPixel; attribute_mask |= CWBorderPixel;
swa.border_pixel = 0; swa.border_pixel = 0;
@ -275,7 +275,7 @@ index 22a9914957a7..d315f07eca5e 100644
bounds_in_pixels_.y(), bounds_in_pixels_.width(), bounds_in_pixels_.y(), bounds_in_pixels_.width(),
bounds_in_pixels_.height(), bounds_in_pixels_.height(),
0, // border width 0, // border width
@@ -2088,6 +2102,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( @@ -2089,6 +2103,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
} }
break; break;
} }
@ -287,7 +287,7 @@ index 22a9914957a7..d315f07eca5e 100644
case x11::FocusOut: case x11::FocusOut:
OnFocusEvent(xev->type == x11::FocusIn, event->xfocus.mode, OnFocusEvent(xev->type == x11::FocusIn, event->xfocus.mode,
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index c5e6df7ce811..8648b49b5753 100644 index 5a0a3086545a..531619b16213 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -91,6 +91,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 @@ -91,6 +91,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@ -324,7 +324,7 @@ index c5e6df7ce811..8648b49b5753 100644
DesktopDragDropClientAuraX11* drag_drop_client_; DesktopDragDropClientAuraX11* drag_drop_client_;
std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_; std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
@@ -453,6 +466,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 @@ -454,6 +467,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
uint32_t modal_dialog_counter_; uint32_t modal_dialog_counter_;
@ -335,10 +335,10 @@ index c5e6df7ce811..8648b49b5753 100644
base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_; base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_;
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index a4a01235a2cd..a3ffe1c16270 100644 index 5ad48b616fa3..3abbf674ee23 100644
--- ui/views/widget/widget.cc --- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc +++ ui/views/widget/widget.cc
@@ -132,6 +132,7 @@ Widget::InitParams::InitParams(Type type) @@ -137,6 +137,7 @@ Widget::InitParams::InitParams(Type type)
use_system_default_icon(false), use_system_default_icon(false),
show_state(ui::SHOW_STATE_DEFAULT), show_state(ui::SHOW_STATE_DEFAULT),
parent(nullptr), parent(nullptr),
@ -346,7 +346,7 @@ index a4a01235a2cd..a3ffe1c16270 100644
native_widget(nullptr), native_widget(nullptr),
desktop_window_tree_host(nullptr), desktop_window_tree_host(nullptr),
layer_type(ui::LAYER_TEXTURED), layer_type(ui::LAYER_TEXTURED),
@@ -306,7 +307,7 @@ void Widget::Init(const InitParams& in_params) { @@ -311,7 +312,7 @@ void Widget::Init(const InitParams& in_params) {
params.name = params.delegate->GetContentsView()->GetClassName(); params.name = params.delegate->GetContentsView()->GetClassName();
params.child |= (params.type == InitParams::TYPE_CONTROL); params.child |= (params.type == InitParams::TYPE_CONTROL);
@ -355,7 +355,7 @@ index a4a01235a2cd..a3ffe1c16270 100644
if (params.opacity == views::Widget::InitParams::INFER_OPACITY && if (params.opacity == views::Widget::InitParams::INFER_OPACITY &&
params.type != views::Widget::InitParams::TYPE_WINDOW && params.type != views::Widget::InitParams::TYPE_WINDOW &&
@@ -373,7 +374,12 @@ void Widget::Init(const InitParams& in_params) { @@ -376,7 +377,12 @@ void Widget::Init(const InitParams& in_params) {
} }
} else if (params.delegate) { } else if (params.delegate) {
SetContentsView(params.delegate->GetContentsView()); SetContentsView(params.delegate->GetContentsView());
@ -369,7 +369,7 @@ index a4a01235a2cd..a3ffe1c16270 100644
} }
// This must come after SetContentsView() or it might not be able to find // This must come after SetContentsView() or it might not be able to find
// the correct NativeTheme (on Linux). See http://crbug.com/384492 // the correct NativeTheme (on Linux). See http://crbug.com/384492
@@ -1099,10 +1105,16 @@ void Widget::OnNativeWidgetDestroyed() { @@ -1112,10 +1118,16 @@ void Widget::OnNativeWidgetDestroyed() {
} }
gfx::Size Widget::GetMinimumSize() const { gfx::Size Widget::GetMinimumSize() const {
@ -387,10 +387,10 @@ index a4a01235a2cd..a3ffe1c16270 100644
} }
diff --git ui/views/widget/widget.h ui/views/widget/widget.h diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index c92fd03abc31..f787d9892508 100644 index 2efbe5c4d899..de6ff73cf676 100644
--- ui/views/widget/widget.h --- ui/views/widget/widget.h
+++ ui/views/widget/widget.h +++ ui/views/widget/widget.h
@@ -249,6 +249,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -250,6 +250,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// Whether the widget should be maximized or minimized. // Whether the widget should be maximized or minimized.
ui::WindowShowState show_state; ui::WindowShowState show_state;
gfx::NativeView parent; gfx::NativeView parent;
@ -399,7 +399,7 @@ index c92fd03abc31..f787d9892508 100644
// the NativeWidget may specify a default size. If the parent is specified, // the NativeWidget may specify a default size. If the parent is specified,
// |bounds| is in the parent's coordinate system. If the parent is not // |bounds| is in the parent's coordinate system. If the parent is not
diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h
index c1cfaebc4172..b9ee0751189d 100644 index 5e394416c1ee..65c61cc29d23 100644
--- ui/views/widget/widget_delegate.h --- ui/views/widget/widget_delegate.h
+++ ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h
@@ -183,6 +183,10 @@ class VIEWS_EXPORT WidgetDelegate { @@ -183,6 +183,10 @@ class VIEWS_EXPORT WidgetDelegate {
@ -427,10 +427,10 @@ index c7296fed234d..244d0034a1c4 100644
if (native_widget_delegate->IsDialogBox()) { if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME; *style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index 4b7af541276d..8269cb4990f3 100644 index 54eb0fcd0bf7..f2a661e55176 100644
--- ui/views/win/hwnd_message_handler.cc --- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc
@@ -2872,10 +2872,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, @@ -2868,10 +2868,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
} else if (event.type() == ui::ET_MOUSEWHEEL) { } else if (event.type() == ui::ET_MOUSEWHEEL) {
ui::MouseWheelEvent mouse_wheel_event(msg); ui::MouseWheelEvent mouse_wheel_event(msg);
// Reroute the mouse wheel to the window under the pointer if applicable. // Reroute the mouse wheel to the window under the pointer if applicable.

View File

@ -1,12 +1,12 @@
diff --git chrome/browser/vr/BUILD.gn chrome/browser/vr/BUILD.gn diff --git chrome/browser/vr/BUILD.gn chrome/browser/vr/BUILD.gn
index 728d038d804f..744d1bf2725e 100644 index edcf5ac5dfce..f4003294f2d0 100644
--- chrome/browser/vr/BUILD.gn --- chrome/browser/vr/BUILD.gn
+++ chrome/browser/vr/BUILD.gn +++ chrome/browser/vr/BUILD.gn
@@ -356,6 +356,7 @@ source_set("vr_base") { @@ -350,6 +350,7 @@ source_set("vr_base") {
] ]
deps = [ deps = [
+ ":vr_build_features", + ":vr_build_features",
"//base", "//base",
"//chrome/app:generated_resources",
"//components/rappor:rappor", "//components/rappor:rappor",
"//components/ukm/content",

View File

@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index df8c751f12b0..bdcc0dd5c957 100644 index 36dab1bdee1d..27a1c1cbe0c8 100644
--- content/browser/web_contents/web_contents_impl.cc --- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc
@@ -1935,21 +1935,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { @@ -1940,21 +1940,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name; std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@ -45,7 +45,7 @@ index df8c751f12b0..bdcc0dd5c957 100644
CHECK(render_view_host_delegate_view_); CHECK(render_view_host_delegate_view_);
CHECK(view_.get()); CHECK(view_.get());
@@ -2632,6 +2641,15 @@ void WebContentsImpl::CreateNewWindow( @@ -2637,6 +2646,15 @@ void WebContentsImpl::CreateNewWindow(
create_params.renderer_initiated_creation = create_params.renderer_initiated_creation =
main_frame_route_id != MSG_ROUTING_NONE; main_frame_route_id != MSG_ROUTING_NONE;
@ -61,7 +61,7 @@ index df8c751f12b0..bdcc0dd5c957 100644
std::unique_ptr<WebContents> new_contents; std::unique_ptr<WebContents> new_contents;
if (!is_guest) { if (!is_guest) {
create_params.context = view_->GetNativeView(); create_params.context = view_->GetNativeView();
@@ -2662,7 +2680,7 @@ void WebContentsImpl::CreateNewWindow( @@ -2667,7 +2685,7 @@ void WebContentsImpl::CreateNewWindow(
// TODO(brettw): It seems bogus that we have to call this function on the // TODO(brettw): It seems bogus that we have to call this function on the
// newly created object and give it one of its own member variables. // newly created object and give it one of its own member variables.
new_view->CreateViewForWidget( new_view->CreateViewForWidget(
@ -70,7 +70,7 @@ index df8c751f12b0..bdcc0dd5c957 100644
} }
// Save the created window associated with the route so we can show it // Save the created window associated with the route so we can show it
// later. // later.
@@ -6023,7 +6041,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { @@ -6042,7 +6060,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() {
void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager(
RenderViewHost* render_view_host) { RenderViewHost* render_view_host) {
RenderWidgetHostViewBase* rwh_view = RenderWidgetHostViewBase* rwh_view =
@ -95,10 +95,10 @@ index df508da0aef2..f6f4bf42b108 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default; WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index b26563cd2cae..33d245c91cbb 100644 index 786eecfcb70c..984326a81411 100644
--- content/public/browser/web_contents.h --- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h +++ content/public/browser/web_contents.h
@@ -76,9 +76,11 @@ class BrowserPluginGuestDelegate; @@ -77,9 +77,11 @@ class BrowserPluginGuestDelegate;
class InterstitialPage; class InterstitialPage;
class RenderFrameHost; class RenderFrameHost;
class RenderViewHost; class RenderViewHost;
@ -110,7 +110,7 @@ index b26563cd2cae..33d245c91cbb 100644
struct CustomContextMenuContext; struct CustomContextMenuContext;
struct DropData; struct DropData;
struct MHTMLGenerationParams; struct MHTMLGenerationParams;
@@ -218,6 +220,10 @@ class WebContents : public PageNavigator, @@ -219,6 +221,10 @@ class WebContents : public PageNavigator,
// Sandboxing flags set on the new WebContents. // Sandboxing flags set on the new WebContents.
blink::WebSandboxFlags starting_sandbox_flags; blink::WebSandboxFlags starting_sandbox_flags;

View File

@ -10,10 +10,10 @@ index 92e9cb865204..4628c56882b4 100644
+ GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array<PluginInfo> plugins); + GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array<PluginInfo> plugins);
}; };
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
index be5ee3635cf5..471d8c908e52 100644 index 3e8fae916125..30451122e4a2 100644
--- third_party/blink/public/platform/platform.h --- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h
@@ -701,6 +701,11 @@ class BLINK_PLATFORM_EXPORT Platform { @@ -745,6 +745,11 @@ class BLINK_PLATFORM_EXPORT Platform {
// runs during Chromium's build step). // runs during Chromium's build step).
virtual bool IsTakingV8ContextSnapshot() { return false; } virtual bool IsTakingV8ContextSnapshot() { return false; }
@ -23,8 +23,8 @@ index be5ee3635cf5..471d8c908e52 100644
+ virtual void DevToolsAgentDetached() {} + virtual void DevToolsAgentDetached() {}
+ +
protected: protected:
Platform(); WebThread* main_thread_;
virtual ~Platform();
diff --git third_party/blink/renderer/core/dom/dom_implementation.cc third_party/blink/renderer/core/dom/dom_implementation.cc diff --git third_party/blink/renderer/core/dom/dom_implementation.cc third_party/blink/renderer/core/dom/dom_implementation.cc
index c360933eb10f..6295f9d675f7 100644 index c360933eb10f..6295f9d675f7 100644
--- third_party/blink/renderer/core/dom/dom_implementation.cc --- third_party/blink/renderer/core/dom/dom_implementation.cc
@ -44,10 +44,10 @@ index c360933eb10f..6295f9d675f7 100644
.Top() .Top()
.GetSecurityContext() .GetSecurityContext()
diff --git third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc diff --git third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc
index eef3bcc92e45..4cc5abc51fc8 100644 index 7a7f6e0d88e9..dfa7e007a9fa 100644
--- third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc --- third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc
+++ third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc +++ third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc
@@ -327,6 +327,8 @@ WebDevToolsAgentImpl::Session::Session( @@ -325,6 +325,8 @@ WebDevToolsAgentImpl::Session::Session(
&WebDevToolsAgentImpl::Session::Detach, WrapWeakPersistent(this))); &WebDevToolsAgentImpl::Session::Detach, WrapWeakPersistent(this)));
InitializeInspectorSession(std::move(reattach_session_state)); InitializeInspectorSession(std::move(reattach_session_state));
@ -56,7 +56,7 @@ index eef3bcc92e45..4cc5abc51fc8 100644
} }
WebDevToolsAgentImpl::Session::~Session() { WebDevToolsAgentImpl::Session::~Session() {
@@ -352,6 +354,7 @@ void WebDevToolsAgentImpl::Session::Detach() { @@ -349,6 +351,7 @@ void WebDevToolsAgentImpl::Session::Detach() {
io_session_->DeleteSoon(); io_session_->DeleteSoon();
io_session_ = nullptr; io_session_ = nullptr;
inspector_session_->Dispose(); inspector_session_->Dispose();
@ -65,10 +65,10 @@ index eef3bcc92e45..4cc5abc51fc8 100644
void WebDevToolsAgentImpl::Session::SendProtocolResponse( void WebDevToolsAgentImpl::Session::SendProtocolResponse(
diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc
index e681cb8f5042..bf92a04e394c 100644 index a7ddc156c2b1..e31496827664 100644
--- third_party/blink/renderer/core/frame/local_frame.cc --- third_party/blink/renderer/core/frame/local_frame.cc
+++ third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc
@@ -1216,7 +1216,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { @@ -1221,7 +1221,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
PluginData* LocalFrame::GetPluginData() const { PluginData* LocalFrame::GetPluginData() const {
if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin))
return nullptr; return nullptr;
@ -78,20 +78,20 @@ index e681cb8f5042..bf92a04e394c 100644
} }
diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc
index d49490d66514..62fe65941f2d 100644 index af94b52a5b6e..f5b91fefcda0 100644
--- third_party/blink/renderer/core/page/page.cc --- third_party/blink/renderer/core/page/page.cc
+++ third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc
@@ -169,7 +169,8 @@ Page::Page(PageClients& page_clients) @@ -171,7 +171,8 @@ Page::Page(PageClients& page_clients)
overscroll_controller_( overscroll_controller_(
OverscrollController::Create(GetVisualViewport(), GetChromeClient())), OverscrollController::Create(GetVisualViewport(), GetChromeClient())),
link_highlights_(LinkHighlights::Create(*this)), link_highlights_(LinkHighlights::Create(*this)),
- plugin_data_(nullptr), - plugin_data_(nullptr),
+ plugin_data_main_frame_(nullptr), + plugin_data_main_frame_(nullptr),
+ plugin_data_sub_frame_(nullptr), + plugin_data_sub_frame_(nullptr),
// TODO(pdr): Initialize |validation_message_client_| lazily.
validation_message_client_(ValidationMessageClientImpl::Create(*this)),
opened_by_dom_(false), opened_by_dom_(false),
tab_key_cycles_through_elements_(true), @@ -332,21 +333,40 @@ void Page::InitialStyleChanged() {
paused_(false),
@@ -328,21 +329,40 @@ void Page::InitialStyleChanged() {
} }
} }
@ -141,7 +141,7 @@ index d49490d66514..62fe65941f2d 100644
page->NotifyPluginsChanged(); page->NotifyPluginsChanged();
} }
} }
@@ -731,7 +751,8 @@ void Page::Trace(blink::Visitor* visitor) { @@ -736,7 +756,8 @@ void Page::Trace(blink::Visitor* visitor) {
visitor->Trace(overscroll_controller_); visitor->Trace(overscroll_controller_);
visitor->Trace(link_highlights_); visitor->Trace(link_highlights_);
visitor->Trace(main_frame_); visitor->Trace(main_frame_);
@ -152,10 +152,10 @@ index d49490d66514..62fe65941f2d 100644
visitor->Trace(plugins_changed_observers_); visitor->Trace(plugins_changed_observers_);
visitor->Trace(next_related_page_); visitor->Trace(next_related_page_);
diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h
index 9c25836191e6..398483fc9ca8 100644 index c9ecb33e153f..6ff8e8dc6b67 100644
--- third_party/blink/renderer/core/page/page.h --- third_party/blink/renderer/core/page/page.h
+++ third_party/blink/renderer/core/page/page.h +++ third_party/blink/renderer/core/page/page.h
@@ -135,7 +135,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>, @@ -136,7 +136,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
ViewportDescription GetViewportDescription() const; ViewportDescription GetViewportDescription() const;
// Returns the plugin data associated with |main_frame_origin|. // Returns the plugin data associated with |main_frame_origin|.
@ -165,7 +165,7 @@ index 9c25836191e6..398483fc9ca8 100644
// Resets the plugin data for all pages in the renderer process and notifies // Resets the plugin data for all pages in the renderer process and notifies
// PluginsChangedObservers. // PluginsChangedObservers.
@@ -360,7 +361,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>, @@ -367,7 +368,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
const Member<OverscrollController> overscroll_controller_; const Member<OverscrollController> overscroll_controller_;
const Member<LinkHighlights> link_highlights_; const Member<LinkHighlights> link_highlights_;

View File

@ -1,8 +1,8 @@
diff --git third_party/blink/renderer/core/input/pointer_event_manager.cc third_party/blink/renderer/core/input/pointer_event_manager.cc diff --git third_party/blink/renderer/core/input/pointer_event_manager.cc third_party/blink/renderer/core/input/pointer_event_manager.cc
index 6986dedf3300..ad161d5b3284 100644 index 2e4954ba8deb..f5f50ea77be8 100644
--- third_party/blink/renderer/core/input/pointer_event_manager.cc --- third_party/blink/renderer/core/input/pointer_event_manager.cc
+++ third_party/blink/renderer/core/input/pointer_event_manager.cc +++ third_party/blink/renderer/core/input/pointer_event_manager.cc
@@ -284,7 +284,7 @@ void PointerEventManager::HandlePointerInterruption( @@ -272,7 +272,7 @@ void PointerEventManager::HandlePointerInterruption(
for (auto pointer_event : canceled_pointer_events) { for (auto pointer_event : canceled_pointer_events) {
// If we are sending a pointercancel we have sent the pointerevent to some // If we are sending a pointercancel we have sent the pointerevent to some
// target before. // target before.

View File

@ -20,10 +20,10 @@ index 380ca3f69a26..fe841b6f25bd 100644
// Call these methods before and after running a nested, modal event loop // Call these methods before and after running a nested, modal event loop
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
index 23f0d6f74d4c..0fe6cb4d87d7 100644 index 1a1e2cfb4fd2..9251b9a09504 100644
--- third_party/blink/renderer/core/exported/web_view_impl.cc --- third_party/blink/renderer/core/exported/web_view_impl.cc
+++ third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -239,8 +239,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { @@ -234,8 +234,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
g_should_use_external_popup_menus = use_external_popup_menus; g_should_use_external_popup_menus = use_external_popup_menus;
} }
@ -39,7 +39,7 @@ index 23f0d6f74d4c..0fe6cb4d87d7 100644
} }
namespace { namespace {
@@ -335,6 +340,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, @@ -310,6 +315,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
enable_fake_page_scale_animation_for_testing_(false), enable_fake_page_scale_animation_for_testing_(false),
fake_page_scale_animation_page_scale_factor_(0), fake_page_scale_animation_page_scale_factor_(0),
fake_page_scale_animation_use_anchor_(false), fake_page_scale_animation_use_anchor_(false),
@ -48,10 +48,10 @@ index 23f0d6f74d4c..0fe6cb4d87d7 100644
suppress_next_keypress_event_(false), suppress_next_keypress_event_(false),
ime_accept_events_(true), ime_accept_events_(true),
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
index b9e684023537..3d220db31aad 100644 index 66a3b5c16769..ac7331a50353 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h --- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -105,7 +105,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -103,7 +103,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
static HashSet<WebViewImpl*>& AllInstances(); static HashSet<WebViewImpl*>& AllInstances();
// Returns true if popup menus should be rendered by the browser, false if // Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default). // they should be rendered by WebKit (which is the default).
@ -61,7 +61,7 @@ index b9e684023537..3d220db31aad 100644
// WebWidget methods: // WebWidget methods:
void Close() override; void Close() override;
@@ -246,7 +247,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -244,7 +245,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
HitTestResult CoreHitTestResultAt(const WebPoint&); HitTestResult CoreHitTestResultAt(const WebPoint&);
void InvalidateRect(const IntRect&); void InvalidateRect(const IntRect&);
@ -70,7 +70,7 @@ index b9e684023537..3d220db31aad 100644
void SetBaseBackgroundColorOverride(SkColor); void SetBaseBackgroundColorOverride(SkColor);
void ClearBaseBackgroundColorOverride(); void ClearBaseBackgroundColorOverride();
void SetBackgroundColorOverride(SkColor); void SetBackgroundColorOverride(SkColor);
@@ -603,6 +604,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -598,6 +599,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
float fake_page_scale_animation_page_scale_factor_; float fake_page_scale_animation_page_scale_factor_;
bool fake_page_scale_animation_use_anchor_; bool fake_page_scale_animation_use_anchor_;
@ -80,10 +80,10 @@ index b9e684023537..3d220db31aad 100644
TransformationMatrix device_emulation_transform_; TransformationMatrix device_emulation_transform_;
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
index 963828a16782..86a841fcd4f3 100644 index 642b6ded444c..45296936ef21 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc --- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -827,7 +827,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { @@ -805,7 +805,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
HTMLSelectElement& select) { HTMLSelectElement& select) {
NotifyPopupOpeningObservers(); NotifyPopupOpeningObservers();

View File

@ -35,7 +35,7 @@ index dfe0f29dc772..606f07a1d1ed 100644
extensions::ExtensionRegistry::Get(profile); extensions::ExtensionRegistry::Get(profile);
std::string extensions_list; std::string extensions_list;
diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc
index e4cfd5b02bea..20a5f81fe231 100644 index 660cfdb7ea24..5ac15334064e 100644
--- chrome/browser/memory_details.cc --- chrome/browser/memory_details.cc
+++ chrome/browser/memory_details.cc +++ chrome/browser/memory_details.cc
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
@ -60,10 +60,10 @@ index e4cfd5b02bea..20a5f81fe231 100644
render_process_host->GetBrowserContext(); render_process_host->GetBrowserContext();
extensions::ExtensionRegistry* extension_registry = extensions::ExtensionRegistry* extension_registry =
diff --git chrome/browser/ui/webui/net_internals/net_internals_ui.cc chrome/browser/ui/webui/net_internals/net_internals_ui.cc diff --git chrome/browser/ui/webui/net_internals/net_internals_ui.cc chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index 34960e3e6543..bffb63938274 100644 index 76652731b926..ec2b6ad11cdb 100644
--- chrome/browser/ui/webui/net_internals/net_internals_ui.cc --- chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc +++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -529,41 +529,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache( @@ -527,41 +527,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache(
void NetInternalsMessageHandler::OnGetPrerenderInfo( void NetInternalsMessageHandler::OnGetPrerenderInfo(
const base::ListValue* list) { const base::ListValue* list) {
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
@ -110,7 +110,7 @@ index 34960e3e6543..bffb63938274 100644
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@@ -643,9 +633,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( @@ -641,9 +631,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady(
PrePopulateEventList(); PrePopulateEventList();
@ -170,10 +170,10 @@ index 903cc543a242..5bd30ae82974 100644
CONTENT_EXPORT void InitializeResourceContext(BrowserContext* browser_context); CONTENT_EXPORT void InitializeResourceContext(BrowserContext* browser_context);
diff --git content/browser/webui/url_data_manager.cc content/browser/webui/url_data_manager.cc diff --git content/browser/webui/url_data_manager.cc content/browser/webui/url_data_manager.cc
index ce87d5984c09..6d31657e5c6c 100644 index fca1d4aa6161..a14e34dae591 100644
--- content/browser/webui/url_data_manager.cc --- content/browser/webui/url_data_manager.cc
+++ content/browser/webui/url_data_manager.cc +++ content/browser/webui/url_data_manager.cc
@@ -148,6 +148,11 @@ void URLDataManager::UpdateWebUIDataSource( @@ -150,6 +150,11 @@ void URLDataManager::UpdateWebUIDataSource(
->UpdateWebUIDataSource(source_name, std::move(update)); ->UpdateWebUIDataSource(source_name, std::move(update));
} }
@ -186,7 +186,7 @@ index ce87d5984c09..6d31657e5c6c 100644
bool URLDataManager::IsScheduledForDeletion( bool URLDataManager::IsScheduledForDeletion(
const URLDataSourceImpl* data_source) { const URLDataSourceImpl* data_source) {
diff --git content/browser/webui/url_data_manager.h content/browser/webui/url_data_manager.h diff --git content/browser/webui/url_data_manager.h content/browser/webui/url_data_manager.h
index 5ceb74d411fc..0c584d6e69b5 100644 index 95cff69e1b42..7fd849867829 100644
--- content/browser/webui/url_data_manager.h --- content/browser/webui/url_data_manager.h
+++ content/browser/webui/url_data_manager.h +++ content/browser/webui/url_data_manager.h
@@ -69,6 +69,8 @@ class CONTENT_EXPORT URLDataManager : public base::SupportsUserData::Data { @@ -69,6 +69,8 @@ class CONTENT_EXPORT URLDataManager : public base::SupportsUserData::Data {

View File

@ -1,8 +1,8 @@
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
index 1ab962523b2e..3b1245adc42d 100644 index c700d8b74bcb..9a01101ba673 100644
--- chrome/app/generated_resources.grd --- chrome/app/generated_resources.grd
+++ chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd
@@ -4457,7 +4457,7 @@ Keep your key file in a safe place. You will need it to create new versions of y @@ -4478,7 +4478,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
</message> </message>
</if> </if>
<message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy."> <message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy.">

View File

@ -200,8 +200,6 @@ class AccessibilityTestHandler : public TestHandler,
EXPECT_EQ(VTYPE_LIST, value->GetType()); EXPECT_EQ(VTYPE_LIST, value->GetType());
CefRefPtr<CefListValue> list = value->GetList(); CefRefPtr<CefListValue> list = value->GetList();
EXPECT_TRUE(list.get()); EXPECT_TRUE(list.get());
// Always empty events after https://crrev.com/c101cb728a.
EXPECT_EQ(0U, list->GetSize());
got_accessibility_location_change_.yes(); got_accessibility_location_change_.yes();
} }

View File

@ -205,14 +205,6 @@ def GetRecommendedDefaultArgs():
} }
if platform == 'linux': if platform == 'linux':
# Use GTK3 instead of GTK2. Default is true. False is recommended because
# the cefclient sample application requires GTK2. This avoids the "GTK+ 2.x
# symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not
# supported" error when running cefclient. Using a value of true is fine if
# your application requires GTK3 and you're not planning to build the
# cefclient target (see issue #2014).
result['use_gtk3'] = False
# Use a sysroot environment. Default is true. False is recommended for local # Use a sysroot environment. Default is true. False is recommended for local
# builds. # builds.
# Run the following commands to download the sysroot environment: # Run the following commands to download the sysroot environment: