diff --git a/BUILD.gn b/BUILD.gn index d4ee2490b..09e0f6a15 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -270,7 +270,6 @@ source_set("webkit_set") { defines = [ # Blink-internal defines. "BLINK_IMPLEMENTATION=1", - "BLINK_WEB_IMPLEMENTATION=1", "INSIDE_BLINK", ] @@ -629,8 +628,8 @@ static_library("libcef_static") { "libcef/renderer/extensions/extensions_dispatcher_delegate.h", "libcef/renderer/extensions/extensions_renderer_client.cc", "libcef/renderer/extensions/extensions_renderer_client.h", - "libcef/renderer/extensions/print_web_view_helper_delegate.cc", - "libcef/renderer/extensions/print_web_view_helper_delegate.h", + "libcef/renderer/extensions/print_render_frame_helper_delegate.cc", + "libcef/renderer/extensions/print_render_frame_helper_delegate.h", "libcef/renderer/frame_impl.cc", "libcef/renderer/frame_impl.h", "libcef/renderer/media/cef_key_systems.cc", @@ -717,7 +716,7 @@ static_library("libcef_static") { "//components/keyed_service/content:content", "//components/keyed_service/core:core", "//components/navigation_interception", - "//components/network_session_configurator/common", + "//components/network_session_configurator/browser", "//components/pdf/browser", "//components/pdf/renderer", "//components/plugins/renderer", @@ -781,6 +780,7 @@ static_library("libcef_static") { "//third_party/widevine/cdm:headers", "//third_party/icu", "//third_party/zlib:minizip", + "//tools/v8_context_snapshot:v8_context_snapshot", "//ui/base", "//ui/base/ime", "//ui/events:events_base", @@ -1078,7 +1078,7 @@ template("cef_pak_scaled") { # Each input pak file should also have a deps line for completeness. # Add associated .h files in the make_pack_header("resources") target. sources = [ - "$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak", + "$root_gen_dir/blink/public/resources/blink_scaled_resources_${percent}_percent.pak", "$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak", "$root_gen_dir/components/components_resources_${percent}_percent.pak", "$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak", @@ -1090,7 +1090,7 @@ template("cef_pak_scaled") { # the libcef_static target. Grit deps that generate .cc files must be # listed both here and in the libcef_static target. public_deps = [ - "//third_party/WebKit/public:image_resources", + "//third_party/WebKit/public:scaled_resources", "//chrome/renderer:resources", "//components/resources:components_scaled_resources", "//content/app/resources", @@ -1098,6 +1098,12 @@ template("cef_pak_scaled") { "//ui/resources:ui_resources_grd", ] + deps = [ + # This repack target generates the blink_scaled_resources_*_percent.pak + # file but doesn't expose the public_deps required by make_pack_header. + "//third_party/WebKit/public:scaled_resources_${percent}_percent", + ] + if (toolkit_views) { sources += [ "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak" @@ -1265,6 +1271,7 @@ template("make_pack_header") { make_pack_header("resources") { header = "$root_out_dir/includes/include/cef_pack_resources.h" inputs = [ + "$root_gen_dir/blink/public/resources/grit/media_controls_resources.h", "$root_gen_dir/blink/public/resources/grit/blink_image_resources.h", "$root_gen_dir/blink/public/resources/grit/blink_resources.h", "$root_gen_dir/cef/grit/cef_resources.h", @@ -1346,6 +1353,7 @@ if (is_mac) { "$root_out_dir/cef_200_percent.pak", "$root_out_dir/cef_extensions.pak", "$root_out_dir/devtools_resources.pak", + "$root_out_dir/v8_context_snapshot.bin", # TODO(cef): Restore this line once Widevine build errors are resolved. # "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin", ] @@ -1358,6 +1366,7 @@ if (is_mac) { ":pak_extensions", # TODO(cef): Restore this line once Widevine build errors are resolved. # "//third_party/widevine/cdm:widevinecdmadapter", + "//tools/v8_context_snapshot:v8_context_snapshot", ] if (icu_use_data_file) { diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 80bdfdc7b..f90cd9ca4 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'ff259bab28b35d242e10186cd63af7ed404fae0d', + 'chromium_checkout': 'fa6a5d87adff761bc16afc5498c3f5944c1daa68', } diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 8f302cc78..093d665cc 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -983,14 +983,12 @@ void CefBrowserHostImpl::SetAccessibilityState( if (!web_contents_impl) return; - content::AccessibilityMode accMode; + ui::AXMode accMode; // In windowless mode set accessibility to TreeOnly mode. Else native // accessibility APIs, specific to each platform, are also created. if (accessibility_state == STATE_ENABLED) { - if (IsWindowless()) - accMode = content::kAccessibilityModeWebContentsOnly; - else - accMode = content::kAccessibilityModeComplete; + accMode = + IsWindowless() ? ui::AXMode::kWebContents : ui::AXMode::kNativeAPIs; } web_contents_impl->SetAccessibilityMode(accMode); } @@ -1609,7 +1607,7 @@ void CefBrowserHostImpl::Navigate(const CefNavigateParams& params) { CefRequestImpl::BlinkReferrerPolicyToNetReferrerPolicy( params.referrer.policy); request.frame_id = params.frame_id; - request.first_party_for_cookies = params.first_party_for_cookies; + request.site_for_cookies = params.site_for_cookies; request.headers = params.headers; request.load_flags = params.load_flags; request.upload_data = params.upload_data; @@ -2205,17 +2203,25 @@ void CefBrowserHostImpl::AddNewContents(content::WebContents* source, void CefBrowserHostImpl::LoadingStateChanged(content::WebContents* source, bool to_different_document) { - int current_index = + const int current_index = web_contents_->GetController().GetLastCommittedEntryIndex(); - int max_index = web_contents_->GetController().GetEntryCount() - 1; + const int max_index = web_contents_->GetController().GetEntryCount() - 1; - bool is_loading, can_go_back, can_go_forward; + const bool is_loading = web_contents_->IsLoading(); + const bool can_go_back = (current_index > 0); + const bool can_go_forward = (current_index < max_index); { base::AutoLock lock_scope(state_lock_); - is_loading = is_loading_ = web_contents_->IsLoading(); - can_go_back = can_go_back_ = (current_index > 0); - can_go_forward = can_go_forward_ = (current_index < max_index); + + // This method may be called multiple times in a row with |is_loading| true + // as a result of https://crrev.com/5e750ad0. Ignore the 2nd+ times. + if (is_loading_ == is_loading) + return; + + is_loading_ = is_loading; + can_go_back_ = can_go_back; + can_go_forward_ = can_go_forward; } if (client_.get()) { @@ -2754,8 +2760,7 @@ void CefBrowserHostImpl::DidFailLoad( content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, - const base::string16& error_description, - bool was_ignored_by_handler) { + const base::string16& error_description) { // The navigation failed after commit. OnLoadStart was called so we also call // OnLoadEnd. const bool is_main_frame = !render_frame_host->GetParent(); diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index a3674e95c..404d175a8 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -496,8 +496,7 @@ class CefBrowserHostImpl : public CefBrowserHost, void DidFailLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, - const base::string16& error_description, - bool was_ignored_by_handler) override; + const base::string16& error_description) override; void FrameDeleted(content::RenderFrameHost* render_frame_host) override; void TitleWasSet(content::NavigationEntry* entry, bool explicit_set) override; void PluginCrashed(const base::FilePath& plugin_path, diff --git a/libcef/browser/browser_main.cc b/libcef/browser/browser_main.cc index d0537f1c8..7758657bd 100644 --- a/libcef/browser/browser_main.cc +++ b/libcef/browser/browser_main.cc @@ -160,14 +160,14 @@ int CefBrowserMainParts::PreCreateThreads() { // before the IO thread is started. content::GpuDataManager::GetInstance(); -#if defined(USE_AURA) - display::Screen::SetScreenInstance(views::CreateDesktopScreen()); -#endif - return 0; } void CefBrowserMainParts::PreMainMessageLoopRun() { +#if defined(USE_AURA) + display::Screen::SetScreenInstance(views::CreateDesktopScreen()); +#endif + if (extensions::ExtensionsEnabled()) { // Initialize extension global objects before creating the global // BrowserContext. diff --git a/libcef/browser/browser_urlrequest_impl.cc b/libcef/browser/browser_urlrequest_impl.cc index e16ae7c70..8f4bab353 100644 --- a/libcef/browser/browser_urlrequest_impl.cc +++ b/libcef/browser/browser_urlrequest_impl.cc @@ -145,7 +145,7 @@ class CefBrowserURLRequest::Context } inline bool CalledOnValidThread() { - return task_runner_->RunsTasksOnCurrentThread(); + return task_runner_->RunsTasksInCurrentSequence(); } bool Start() { diff --git a/libcef/browser/chrome_browser_process_stub.cc b/libcef/browser/chrome_browser_process_stub.cc index 377679b9d..904902f4c 100644 --- a/libcef/browser/chrome_browser_process_stub.cc +++ b/libcef/browser/chrome_browser_process_stub.cc @@ -88,6 +88,11 @@ void ChromeBrowserProcessStub::EndSession() { NOTREACHED(); }; +void ChromeBrowserProcessStub::FlushLocalStateAndReply( + base::OnceClosure reply) { + NOTREACHED(); +} + metrics_services_manager::MetricsServicesManager* ChromeBrowserProcessStub::GetMetricsServicesManager() { NOTREACHED(); @@ -113,6 +118,12 @@ IOThread* ChromeBrowserProcessStub::io_thread() { return NULL; } +SystemNetworkContextManager* +ChromeBrowserProcessStub::system_network_context_manager() { + NOTREACHED(); + return NULL; +} + WatchDogThread* ChromeBrowserProcessStub::watchdog_thread() { NOTREACHED(); return NULL; @@ -321,11 +332,6 @@ ChromeBrowserProcessStub::media_file_system_registry() { return NULL; } -bool ChromeBrowserProcessStub::created_local_state() const { - NOTREACHED(); - return false; -} - #if BUILDFLAG(ENABLE_WEBRTC) WebRtcLogUploader* ChromeBrowserProcessStub::webrtc_log_uploader() { NOTREACHED(); diff --git a/libcef/browser/chrome_browser_process_stub.h b/libcef/browser/chrome_browser_process_stub.h index ece788fd8..f67a4637e 100644 --- a/libcef/browser/chrome_browser_process_stub.h +++ b/libcef/browser/chrome_browser_process_stub.h @@ -42,12 +42,14 @@ class ChromeBrowserProcessStub : public BrowserProcess, // BrowserProcess implementation. void ResourceDispatcherHostCreated() override; void EndSession() override; + void FlushLocalStateAndReply(base::OnceClosure reply) override; metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager() override; metrics::MetricsService* metrics_service() override; rappor::RapporServiceImpl* rappor_service() override; ukm::UkmRecorder* ukm_recorder() override; IOThread* io_thread() override; + SystemNetworkContextManager* system_network_context_manager() override; WatchDogThread* watchdog_thread() override; ProfileManager* profile_manager() override; PrefService* local_state() override; @@ -98,7 +100,6 @@ class ChromeBrowserProcessStub : public BrowserProcess, component_updater::SupervisedUserWhitelistInstaller* supervised_user_whitelist_installer() override; MediaFileSystemRegistry* media_file_system_registry() override; - bool created_local_state() const override; #if BUILDFLAG(ENABLE_WEBRTC) WebRtcLogUploader* webrtc_log_uploader() override; #endif diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index 4a085f15b..280cf3fa5 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -700,7 +700,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches( command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, arraysize(kSwitchNames)); -#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) if (!browser_cmd->HasSwitch(switches::kNoSandbox)) { // Pass the Widevine CDM path to the Zygote process. See comments in // CefWidevineLoader::AddPepperPlugins. @@ -958,7 +958,7 @@ CefContentBrowserClient::CreateThrottlesForNavigation( void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, - content::FileDescriptorInfo* mappings) { + content::PosixFileDescriptorInfo* mappings) { int crash_signal_fd = GetCrashSignalFD(command_line); if (crash_signal_fd >= 0) { mappings->Share(kCrashDumpSignal, crash_signal_fd); diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index ad6b92717..ee525356b 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -109,7 +109,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient { void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, - content::FileDescriptorInfo* mappings) override; + content::PosixFileDescriptorInfo* mappings) override; #endif #if defined(OS_WIN) diff --git a/libcef/browser/context.cc b/libcef/browser/context.cc index 933aeddb6..52285bc68 100644 --- a/libcef/browser/context.cc +++ b/libcef/browser/context.cc @@ -303,7 +303,8 @@ void CefQuitMessageLoop() { return; } - CefBrowserMessageLoop::current()->QuitWhenIdle(); + // Quit the CefBrowserMessageLoop. + base::RunLoop::QuitCurrentWhenIdleDeprecated(); } void CefSetOSModalLoop(bool osModalLoop) { @@ -499,7 +500,7 @@ void CefContext::OnContextInitialized() { static_cast(g_browser_process) ->OnContextInitialized(); -#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) CefWidevineLoader::GetInstance()->OnContextInitialized(); #endif diff --git a/libcef/browser/devtools_frontend.cc b/libcef/browser/devtools_frontend.cc index 64459b0c2..bcf356e2e 100644 --- a/libcef/browser/devtools_frontend.cc +++ b/libcef/browser/devtools_frontend.cc @@ -88,9 +88,9 @@ int ResponseWriter::Write(net::IOBuffer* buffer, content::BrowserThread::PostTask( content::BrowserThread::UI, FROM_HERE, - base::Bind(&CefDevToolsFrontend::CallClientFunction, shell_devtools_, - "DevToolsAPI.streamWrite", base::Owned(id), - base::Owned(chunkValue), nullptr)); + base::BindOnce(&CefDevToolsFrontend::CallClientFunction, shell_devtools_, + "DevToolsAPI.streamWrite", base::Owned(id), + base::Owned(chunkValue), nullptr)); return num_bytes; } @@ -221,6 +221,8 @@ void CefDevToolsFrontend::DocumentAvailableInMainFrame() { scoped_refptr agent_host = content::DevToolsAgentHost::GetOrCreateFor(inspected_contents_); if (agent_host != agent_host_) { + if (agent_host_) + agent_host_->DetachClient(this); agent_host_ = agent_host; agent_host_->AttachClient(this); if (!inspect_element_at_.IsEmpty()) { @@ -231,8 +233,10 @@ void CefDevToolsFrontend::DocumentAvailableInMainFrame() { } void CefDevToolsFrontend::WebContentsDestroyed() { - if (agent_host_) + if (agent_host_) { agent_host_->DetachClient(this); + agent_host_ = nullptr; + } delete this; } @@ -270,8 +274,6 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( dict->GetList("params", ¶ms); if (method == "dispatchProtocolMessage" && params && params->GetSize() == 1) { - if (!agent_host_ || !agent_host_->IsAttached()) - return; std::string protocol_message; if (!params->GetString(0, &protocol_message)) return; @@ -348,7 +350,7 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( return; } DictionaryPrefUpdate update(GetPrefs(), prefs::kDevToolsPreferences); - update.Get()->SetStringWithoutPathExpansion(name, value); + update.Get()->SetKey(name, base::Value(value)); } else if (method == "removePreference") { std::string name; if (!params->GetString(0, &name)) diff --git a/libcef/browser/devtools_manager_delegate.cc b/libcef/browser/devtools_manager_delegate.cc index ccddf1711..3b3f3b954 100644 --- a/libcef/browser/devtools_manager_delegate.cc +++ b/libcef/browser/devtools_manager_delegate.cc @@ -9,7 +9,6 @@ #include #include "libcef/browser/browser_host_impl.h" -#include "libcef/common/content_client.h" #include "base/atomicops.h" #include "base/bind.h" @@ -107,7 +106,7 @@ void CefDevToolsManagerDelegate::StartHttpHandler( return; content::DevToolsAgentHost::StartRemoteDebuggingServer( std::move(socket_factory), std::string(), browser_context->GetPath(), - base::FilePath(), std::string(), CefContentClient::Get()->GetUserAgent()); + base::FilePath()); } // static diff --git a/libcef/browser/extensions/extension_system.cc b/libcef/browser/extensions/extension_system.cc index 60e890eda..bae75bc20 100644 --- a/libcef/browser/extensions/extension_system.cc +++ b/libcef/browser/extensions/extension_system.cc @@ -216,7 +216,7 @@ void CefExtensionSystem::Init() { // 11.The PDF extension requests a plugin to handle // kPDFPluginOutOfProcessMimeType which loads the PDF PPAPI plugin. // 12.Routing of print-related commands are handled by ChromePDFPrintClient - // and CefPrintWebViewHelperDelegate in the renderer process. + // and CefPrintRenderFrameHelperDelegate in the renderer process. // 13.The PDF extension is granted access to chrome://resources via // CefExtensionWebContentsObserver::RenderViewCreated in the browser // process. diff --git a/libcef/browser/extensions/extension_web_contents_observer.cc b/libcef/browser/extensions/extension_web_contents_observer.cc index 566316d11..674c46732 100644 --- a/libcef/browser/extensions/extension_web_contents_observer.cc +++ b/libcef/browser/extensions/extension_web_contents_observer.cc @@ -5,8 +5,8 @@ #include "libcef/browser/extensions/extension_web_contents_observer.h" #include "content/public/browser/child_process_security_policy.h" +#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" -#include "content/public/browser/render_view_host.h" #include "content/public/common/url_constants.h" DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::CefExtensionWebContentsObserver); @@ -21,15 +21,15 @@ CefExtensionWebContentsObserver::CefExtensionWebContentsObserver( CefExtensionWebContentsObserver::~CefExtensionWebContentsObserver() {} -void CefExtensionWebContentsObserver::RenderViewCreated( - content::RenderViewHost* render_view_host) { - ExtensionWebContentsObserver::RenderViewCreated(render_view_host); +void CefExtensionWebContentsObserver::RenderFrameCreated( + content::RenderFrameHost* render_frame_host) { + ExtensionWebContentsObserver::RenderFrameCreated(render_frame_host); - const Extension* extension = GetExtension(render_view_host); + const Extension* extension = GetExtensionFromFrame(render_frame_host, false); if (!extension) return; - int process_id = render_view_host->GetProcess()->GetID(); + int process_id = render_frame_host->GetProcess()->GetID(); auto policy = content::ChildProcessSecurityPolicy::GetInstance(); // Components of chrome that are implemented as extensions or platform apps diff --git a/libcef/browser/extensions/extension_web_contents_observer.h b/libcef/browser/extensions/extension_web_contents_observer.h index 1575c8e3b..909e252a1 100644 --- a/libcef/browser/extensions/extension_web_contents_observer.h +++ b/libcef/browser/extensions/extension_web_contents_observer.h @@ -30,7 +30,7 @@ class CefExtensionWebContentsObserver explicit CefExtensionWebContentsObserver(content::WebContents* web_contents); // content::WebContentsObserver overrides. - void RenderViewCreated(content::RenderViewHost* render_view_host) override; + void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; // Our content script observers. Declare at top so that it will outlive all // other members, since they might add themselves as observers. diff --git a/libcef/browser/extensions/extensions_browser_client.cc b/libcef/browser/extensions/extensions_browser_client.cc index 7daadb57a..9a9842c9b 100644 --- a/libcef/browser/extensions/extensions_browser_client.cc +++ b/libcef/browser/extensions/extensions_browser_client.cc @@ -31,7 +31,7 @@ #include "extensions/browser/event_router.h" #include "extensions/browser/extension_function_registry.h" #include "extensions/browser/extension_host_delegate.h" -#include "extensions/browser/mojo/service_registration.h" +#include "extensions/browser/mojo/interface_registration.h" #include "extensions/browser/serial_extension_host_queue.h" #include "extensions/browser/url_request_util.h" #include "extensions/common/constants.h" @@ -257,10 +257,12 @@ void CefExtensionsBrowserClient::RegisterExtensionFunctions( api::cef::ChromeFunctionRegistry::RegisterAll(registry); } -void CefExtensionsBrowserClient::RegisterMojoServices( +void CefExtensionsBrowserClient::RegisterExtensionInterfaces( + service_manager::BinderRegistryWithArgs* + registry, content::RenderFrameHost* render_frame_host, const Extension* extension) const { - RegisterServicesForFrame(render_frame_host, extension); + RegisterInterfacesForExtension(registry, render_frame_host, extension); } std::unique_ptr @@ -320,6 +322,10 @@ bool CefExtensionsBrowserClient::IsLockScreenContext( return false; } +std::string CefExtensionsBrowserClient::GetApplicationLocale() { + return g_browser_process->GetApplicationLocale(); +} + ExtensionHostQueue* CefExtensionsBrowserClient::GetExtensionHostQueue() { if (!extension_host_queue_) extension_host_queue_.reset(new SerialExtensionHostQueue); diff --git a/libcef/browser/extensions/extensions_browser_client.h b/libcef/browser/extensions/extensions_browser_client.h index 5b7944491..4989c0bb6 100644 --- a/libcef/browser/extensions/extensions_browser_client.h +++ b/libcef/browser/extensions/extensions_browser_client.h @@ -73,8 +73,10 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient { ExtensionSystemProvider* GetExtensionSystemFactory() override; void RegisterExtensionFunctions( ExtensionFunctionRegistry* registry) const override; - void RegisterMojoServices(content::RenderFrameHost* render_frame_host, - const Extension* extension) const override; + void RegisterExtensionInterfaces(service_manager::BinderRegistryWithArgs< + content::RenderFrameHost*>* registry, + content::RenderFrameHost* render_frame_host, + const Extension* extension) const override; std::unique_ptr CreateRuntimeAPIDelegate( content::BrowserContext* context) const override; const ComponentExtensionResourceManager* @@ -91,6 +93,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient { content::WebContents* web_contents) override; KioskDelegate* GetKioskDelegate() override; bool IsLockScreenContext(content::BrowserContext* context) override; + std::string GetApplicationLocale() override; ExtensionHostQueue* GetExtensionHostQueue(); diff --git a/libcef/browser/image_impl.cc b/libcef/browser/image_impl.cc index 70f13e523..efd019c96 100644 --- a/libcef/browser/image_impl.cc +++ b/libcef/browser/image_impl.cc @@ -319,8 +319,7 @@ bool CefImageImpl::AddBitmap(float scale_factor, const SkBitmap& bitmap) { gfx::ImageSkiaRep skia_rep(bitmap, scale_factor); if (image_.IsEmpty()) { - gfx::Image image((gfx::ImageSkia(skia_rep))); - image_.SwapRepresentations(&image); + image_ = gfx::Image(gfx::ImageSkia(skia_rep)); } else { image_.AsImageSkia().AddRepresentation(skia_rep); } diff --git a/libcef/browser/navigate_params.h b/libcef/browser/navigate_params.h index 50b6fdaa3..c0108de6f 100644 --- a/libcef/browser/navigate_params.h +++ b/libcef/browser/navigate_params.h @@ -38,9 +38,9 @@ struct CefNavigateParams { // Usually the URL of the document in the top-level window, which may be // checked by the third-party cookie blocking policy. Leaving it empty may // lead to undesired cookie blocking. Third-party cookie blocking can be - // bypassed by setting first_party_for_cookies = url, but this should ideally + // bypassed by setting site_for_cookies = url, but this should ideally // only be done if there really is no way to determine the correct value. - GURL first_party_for_cookies; + GURL site_for_cookies; // Additional HTTP request headers. std::string headers; diff --git a/libcef/browser/net/cookie_store_proxy.cc b/libcef/browser/net/cookie_store_proxy.cc index ac1a9bf90..361317da8 100644 --- a/libcef/browser/net/cookie_store_proxy.cc +++ b/libcef/browser/net/cookie_store_proxy.cc @@ -156,7 +156,16 @@ CefCookieStoreProxy::AddCallbackForCookie( net::CookieStore* cookie_store = GetCookieStore(); if (cookie_store) return cookie_store->AddCallbackForCookie(url, name, callback); - return NULL; + return nullptr; +} + +std::unique_ptr +CefCookieStoreProxy::AddCallbackForAllChanges( + const CookieChangedCallback& callback) { + net::CookieStore* cookie_store = GetCookieStore(); + if (cookie_store) + return cookie_store->AddCallbackForAllChanges(callback); + return nullptr; } bool CefCookieStoreProxy::IsEphemeral() { diff --git a/libcef/browser/net/cookie_store_proxy.h b/libcef/browser/net/cookie_store_proxy.h index 69e9bd2de..a87fc41ca 100644 --- a/libcef/browser/net/cookie_store_proxy.h +++ b/libcef/browser/net/cookie_store_proxy.h @@ -69,6 +69,8 @@ class CefCookieStoreProxy : public net::CookieStore { const GURL& url, const std::string& name, const CookieChangedCallback& callback) override; + std::unique_ptr AddCallbackForAllChanges( + const CookieChangedCallback& callback) override; bool IsEphemeral() override; private: diff --git a/libcef/browser/net/url_request_context_getter_impl.cc b/libcef/browser/net/url_request_context_getter_impl.cc index 0deaf1034..8741a9059 100644 --- a/libcef/browser/net/url_request_context_getter_impl.cc +++ b/libcef/browser/net/url_request_context_getter_impl.cc @@ -357,8 +357,7 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() { std::unique_ptr main_backend( new net::HttpCache::DefaultBackend( cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, - net::CACHE_BACKEND_DEFAULT, http_cache_path, 0, - BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE))); + net::CACHE_BACKEND_DEFAULT, http_cache_path, 0)); net::HttpNetworkSession::Context network_session_context; network_session_context.host_resolver = diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 35ac101be..aebe69a2e 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -18,9 +18,9 @@ #include "base/command_line.h" #include "base/memory/ptr_util.h" #include "cc/base/switches.h" -#include "cc/output/copy_output_request.h" -#include "cc/scheduler/delay_based_time_source.h" +#include "components/viz/common/frame_sinks/delay_based_time_source.h" #include "components/viz/common/gl_helper.h" +#include "components/viz/common/quads/copy_output_request.h" #include "content/browser/bad_message.h" #include "content/browser/compositor/image_transport_factory.h" #include "content/browser/frame_host/render_widget_host_view_guest.h" @@ -130,8 +130,8 @@ class CefCopyFrameGenerator { // The below code is similar in functionality to // DelegatedFrameHost::CopyFromCompositingSurface but we reuse the same // SkBitmap in the GPU codepath and avoid scaling where possible. - std::unique_ptr request = - cc::CopyOutputRequest::CreateRequest(base::Bind( + std::unique_ptr request = + viz::CopyOutputRequest::CreateRequest(base::Bind( &CefCopyFrameGenerator::CopyFromCompositingSurfaceHasResult, weak_ptr_factory_.GetWeakPtr(), damage_rect)); @@ -141,7 +141,7 @@ class CefCopyFrameGenerator { void CopyFromCompositingSurfaceHasResult( const gfx::Rect& damage_rect, - std::unique_ptr result) { + std::unique_ptr result) { if (result->IsEmpty() || result->size().IsEmpty() || !view_->render_widget_host()) { OnCopyFrameCaptureFailure(damage_rect); @@ -159,7 +159,7 @@ class CefCopyFrameGenerator { void PrepareTextureCopyOutputResult( const gfx::Rect& damage_rect, - std::unique_ptr result) { + std::unique_ptr result) { DCHECK(result->HasTexture()); base::ScopedClosureRunner scoped_callback_runner( base::Bind(&CefCopyFrameGenerator::OnCopyFrameCaptureFailure, @@ -188,7 +188,7 @@ class CefCopyFrameGenerator { uint8_t* pixels = static_cast(bitmap_->getPixels()); viz::TextureMailbox texture_mailbox; - std::unique_ptr release_callback; + std::unique_ptr release_callback; result->TakeTexture(&texture_mailbox, &release_callback); DCHECK(texture_mailbox.IsTexture()); if (!texture_mailbox.IsTexture()) @@ -208,7 +208,7 @@ class CefCopyFrameGenerator { static void CopyFromCompositingSurfaceFinishedProxy( base::WeakPtr generator, - std::unique_ptr release_callback, + std::unique_ptr release_callback, const gfx::Rect& damage_rect, std::unique_ptr bitmap, bool result) { @@ -247,7 +247,7 @@ class CefCopyFrameGenerator { void PrepareBitmapCopyOutputResult( const gfx::Rect& damage_rect, - std::unique_ptr result) { + std::unique_ptr result) { DCHECK(result->HasBitmap()); std::unique_ptr source = result->TakeBitmap(); DCHECK(source); @@ -308,11 +308,11 @@ class CefCopyFrameGenerator { // Used to control the VSync rate in subprocesses when BeginFrame scheduling is // enabled. -class CefBeginFrameTimer : public cc::DelayBasedTimeSourceClient { +class CefBeginFrameTimer : public viz::DelayBasedTimeSourceClient { public: CefBeginFrameTimer(int frame_rate_threshold_ms, const base::Closure& callback) : callback_(callback) { - time_source_.reset(new cc::DelayBasedTimeSource( + time_source_.reset(new viz::DelayBasedTimeSource( content::BrowserThread::GetTaskRunnerForThread(CEF_UIT).get())); time_source_->SetTimebaseAndInterval( base::TimeTicks(), @@ -335,7 +335,7 @@ class CefBeginFrameTimer : public cc::DelayBasedTimeSourceClient { void OnTimerTick() override { callback_.Run(); } const base::Closure callback_; - std::unique_ptr time_source_; + std::unique_ptr time_source_; DISALLOW_COPY_AND_ASSIGN(CefBeginFrameTimer); }; @@ -399,7 +399,8 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( new ui::Compositor(context_factory_private->AllocateFrameSinkId(), content::GetContextFactory(), context_factory_private, base::ThreadTaskRunnerHandle::Get(), - false /* enable_surface_synchronization */)); + false /* enable_surface_synchronization */, + false /* enable_pixel_canvas */)); compositor_->SetAcceleratedWidget(compositor_widget_); compositor_->SetDelegate(this); compositor_->SetRootLayer(root_layer_.get()); @@ -572,7 +573,7 @@ bool CefRenderWidgetHostViewOSR::LockMouse() { void CefRenderWidgetHostViewOSR::UnlockMouse() {} void CefRenderWidgetHostViewOSR::DidCreateNewRendererCompositorFrameSink( - cc::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) { + viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) { renderer_compositor_frame_sink_ = renderer_compositor_frame_sink; if (GetDelegatedFrameHost()) { GetDelegatedFrameHost()->DidCreateNewRendererCompositorFrameSink( @@ -868,12 +869,12 @@ void CefRenderWidgetHostViewOSR::ImeSetComposition( if (!render_widget_host_) return; - std::vector web_underlines; + std::vector web_underlines; web_underlines.reserve(underlines.size()); for (const CefCompositionUnderline& line : underlines) { - web_underlines.push_back(ui::CompositionUnderline( - line.range.from, line.range.to, line.color, line.thick ? true : false, - line.background_color)); + web_underlines.push_back(ui::ImeTextSpan( + ui::ImeTextSpan::Type::kComposition, line.range.from, line.range.to, + line.color, line.thick ? true : false, line.background_color)); } gfx::Range range(replacement_range.from, replacement_range.to); @@ -893,8 +894,7 @@ void CefRenderWidgetHostViewOSR::ImeCommitText( return; gfx::Range range(replacement_range.from, replacement_range.to); - render_widget_host_->ImeCommitText(text, - std::vector(), + render_widget_host_->ImeCommitText(text, std::vector(), range, relative_cursor_pos); // Stop Monitoring for composition updates after we are done. @@ -1492,10 +1492,10 @@ void CefRenderWidgetHostViewOSR::SendBeginFrame(base::TimeTicks frame_time, base::TimeTicks deadline = display_time - estimated_browser_composite_time; - const cc::BeginFrameArgs& begin_frame_args = cc::BeginFrameArgs::Create( + const viz::BeginFrameArgs& begin_frame_args = viz::BeginFrameArgs::Create( BEGINFRAME_FROM_HERE, begin_frame_source_.source_id(), begin_frame_number_, frame_time, deadline, vsync_period, - cc::BeginFrameArgs::NORMAL); + viz::BeginFrameArgs::NORMAL); DCHECK(begin_frame_args.IsValid()); begin_frame_number_++; diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 103158d92..1df88906d 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -15,7 +15,7 @@ #include "base/memory/weak_ptr.h" #include "build/build_config.h" -#include "cc/scheduler/begin_frame_source.h" +#include "components/viz/common/frame_sinks/begin_frame_source.h" #include "content/browser/renderer_host/compositor_resize_lock.h" #include "content/browser/renderer_host/delegated_frame_host.h" #include "content/browser/renderer_host/render_widget_host_view_base.h" @@ -129,7 +129,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, // RenderWidgetHostViewBase implementation. void DidCreateNewRendererCompositorFrameSink( - cc::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) + viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) override; void SubmitCompositorFrame(const viz::LocalSurfaceId& local_surface_id, cc::CompositorFrame frame) override; @@ -343,8 +343,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, std::unique_ptr begin_frame_timer_; // Provides |source_id| for BeginFrameArgs that we create. - cc::StubBeginFrameSource begin_frame_source_; - uint64_t begin_frame_number_ = cc::BeginFrameArgs::kStartingFrameNumber; + viz::StubBeginFrameSource begin_frame_source_; + uint64_t begin_frame_number_ = viz::BeginFrameArgs::kStartingFrameNumber; // Used for direct rendering from the compositor when GPU compositing is // disabled. This object is owned by the compositor. @@ -377,7 +377,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, gfx::Vector2dF last_scroll_offset_; bool is_scroll_offset_changed_pending_; - cc::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink_ = + viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink_ = nullptr; base::WeakPtrFactory weak_ptr_factory_; diff --git a/libcef/browser/permissions/permission_manager.h b/libcef/browser/permissions/permission_manager.h index 07cb3dadd..6fb8d2b85 100644 --- a/libcef/browser/permissions/permission_manager.h +++ b/libcef/browser/permissions/permission_manager.h @@ -8,7 +8,7 @@ #include "libcef/browser/permissions/permission_context.h" #include "base/callback_forward.h" -#include "base/id_map.h" +#include "base/containers/id_map.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "components/content_settings/core/browser/content_settings_observer.h" @@ -65,10 +65,10 @@ class CefPermissionManager : public KeyedService, private: class PendingRequest; - using PendingRequestsMap = IDMap>; + using PendingRequestsMap = base::IDMap>; struct Subscription; - using SubscriptionsMap = IDMap>; + using SubscriptionsMap = base::IDMap>; // Called when a permission was decided for a given PendingRequest. The // PendingRequest is identified by its |request_id| and the permission is diff --git a/libcef/browser/permissions/permission_util.cc b/libcef/browser/permissions/permission_util.cc index 5f5c069aa..ac32c8ff8 100644 --- a/libcef/browser/permissions/permission_util.cc +++ b/libcef/browser/permissions/permission_util.cc @@ -39,6 +39,10 @@ ContentSettingsType PermissionTypeToContentSetting(PermissionType permission) { return CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC; case PermissionType::FLASH: return CONTENT_SETTINGS_TYPE_PLUGINS; + case PermissionType::SENSORS: + return CONTENT_SETTINGS_TYPE_SENSORS; + case PermissionType::ACCESSIBILITY_EVENTS: + return CONTENT_SETTINGS_TYPE_ACCESSIBILITY_EVENTS; case PermissionType::NUM: // This will hit the NOTREACHED below. break; diff --git a/libcef/browser/plugins/plugin_info_message_filter.cc b/libcef/browser/plugins/plugin_info_message_filter.cc index 0237b2e44..be654a50e 100644 --- a/libcef/browser/plugins/plugin_info_message_filter.cc +++ b/libcef/browser/plugins/plugin_info_message_filter.cc @@ -94,18 +94,18 @@ bool ShouldUseJavaScriptSettingForPlugin(const WebPluginInfo& plugin) { return true; #endif -#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) // Treat CDM invocations like JavaScript. if (plugin.name == base::ASCIIToUTF16(kWidevineCdmDisplayName)) { DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS); return true; } -#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) return false; } -#if BUILDFLAG(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_LIBRARY_CDMS) enum PluginAvailabilityStatusForUMA { PLUGIN_NOT_REGISTERED, @@ -126,7 +126,7 @@ static void SendPluginAvailabilityUMA(const std::string& mime_type, #endif // defined(WIDEVINE_CDM_AVAILABLE) } -#endif // BUILDFLAG(ENABLE_PEPPER_CDMS) +#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) void ReportMetrics(const std::string& mime_type, const GURL& url, @@ -221,7 +221,7 @@ bool CefPluginInfoMessageFilter::OnMessageReceived( IPC_BEGIN_MESSAGE_MAP(CefPluginInfoMessageFilter, message) IPC_MESSAGE_HANDLER_DELAY_REPLY(CefViewHostMsg_GetPluginInfo, OnGetPluginInfo) -#if BUILDFLAG(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_LIBRARY_CDMS) IPC_MESSAGE_HANDLER(CefViewHostMsg_IsInternalPluginAvailableForMimeType, OnIsInternalPluginAvailableForMimeType) #endif @@ -287,7 +287,7 @@ void CefPluginInfoMessageFilter::PluginsLoaded( } } -#if BUILDFLAG(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_LIBRARY_CDMS) void CefPluginInfoMessageFilter::OnIsInternalPluginAvailableForMimeType( const std::string& mime_type, @@ -323,7 +323,7 @@ void CefPluginInfoMessageFilter::OnIsInternalPluginAvailableForMimeType( mime_type, is_plugin_disabled ? PLUGIN_DISABLED : PLUGIN_NOT_REGISTERED); } -#endif // BUILDFLAG(ENABLE_PEPPER_CDMS) +#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) void CefPluginInfoMessageFilter::Context::DecidePluginStatus( const GetPluginInfo_Params& params, diff --git a/libcef/browser/plugins/plugin_info_message_filter.h b/libcef/browser/plugins/plugin_info_message_filter.h index 6b1fe3a0a..39ccfffdb 100644 --- a/libcef/browser/plugins/plugin_info_message_filter.h +++ b/libcef/browser/plugins/plugin_info_message_filter.h @@ -20,7 +20,7 @@ #include "components/prefs/pref_member.h" #include "content/public/browser/browser_message_filter.h" #include "extensions/features/features.h" -#include "ppapi/features/features.h" +#include "media/media_features.h" class CefBrowserContext; class CefResourceContext; @@ -111,7 +111,7 @@ class CefPluginInfoMessageFilter : public content::BrowserMessageFilter { IPC::Message* reply_msg, const std::vector& plugins); -#if BUILDFLAG(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_LIBRARY_CDMS) // Returns whether any internal plugin supporting |mime_type| is registered // and enabled. Does not determine whether the plugin can actually be // instantiated (e.g. whether it has all its dependencies). diff --git a/libcef/browser/prefs/pref_store.cc b/libcef/browser/prefs/pref_store.cc index 235857f96..0b89c653e 100644 --- a/libcef/browser/prefs/pref_store.cc +++ b/libcef/browser/prefs/pref_store.cc @@ -101,6 +101,12 @@ void CefPrefStore::CommitPendingWrite(base::OnceClosure done_callback) { void CefPrefStore::SchedulePendingLossyWrites() {} +void CefPrefStore::ClearMutableValues() { + NOTIMPLEMENTED(); +} + +void CefPrefStore::OnStoreDeletionFromDisk() {} + void CefPrefStore::SetInitializationCompleted() { NotifyInitializationCompleted(); } @@ -167,10 +173,6 @@ void CefPrefStore::SetBlockAsyncRead(bool block_async_read) { NotifyInitializationCompleted(); } -void CefPrefStore::ClearMutableValues() { - NOTIMPLEMENTED(); -} - void CefPrefStore::set_read_only(bool read_only) { read_only_ = read_only; } diff --git a/libcef/browser/prefs/pref_store.h b/libcef/browser/prefs/pref_store.h index d12d5347c..d12a0a312 100644 --- a/libcef/browser/prefs/pref_store.h +++ b/libcef/browser/prefs/pref_store.h @@ -47,6 +47,8 @@ class CefPrefStore : public PersistentPrefStore { void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override; virtual void CommitPendingWrite(base::OnceClosure done_callback) override; void SchedulePendingLossyWrites() override; + void ClearMutableValues() override; + void OnStoreDeletionFromDisk() override; // Marks the store as having completed initialization. void SetInitializationCompleted(); @@ -70,8 +72,6 @@ class CefPrefStore : public PersistentPrefStore { // the call to ReadPrefsAsync. void SetBlockAsyncRead(bool block_async_read); - void ClearMutableValues() override; - // Getter and Setter methods for setting and getting the state of the // |TestingPrefStore|. virtual void set_read_only(bool read_only); diff --git a/libcef/browser/printing/print_view_manager.cc b/libcef/browser/printing/print_view_manager.cc index 7aa65263e..c41e1c7a6 100644 --- a/libcef/browser/printing/print_view_manager.cc +++ b/libcef/browser/printing/print_view_manager.cc @@ -149,7 +149,7 @@ void SavePdfFile(scoped_refptr data, DCHECK_CURRENTLY_ON(BrowserThread::FILE); DCHECK_GT(data->size(), 0U); - PdfMetafileSkia metafile(PDF_SKIA_DOCUMENT_TYPE); + PdfMetafileSkia metafile(SkiaDocumentType::PDF); metafile.InitFromData(static_cast(data->front()), data->size()); base::File file(path, diff --git a/libcef/browser/printing/print_view_manager_base.cc b/libcef/browser/printing/print_view_manager_base.cc index ed3b539da..78e715761 100644 --- a/libcef/browser/printing/print_view_manager_base.cc +++ b/libcef/browser/printing/print_view_manager_base.cc @@ -154,7 +154,7 @@ void CefPrintViewManagerBase::OnDidPrintPage( } std::unique_ptr metafile( - new PdfMetafileSkia(PDF_SKIA_DOCUMENT_TYPE)); + new PdfMetafileSkia(SkiaDocumentType::PDF)); if (metafile_must_be_valid) { if (!metafile->InitFromData(shared_buf->memory(), params.data_size)) { NOTREACHED() << "Invalid metafile header"; @@ -338,7 +338,7 @@ bool CefPrintViewManagerBase::RenderAllMissingPagesNow() { // to actually spool the pages, only to have the renderer generate them. Run // a message loop until we get our signal that the print job is satisfied. // PrintJob will send a ALL_PAGES_REQUESTED after having received all the - // pages it needs. MessageLoop::current()->QuitWhenIdle() will be called as + // pages it needs. RunLoop::QuitCurrentWhenIdleDeprecated() will be called as // soon as print_job_->document()->IsComplete() is true on either // ALL_PAGES_REQUESTED or in DidPrintPage(). The check is done in // ShouldQuitFromInnerMessageLoop(). @@ -358,7 +358,7 @@ void CefPrintViewManagerBase::ShouldQuitFromInnerMessageLoop() { inside_inner_message_loop_) { // We are in a message loop created by RenderAllMissingPagesNow. Quit from // it. - base::MessageLoop::current()->QuitWhenIdle(); + base::RunLoop::QuitCurrentWhenIdleDeprecated(); inside_inner_message_loop_ = false; } } @@ -464,9 +464,10 @@ bool CefPrintViewManagerBase::RunInnerMessageLoop() { // memory-bound. static const int kPrinterSettingsTimeout = 60000; base::OneShotTimer quit_timer; - quit_timer.Start( - FROM_HERE, TimeDelta::FromMilliseconds(kPrinterSettingsTimeout), - base::MessageLoop::current(), &base::MessageLoop::QuitWhenIdle); + base::RunLoop run_loop; + quit_timer.Start(FROM_HERE, + TimeDelta::FromMilliseconds(kPrinterSettingsTimeout), + run_loop.QuitWhenIdleClosure()); inside_inner_message_loop_ = true; @@ -474,7 +475,7 @@ bool CefPrintViewManagerBase::RunInnerMessageLoop() { { base::MessageLoop::ScopedNestableTaskAllower allow( base::MessageLoop::current()); - base::RunLoop().Run(); + run_loop.Run(); } bool success = true; diff --git a/libcef/browser/request_context_impl.cc b/libcef/browser/request_context_impl.cc index b4f54204e..17891bb93 100644 --- a/libcef/browser/request_context_impl.cc +++ b/libcef/browser/request_context_impl.cc @@ -26,7 +26,7 @@ using content::BrowserThread; namespace { -base::StaticAtomicSequenceNumber g_next_id; +base::AtomicSequenceNumber g_next_id; const char* GetTypeString(base::Value::Type type) { switch (type) { diff --git a/libcef/browser/speech_recognition_manager_delegate.h b/libcef/browser/speech_recognition_manager_delegate.h index f2e9ce662..f35d933b8 100644 --- a/libcef/browser/speech_recognition_manager_delegate.h +++ b/libcef/browser/speech_recognition_manager_delegate.h @@ -14,7 +14,7 @@ // interface. Based on chrome/browser/speech/ // chrome_speech_recognition_manager_delegate.[cc|h] class CefSpeechRecognitionManagerDelegate - : NON_EXPORTED_BASE(public content::SpeechRecognitionManagerDelegate), + : public content::SpeechRecognitionManagerDelegate, public content::SpeechRecognitionEventListener { public: CefSpeechRecognitionManagerDelegate(); diff --git a/libcef/browser/storage_partition_proxy.cc b/libcef/browser/storage_partition_proxy.cc index 13029312a..c738abdb4 100644 --- a/libcef/browser/storage_partition_proxy.cc +++ b/libcef/browser/storage_partition_proxy.cc @@ -26,6 +26,10 @@ CefStoragePartitionProxy::GetMediaURLRequestContext() { return GetURLRequestContext(); } +content::mojom::NetworkContext* CefStoragePartitionProxy::GetNetworkContext() { + return parent_->GetNetworkContext(); +} + storage::QuotaManager* CefStoragePartitionProxy::GetQuotaManager() { return parent_->GetQuotaManager(); } @@ -162,10 +166,6 @@ void CefStoragePartitionProxy::ClearBluetoothAllowedDevicesMapForTesting() { parent_->ClearBluetoothAllowedDevicesMapForTesting(); } -content::mojom::NetworkContext* CefStoragePartitionProxy::network_context() { - return parent_->network_context(); -} - content::URLLoaderFactoryGetter* CefStoragePartitionProxy::url_loader_factory_getter() { return parent_->url_loader_factory_getter(); @@ -176,6 +176,7 @@ content::BrowserContext* CefStoragePartitionProxy::browser_context() const { } void CefStoragePartitionProxy::Bind( + int process_id, mojo::InterfaceRequest request) { - parent_->Bind(std::move(request)); + parent_->Bind(process_id, std::move(request)); } diff --git a/libcef/browser/storage_partition_proxy.h b/libcef/browser/storage_partition_proxy.h index e8d1330c6..8c7dfd1f8 100644 --- a/libcef/browser/storage_partition_proxy.h +++ b/libcef/browser/storage_partition_proxy.h @@ -24,6 +24,7 @@ class CefStoragePartitionProxy : public content::StoragePartition { base::FilePath GetPath() override; net::URLRequestContextGetter* GetURLRequestContext() override; net::URLRequestContextGetter* GetMediaURLRequestContext() override; + content::mojom::NetworkContext* GetNetworkContext() override; storage::QuotaManager* GetQuotaManager() override; content::AppCacheService* GetAppCacheService() override; storage::FileSystemContext* GetFileSystemContext() override; @@ -70,10 +71,10 @@ class CefStoragePartitionProxy : public content::StoragePartition { const base::Closure& callback) override; void Flush() override; void ClearBluetoothAllowedDevicesMapForTesting() override; - content::mojom::NetworkContext* network_context() override; content::URLLoaderFactoryGetter* url_loader_factory_getter() override; content::BrowserContext* browser_context() const override; - void Bind(mojo::InterfaceRequest + void Bind(int process_id, + mojo::InterfaceRequest request) override; content::StoragePartition* parent() const { return parent_; } diff --git a/libcef/browser/views/basic_label_button_impl.cc b/libcef/browser/views/basic_label_button_impl.cc index 752626583..af93775ab 100644 --- a/libcef/browser/views/basic_label_button_impl.cc +++ b/libcef/browser/views/basic_label_button_impl.cc @@ -26,8 +26,7 @@ CefRefPtr CefBasicLabelButtonImpl::Create( if (!text.empty()) label_button->SetText(text); if (with_frame) { - label_button->root_view()->SetStyleDeprecated( - views::CustomButton::STYLE_BUTTON); + label_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON); } return label_button; } diff --git a/libcef/browser/views/button_impl.h b/libcef/browser/views/button_impl.h index 40ee01834..ace8f740b 100644 --- a/libcef/browser/views/button_impl.h +++ b/libcef/browser/views/button_impl.h @@ -13,7 +13,7 @@ #include "base/logging.h" #include "ui/gfx/color_utils.h" -#include "ui/views/controls/button/custom_button.h" +#include "ui/views/controls/button/button.h" // Helpers for template boiler-plate. #define CEF_BUTTON_IMPL_T CEF_VIEW_IMPL_T @@ -54,7 +54,7 @@ CEF_BUTTON_IMPL_T void CEF_BUTTON_IMPL_D::SetState(cef_button_state_t state) { static_cast(state); if (ParentClass::root_view()->ink_drop_mode() != - views::CustomButton::InkDropMode::OFF && + views::Button::InkDropMode::OFF && !ParentClass::root_view()->IsFocusable()) { // Ink drop state does not get set properly on state change when the button // is non-focusable. diff --git a/libcef/browser/views/button_view.h b/libcef/browser/views/button_view.h index baaa9c9b5..6a112c608 100644 --- a/libcef/browser/views/button_view.h +++ b/libcef/browser/views/button_view.h @@ -12,15 +12,15 @@ #include "libcef/browser/views/view_view.h" #include "base/logging.h" -#include "ui/views/controls/button/custom_button.h" +#include "ui/views/controls/button/button.h" // Helpers for template boiler-plate. #define CEF_BUTTON_VIEW_T CEF_VIEW_VIEW_T #define CEF_BUTTON_VIEW_A CEF_VIEW_VIEW_A #define CEF_BUTTON_VIEW_D CefButtonView -// Template for implementing views::CustomButton-derived classes. The -// views::CustomButton-derived type passed to this template must extend +// Template for implementing views::Button-derived classes. The +// views::Button-derived type passed to this template must extend // views::ButtonListener (for example, see LabelButtonEx from // basic_label_button_view.h). See comments in view_impl.h for a usage overview. CEF_BUTTON_VIEW_T class CefButtonView : public CEF_VIEW_VIEW_D { @@ -39,15 +39,15 @@ CEF_BUTTON_VIEW_T class CefButtonView : public CEF_VIEW_VIEW_D { return button; } - // views::CustomButton methods: - void StateChanged(views::CustomButton::ButtonState old_state) override; + // views::Button methods: + void StateChanged(views::Button::ButtonState old_state) override; // views::ButtonListener methods: void ButtonPressed(views::Button* sender, const ui::Event& event) override; }; CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::StateChanged( - views::CustomButton::ButtonState old_state) { + views::Button::ButtonState old_state) { ParentClass::StateChanged(old_state); if (ParentClass::cef_delegate()) ParentClass::cef_delegate()->OnButtonStateChanged(GetCefButton()); @@ -59,9 +59,9 @@ CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::ButtonPressed( // Callback may trigger new animation state. if (ParentClass::cef_delegate()) ParentClass::cef_delegate()->OnButtonPressed(GetCefButton()); - if (ParentClass::ink_drop_mode() != views::CustomButton::InkDropMode::OFF && + if (ParentClass::ink_drop_mode() != views::Button::InkDropMode::OFF && !ParentClass::IsFocusable() && - ParentClass::state() != views::CustomButton::STATE_PRESSED) { + ParentClass::state() != views::Button::STATE_PRESSED) { // Ink drop state does not get reset properly on click when the button is // non-focusable. Reset the ink drop state here if the state has not been // explicitly set to pressed by the OnButtonPressed callback calling diff --git a/libcef/browser/views/menu_button_impl.cc b/libcef/browser/views/menu_button_impl.cc index 2807c91a2..9bb6e0c5f 100644 --- a/libcef/browser/views/menu_button_impl.cc +++ b/libcef/browser/views/menu_button_impl.cc @@ -34,8 +34,7 @@ CefRefPtr CefMenuButtonImpl::Create( if (!text.empty()) menu_button->SetText(text); if (with_frame) { - menu_button->root_view()->SetStyleDeprecated( - views::CustomButton::STYLE_BUTTON); + menu_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON); } menu_button->root_view()->set_show_menu_marker(with_menu_marker); return menu_button; diff --git a/libcef/browser/views/view_impl.h b/libcef/browser/views/view_impl.h index de6faac47..d6b444da3 100644 --- a/libcef/browser/views/view_impl.h +++ b/libcef/browser/views/view_impl.h @@ -53,8 +53,7 @@ // And the CefBasicLabelButtonView object created via // CefBasicLabelButtonImpl::CreateRootView() has the following object hierarchy: // -// views::View => views::Button => views::CustomButton => -// views::LabelButton => +// views::View => views::Button => views::LabelButton => // LabelButtonEx (used to implement the required no-argument constructor) => // CefViewView => // CefButtonView => diff --git a/libcef/browser/web_plugin_impl.cc b/libcef/browser/web_plugin_impl.cc index 102403aa4..b4a2ccc6a 100644 --- a/libcef/browser/web_plugin_impl.cc +++ b/libcef/browser/web_plugin_impl.cc @@ -30,7 +30,7 @@ void PluginsCallbackImpl( } } -#if !(defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)) || \ +#if !(defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)) || \ defined(OS_LINUX) void DeliverWidevineCdmError(const std::string& error_message, @@ -168,7 +168,7 @@ void CefIsWebPluginUnstable(const CefString& path, void CefRegisterWidevineCdm(const CefString& path, CefRefPtr callback) { -#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) #if defined(OS_LINUX) // Enforce the requirement that CefRegisterWidevineCdm() is called before // CefInitialize() on Linux. See comments in @@ -184,5 +184,5 @@ void CefRegisterWidevineCdm(const CefString& path, CefWidevineLoader::GetInstance()->LoadWidevineCdm(path, callback); #else DeliverWidevineCdmError("Widevine registration is not supported", callback); -#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) } diff --git a/libcef/common/cef_messages.h b/libcef/common/cef_messages.h index 5bd23b8eb..02ba89c0b 100644 --- a/libcef/common/cef_messages.h +++ b/libcef/common/cef_messages.h @@ -133,9 +133,9 @@ IPC_STRUCT_BEGIN(CefMsg_LoadRequest_Params) // Usually the URL of the document in the top-level window, which may be // checked by the third-party cookie blocking policy. Leaving it empty may // lead to undesired cookie blocking. Third-party cookie blocking can be - // bypassed by setting first_party_for_cookies = url, but this should ideally + // bypassed by setting site_for_cookies = url, but this should ideally // only be done if there really is no way to determine the correct value. - IPC_STRUCT_MEMBER(GURL, first_party_for_cookies) + IPC_STRUCT_MEMBER(GURL, site_for_cookies) // Additional HTTP request headers. IPC_STRUCT_MEMBER(std::string, headers) diff --git a/libcef/common/content_client.cc b/libcef/common/content_client.cc index 9f333b99f..405a7b7bd 100644 --- a/libcef/common/content_client.cc +++ b/libcef/common/content_client.cc @@ -205,7 +205,7 @@ void CefContentClient::AddPepperPlugins( AddPepperFlashFromCommandLine(plugins); #if defined(OS_LINUX) -#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) CefWidevineLoader::AddPepperPlugins(plugins); #endif #endif diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index 8e451b620..264b1decc 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -67,6 +67,11 @@ namespace { +const char* const kNonWildcardDomainNonPortSchemes[] = { + extensions::kExtensionScheme}; +const size_t kNonWildcardDomainNonPortSchemesSize = + arraysize(kNonWildcardDomainNonPortSchemes); + #if defined(OS_MACOSX) base::FilePath GetResourcesFilePath() { @@ -481,8 +486,8 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) { logging::InitLogging(log_settings); - ContentSettingsPattern::SetNonWildcardDomainNonPortScheme( - extensions::kExtensionScheme); + ContentSettingsPattern::SetNonWildcardDomainNonPortSchemes( + kNonWildcardDomainNonPortSchemes, kNonWildcardDomainNonPortSchemesSize); content::SetContentClient(&content_client_); diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index ee674e82a..325e9d96c 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -345,15 +345,15 @@ void CefRequestImpl::SetFlags(int flags) { CefString CefRequestImpl::GetFirstPartyForCookies() { base::AutoLock lock_scope(lock_); - return first_party_for_cookies_.spec(); + return site_for_cookies_.spec(); } void CefRequestImpl::SetFirstPartyForCookies(const CefString& url) { base::AutoLock lock_scope(lock_); CHECK_READONLY_RETURN_VOID(); const GURL& new_url = GURL(url.ToString()); - if (first_party_for_cookies_ != new_url) { - first_party_for_cookies_ = new_url; + if (site_for_cookies_ != new_url) { + site_for_cookies_ = new_url; Changed(kChangedFirstPartyForCookies); } } @@ -405,7 +405,7 @@ void CefRequestImpl::Set(net::URLRequest* request) { static_cast(postdata_.get())->Set(*data); } - first_party_for_cookies_ = request->first_party_for_cookies(); + site_for_cookies_ = request->site_for_cookies(); const content::ResourceRequestInfo* info = content::ResourceRequestInfo::ForRequest(request); @@ -443,9 +443,9 @@ void CefRequestImpl::Get(net::URLRequest* request, bool changed_only) const { } } - if (!first_party_for_cookies_.is_empty() && + if (!site_for_cookies_.is_empty() && ShouldSet(kChangedFirstPartyForCookies, changed_only)) { - request->set_first_party_for_cookies(first_party_for_cookies_); + request->set_site_for_cookies(site_for_cookies_); } } @@ -492,7 +492,7 @@ void CefRequestImpl::Set(const blink::WebURLRequest& request) { static_cast(postdata_.get())->Set(body); } - first_party_for_cookies_ = request.FirstPartyForCookies(); + site_for_cookies_ = request.SiteForCookies(); if (request.GetCachePolicy() == blink::WebCachePolicy::kBypassingCache) flags_ |= UR_FLAG_SKIP_CACHE; @@ -541,8 +541,8 @@ void CefRequestImpl::Get(blink::WebURLRequest& request, ::SetHeaderMap(headermap_, request); - if (!first_party_for_cookies_.is_empty()) - request.SetFirstPartyForCookies(first_party_for_cookies_); + if (!site_for_cookies_.is_empty()) + request.SetSiteForCookies(site_for_cookies_); request.SetCachePolicy((flags_ & UR_FLAG_SKIP_CACHE) ? blink::WebCachePolicy::kBypassingCache @@ -620,8 +620,8 @@ void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params, request.SetHTTPBody(body); } - if (params.first_party_for_cookies.is_valid()) - request.SetFirstPartyForCookies(params.first_party_for_cookies); + if (params.site_for_cookies.is_valid()) + request.SetSiteForCookies(params.site_for_cookies); request.SetCachePolicy((params.load_flags & UR_FLAG_SKIP_CACHE) ? blink::WebCachePolicy::kBypassingCache @@ -653,7 +653,7 @@ void CefRequestImpl::Get(CefNavigateParams& params) const { impl->Get(*params.upload_data.get()); } - params.first_party_for_cookies = first_party_for_cookies_; + params.site_for_cookies = site_for_cookies_; params.load_flags = flags_; } @@ -722,8 +722,8 @@ void CefRequestImpl::Get(net::URLFetcher& fetcher, } } - if (!first_party_for_cookies_.is_empty()) - fetcher.SetInitiator(url::Origin(first_party_for_cookies_)); + if (!site_for_cookies_.is_empty()) + fetcher.SetInitiator(url::Origin(site_for_cookies_)); if (flags_ & UR_FLAG_NO_RETRY_ON_5XX) fetcher.SetAutomaticallyRetryOn5xx(false); @@ -881,7 +881,7 @@ void CefRequestImpl::Reset() { transition_type_ = TT_EXPLICIT; identifier_ = 0U; flags_ = UR_FLAG_NONE; - first_party_for_cookies_ = GURL(); + site_for_cookies_ = GURL(); changes_ = kChangedNone; } @@ -1299,8 +1299,15 @@ void CefPostDataElementImpl::Set(const blink::WebHTTPBody::Element& element) { } if (element.type == blink::WebHTTPBody::Element::kTypeData) { - SetToBytes(element.data.size(), - static_cast(element.data.Data())); + std::string file_contents; + file_contents.reserve(element.data.size()); + element.data.ForEachSegment([&file_contents](const char* segment, + size_t segment_size, + size_t segment_offset) { + file_contents.append(segment, segment_size); + return true; + }); + SetToBytes(file_contents.size(), file_contents.data()); } else if (element.type == blink::WebHTTPBody::Element::kTypeFile) { SetToFile(element.file_path.Utf16()); } else { diff --git a/libcef/common/request_impl.h b/libcef/common/request_impl.h index ae2d303e3..497b4a0e5 100644 --- a/libcef/common/request_impl.h +++ b/libcef/common/request_impl.h @@ -142,7 +142,7 @@ class CefRequestImpl : public CefRequest { // The below members are used by CefURLRequest. int flags_; - GURL first_party_for_cookies_; + GURL site_for_cookies_; // True if this object is read-only. bool read_only_; diff --git a/libcef/common/task_impl.cc b/libcef/common/task_impl.cc index a1d7393c5..e03744c4b 100644 --- a/libcef/common/task_impl.cc +++ b/libcef/common/task_impl.cc @@ -12,7 +12,7 @@ bool CefCurrentlyOn(CefThreadId threadId) { scoped_refptr task_runner = CefTaskRunnerImpl::GetTaskRunner(threadId); if (task_runner.get()) - return task_runner->RunsTasksOnCurrentThread(); + return task_runner->RunsTasksInCurrentSequence(); return false; } diff --git a/libcef/common/task_runner_impl.cc b/libcef/common/task_runner_impl.cc index b054a744b..eacca758c 100644 --- a/libcef/common/task_runner_impl.cc +++ b/libcef/common/task_runner_impl.cc @@ -129,7 +129,7 @@ bool CefTaskRunnerImpl::IsSame(CefRefPtr that) { } bool CefTaskRunnerImpl::BelongsToCurrentThread() { - return task_runner_->RunsTasksOnCurrentThread(); + return task_runner_->RunsTasksInCurrentSequence(); } bool CefTaskRunnerImpl::BelongsToThread(CefThreadId threadId) { diff --git a/libcef/common/thread_impl.cc b/libcef/common/thread_impl.cc index 71de26215..400f3ea01 100644 --- a/libcef/common/thread_impl.cc +++ b/libcef/common/thread_impl.cc @@ -45,7 +45,7 @@ CefThreadImpl::CefThreadImpl() : thread_id_(kInvalidPlatformThreadId) {} CefThreadImpl::~CefThreadImpl() { if (thread_.get()) { - if (!owner_task_runner_->RunsTasksOnCurrentThread()) { + if (!owner_task_runner_->RunsTasksInCurrentSequence()) { // Delete |thread_| on the correct thread. owner_task_runner_->PostTask( FROM_HERE, @@ -126,7 +126,7 @@ cef_platform_thread_id_t CefThreadImpl::GetPlatformThreadId() { void CefThreadImpl::Stop() { if (!owner_task_runner_) return; - if (!owner_task_runner_->RunsTasksOnCurrentThread()) { + if (!owner_task_runner_->RunsTasksInCurrentSequence()) { NOTREACHED() << "called on invalid thread"; return; } @@ -138,7 +138,7 @@ void CefThreadImpl::Stop() { bool CefThreadImpl::IsRunning() { if (!owner_task_runner_) return false; - if (!owner_task_runner_->RunsTasksOnCurrentThread()) { + if (!owner_task_runner_->RunsTasksInCurrentSequence()) { NOTREACHED() << "called on invalid thread"; return false; } diff --git a/libcef/common/widevine_loader.cc b/libcef/common/widevine_loader.cc index 93ccd51e5..b5bffc9b5 100644 --- a/libcef/common/widevine_loader.cc +++ b/libcef/common/widevine_loader.cc @@ -4,7 +4,7 @@ #include "libcef/common/widevine_loader.h" -#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) #include "libcef/browser/context.h" #include "libcef/browser/thread_util.h" @@ -394,4 +394,4 @@ CefWidevineLoader::CefWidevineLoader() {} CefWidevineLoader::~CefWidevineLoader() {} -#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) diff --git a/libcef/common/widevine_loader.h b/libcef/common/widevine_loader.h index b7711fcb0..5e1894d7d 100644 --- a/libcef/common/widevine_loader.h +++ b/libcef/common/widevine_loader.h @@ -10,7 +10,7 @@ #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. -#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) #include @@ -59,6 +59,6 @@ class CefWidevineLoader { ~CefWidevineLoader(); }; -#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) +#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) #endif // CEF_LIBCEF_COMMON_WIDEVINE_LOADER_H_ diff --git a/libcef/renderer/browser_impl.cc b/libcef/renderer/browser_impl.cc index 3dbfc6d81..23ce29715 100644 --- a/libcef/renderer/browser_impl.cc +++ b/libcef/renderer/browser_impl.cc @@ -31,7 +31,6 @@ #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebURLError.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" -#include "third_party/WebKit/public/web/WebDataSource.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebFrameContentDumper.h" @@ -446,11 +445,11 @@ void CefBrowserImpl::DidStopLoading() { } void CefBrowserImpl::DidFinishLoad(blink::WebLocalFrame* frame) { - blink::WebDataSource* ds = frame->DataSource(); + blink::WebDocumentLoader* dl = frame->GetDocumentLoader(); Send(new CefHostMsg_DidFinishLoad(routing_id(), render_frame_util::GetIdentifier(frame), - ds->GetRequest().Url(), !frame->Parent(), - ds->GetResponse().HttpStatusCode())); + dl->GetRequest().Url(), !frame->Parent(), + dl->GetResponse().HttpStatusCode())); OnLoadEnd(frame); } @@ -718,7 +717,7 @@ void CefBrowserImpl::OnLoadEnd(blink::WebLocalFrame* frame) { if (load_handler.get()) { CefRefPtr cef_frame = GetWebFrameImpl(frame); int httpStatusCode = - frame->DataSource()->GetResponse().HttpStatusCode(); + frame->GetDocumentLoader()->GetResponse().HttpStatusCode(); load_handler->OnLoadEnd(this, cef_frame.get(), httpStatusCode); } } diff --git a/libcef/renderer/content_renderer_client.cc b/libcef/renderer/content_renderer_client.cc index f28a0a367..c5822c374 100644 --- a/libcef/renderer/content_renderer_client.cc +++ b/libcef/renderer/content_renderer_client.cc @@ -25,7 +25,7 @@ #include "libcef/common/values_impl.h" #include "libcef/renderer/browser_impl.h" #include "libcef/renderer/extensions/extensions_renderer_client.h" -#include "libcef/renderer/extensions/print_web_view_helper_delegate.h" +#include "libcef/renderer/extensions/print_render_frame_helper_delegate.h" #include "libcef/renderer/media/cef_key_systems.h" #include "libcef/renderer/pepper/pepper_helper.h" #include "libcef/renderer/plugins/cef_plugin_placeholder.h" @@ -57,7 +57,7 @@ #include "chrome/renderer/plugins/power_saver_info.h" #include "components/content_settings/core/common/content_settings_types.h" #include "components/nacl/common/nacl_constants.h" -#include "components/printing/renderer/print_web_view_helper.h" +#include "components/printing/renderer/print_render_frame_helper.h" #include "components/spellcheck/renderer/spellcheck.h" #include "components/spellcheck/renderer/spellcheck_provider.h" #include "components/visitedlink/renderer/visitedlink_slave.h" @@ -75,6 +75,7 @@ #include "content/public/renderer/render_view_visitor.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_widget.h" +#include "extensions/common/switches.h" #include "extensions/renderer/renderer_extension_registry.h" #include "ipc/ipc_sync_channel.h" #include "media/base/media.h" @@ -84,6 +85,7 @@ #include "third_party/WebKit/public/platform/WebRuntimeFeatures.h" #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURL.h" +#include "third_party/WebKit/public/platform/scheduler/renderer_process_type.h" #include "third_party/WebKit/public/web/WebConsoleMessage.h" #include "third_party/WebKit/public/web/WebElement.h" #include "third_party/WebKit/public/web/WebFrame.h" @@ -158,6 +160,12 @@ void AppendParams(const std::vector& additional_names, existing_values->Swap(values); } +bool IsStandaloneExtensionProcess() { + return extensions::ExtensionsEnabled() && + extensions::CefExtensionsRendererClient:: + IsStandaloneExtensionProcess(); +} + } // namespace // Placeholder object for guest views. @@ -389,6 +397,12 @@ void CefContentRendererClient::RenderThreadStarted() { web_cache_impl_.reset(new web_cache::WebCacheImpl()); content::RenderThread* thread = content::RenderThread::Get(); + + thread->SetRendererProcessType( + IsStandaloneExtensionProcess() + ? blink::scheduler::RendererProcessType::kExtensionRenderer + : blink::scheduler::RendererProcessType::kRenderer); + thread->AddObserver(observer_.get()); thread->GetChannel()->AddFilter(new CefRenderMessageFilter); @@ -462,14 +476,17 @@ void CefContentRendererClient::RenderThreadConnected() { void CefContentRendererClient::RenderFrameCreated( content::RenderFrame* render_frame) { - new CefRenderFrameObserver(render_frame); + CefRenderFrameObserver* render_frame_observer = + new CefRenderFrameObserver(render_frame); + service_manager::BinderRegistry* registry = render_frame_observer->registry(); + new CefPepperHelper(render_frame); - new printing::PrintWebViewHelper( + new printing::PrintRenderFrameHelper( render_frame, - base::WrapUnique(new extensions::CefPrintWebViewHelperDelegate())); + base::WrapUnique(new extensions::CefPrintRenderFrameHelperDelegate())); if (extensions::ExtensionsEnabled()) - extensions_renderer_client_->RenderFrameCreated(render_frame); + extensions_renderer_client_->RenderFrameCreated(render_frame, registry); const base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); diff --git a/libcef/renderer/extensions/extensions_renderer_client.cc b/libcef/renderer/extensions/extensions_renderer_client.cc index d7c9c9999..f8c378729 100644 --- a/libcef/renderer/extensions/extensions_renderer_client.cc +++ b/libcef/renderer/extensions/extensions_renderer_client.cc @@ -21,6 +21,7 @@ #include "extensions/renderer/dispatcher.h" #include "extensions/renderer/extension_frame_helper.h" #include "extensions/renderer/extension_helper.h" +#include "extensions/renderer/extensions_render_frame_observer.h" #include "extensions/renderer/guest_view/extensions_guest_view_container.h" #include "extensions/renderer/guest_view/extensions_guest_view_container_dispatcher.h" #include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h" @@ -34,11 +35,6 @@ namespace extensions { namespace { -bool IsStandaloneExtensionProcess() { - return base::CommandLine::ForCurrentProcess()->HasSwitch( - extensions::switches::kExtensionProcess); -} - void IsGuestViewApiAvailableToScriptContext( bool* api_is_available, extensions::ScriptContext* context) { @@ -86,7 +82,7 @@ bool CrossesExtensionExtents(blink::WebLocalFrame* frame, opener_top_extension && opener_top_extension->id() == extensions::kWebStoreAppId; if (!is_extension_url && !opener_is_extension_url && !opener_is_web_store && - IsStandaloneExtensionProcess() && + CefExtensionsRendererClient::IsStandaloneExtensionProcess() && opener_origin.CanRequest(blink::WebURL(new_url))) return false; } @@ -148,7 +144,9 @@ void CefExtensionsRendererClient::RenderThreadStarted() { } void CefExtensionsRendererClient::RenderFrameCreated( - content::RenderFrame* render_frame) { + content::RenderFrame* render_frame, + service_manager::BinderRegistry* registry) { + new extensions::ExtensionsRenderFrameObserver(render_frame, registry); new extensions::ExtensionFrameHelper(render_frame, extension_dispatcher_.get()); extension_dispatcher_->OnRenderFrameCreated(render_frame); @@ -204,6 +202,12 @@ void CefExtensionsRendererClient::RunScriptsAtDocumentIdle( extension_dispatcher_->RunScriptsAtDocumentIdle(render_frame); } +// static +bool CefExtensionsRendererClient::IsStandaloneExtensionProcess() { + return base::CommandLine::ForCurrentProcess()->HasSwitch( + extensions::switches::kExtensionProcess); +} + // static bool CefExtensionsRendererClient::ShouldFork(blink::WebLocalFrame* frame, const GURL& url, diff --git a/libcef/renderer/extensions/extensions_renderer_client.h b/libcef/renderer/extensions/extensions_renderer_client.h index eed5af98d..b3c2dc105 100644 --- a/libcef/renderer/extensions/extensions_renderer_client.h +++ b/libcef/renderer/extensions/extensions_renderer_client.h @@ -10,6 +10,7 @@ #include "base/macros.h" #include "extensions/renderer/extensions_renderer_client.h" +#include "services/service_manager/public/cpp/binder_registry.h" #include "ui/base/page_transition_types.h" class GURL; @@ -49,7 +50,8 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient { // See CefContentRendererClient methods with the same names. void RenderThreadStarted(); - void RenderFrameCreated(content::RenderFrame* render_frame); + void RenderFrameCreated(content::RenderFrame* render_frame, + service_manager::BinderRegistry* registry); void RenderViewCreated(content::RenderView* render_view); bool OverrideCreatePlugin(content::RenderFrame* render_frame, const blink::WebPluginParams& params); @@ -61,6 +63,7 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient { void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame); void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame); + static bool IsStandaloneExtensionProcess(); static bool ShouldFork(blink::WebLocalFrame* frame, const GURL& url, bool is_initial_navigation, diff --git a/libcef/renderer/extensions/print_web_view_helper_delegate.cc b/libcef/renderer/extensions/print_render_frame_helper_delegate.cc similarity index 82% rename from libcef/renderer/extensions/print_web_view_helper_delegate.cc rename to libcef/renderer/extensions/print_render_frame_helper_delegate.cc index 8c398b07b..dac1fc0c4 100644 --- a/libcef/renderer/extensions/print_web_view_helper_delegate.cc +++ b/libcef/renderer/extensions/print_render_frame_helper_delegate.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "libcef/renderer/extensions/print_web_view_helper_delegate.h" +#include "libcef/renderer/extensions/print_render_frame_helper_delegate.h" #include @@ -18,15 +18,15 @@ namespace extensions { -CefPrintWebViewHelperDelegate::~CefPrintWebViewHelperDelegate() {} +CefPrintRenderFrameHelperDelegate::~CefPrintRenderFrameHelperDelegate() {} -bool CefPrintWebViewHelperDelegate::CancelPrerender( +bool CefPrintRenderFrameHelperDelegate::CancelPrerender( content::RenderFrame* render_frame) { return false; } // Return the PDF object element if |frame| is the out of process PDF extension. -blink::WebElement CefPrintWebViewHelperDelegate::GetPdfElement( +blink::WebElement CefPrintRenderFrameHelperDelegate::GetPdfElement( blink::WebLocalFrame* frame) { GURL url = frame->GetDocument().Url(); if (url.SchemeIs(extensions::kExtensionScheme) && @@ -42,11 +42,12 @@ blink::WebElement CefPrintWebViewHelperDelegate::GetPdfElement( return blink::WebElement(); } -bool CefPrintWebViewHelperDelegate::IsPrintPreviewEnabled() { +bool CefPrintRenderFrameHelperDelegate::IsPrintPreviewEnabled() { return false; } -bool CefPrintWebViewHelperDelegate::OverridePrint(blink::WebLocalFrame* frame) { +bool CefPrintRenderFrameHelperDelegate::OverridePrint( + blink::WebLocalFrame* frame) { if (!frame->GetDocument().IsPluginDocument()) return false; diff --git a/libcef/renderer/extensions/print_web_view_helper_delegate.h b/libcef/renderer/extensions/print_render_frame_helper_delegate.h similarity index 51% rename from libcef/renderer/extensions/print_web_view_helper_delegate.h rename to libcef/renderer/extensions/print_render_frame_helper_delegate.h index 75e6f105e..3a4239b6e 100644 --- a/libcef/renderer/extensions/print_web_view_helper_delegate.h +++ b/libcef/renderer/extensions/print_render_frame_helper_delegate.h @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ -#define CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ +#ifndef CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_ +#define CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_ -#include "components/printing/renderer/print_web_view_helper.h" +#include "components/printing/renderer/print_render_frame_helper.h" namespace extensions { -class CefPrintWebViewHelperDelegate - : public printing::PrintWebViewHelper::Delegate { +class CefPrintRenderFrameHelperDelegate + : public printing::PrintRenderFrameHelper::Delegate { public: - ~CefPrintWebViewHelperDelegate() override; + ~CefPrintRenderFrameHelperDelegate() override; bool CancelPrerender(content::RenderFrame* render_frame) override; blink::WebElement GetPdfElement(blink::WebLocalFrame* frame) override; @@ -22,4 +22,4 @@ class CefPrintWebViewHelperDelegate } // namespace extensions -#endif // CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ +#endif // CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_ diff --git a/libcef/renderer/frame_impl.cc b/libcef/renderer/frame_impl.cc index 46cb68eb0..93a87c604 100644 --- a/libcef/renderer/frame_impl.cc +++ b/libcef/renderer/frame_impl.cc @@ -107,7 +107,7 @@ void CefFrameImpl::LoadRequest(CefRefPtr request) { params.url = GURL(std::string(request->GetURL())); params.method = request->GetMethod(); params.frame_id = frame_id_; - params.first_party_for_cookies = + params.site_for_cookies = GURL(std::string(request->GetFirstPartyForCookies())); CefRequest::HeaderMap headerMap; diff --git a/libcef/renderer/media/cef_key_systems.cc b/libcef/renderer/media/cef_key_systems.cc index ceef929cd..f43860b50 100644 --- a/libcef/renderer/media/cef_key_systems.cc +++ b/libcef/renderer/media/cef_key_systems.cc @@ -17,7 +17,6 @@ #include "media/base/eme_constants.h" #include "media/base/key_system_properties.h" #include "media/media_features.h" -#include "ppapi/features/features.h" #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. @@ -33,7 +32,7 @@ using media::SupportedCodecs; namespace { -#if BUILDFLAG(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_LIBRARY_CDMS) bool IsPepperCdmAvailable( const std::string& pepper_type, std::vector* additional_param_names, @@ -132,15 +131,15 @@ void AddPepperBasedWidevine( media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier. } #endif // defined(WIDEVINE_CDM_AVAILABLE) -#endif // BUILDFLAG(ENABLE_PEPPER_CDMS) +#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) } // namespace void AddCefKeySystems( std::vector>* key_systems_properties) { -#if BUILDFLAG(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_LIBRARY_CDMS) #if defined(WIDEVINE_CDM_AVAILABLE) AddPepperBasedWidevine(key_systems_properties); #endif // defined(WIDEVINE_CDM_AVAILABLE) -#endif // BUILDFLAG(ENABLE_PEPPER_CDMS) +#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) } diff --git a/libcef/renderer/plugins/cef_plugin_placeholder.cc b/libcef/renderer/plugins/cef_plugin_placeholder.cc index bff4edc2c..2022e9246 100644 --- a/libcef/renderer/plugins/cef_plugin_placeholder.cc +++ b/libcef/renderer/plugins/cef_plugin_placeholder.cc @@ -54,8 +54,7 @@ CefPluginPlaceholder::CefPluginPlaceholder(content::RenderFrame* render_frame, : plugins::LoadablePluginPlaceholder(render_frame, params, html_data), status_(CefViewHostMsg_GetPluginInfo_Status::kAllowed), title_(title), - context_menu_request_id_(0), - did_send_blocked_content_notification_(false) { + context_menu_request_id_(0) { RenderThread::Get()->AddObserver(this); } @@ -283,11 +282,10 @@ blink::WebPlugin* CefPluginPlaceholder::CreatePlugin() { std::move(throttler)); } -void CefPluginPlaceholder::OnBlockedTinyContent() { +void CefPluginPlaceholder::OnBlockedContent( + content::RenderFrame::PeripheralContentStatus status, + bool is_same_origin) { DCHECK(render_frame()); - if (did_send_blocked_content_notification_) - return; - did_send_blocked_content_notification_ = true; } gin::ObjectTemplateBuilder CefPluginPlaceholder::GetObjectTemplateBuilder( diff --git a/libcef/renderer/plugins/cef_plugin_placeholder.h b/libcef/renderer/plugins/cef_plugin_placeholder.h index b664f7396..a2ee1336e 100644 --- a/libcef/renderer/plugins/cef_plugin_placeholder.h +++ b/libcef/renderer/plugins/cef_plugin_placeholder.h @@ -48,7 +48,8 @@ class CefPluginPlaceholder final : public plugins::LoadablePluginPlaceholder, // content::LoadablePluginPlaceholder overrides: blink::WebPlugin* CreatePlugin() override; - void OnBlockedTinyContent() override; + void OnBlockedContent(content::RenderFrame::PeripheralContentStatus status, + bool is_same_origin) override; // gin::Wrappable (via PluginPlaceholder) method gin::ObjectTemplateBuilder GetObjectTemplateBuilder( @@ -78,8 +79,6 @@ class CefPluginPlaceholder final : public plugins::LoadablePluginPlaceholder, int context_menu_request_id_; // Nonzero when request pending. base::string16 plugin_name_; - bool did_send_blocked_content_notification_; - DISALLOW_COPY_AND_ASSIGN(CefPluginPlaceholder); }; diff --git a/libcef/renderer/render_frame_observer.cc b/libcef/renderer/render_frame_observer.cc index dabeea2fe..d6edf15df 100644 --- a/libcef/renderer/render_frame_observer.cc +++ b/libcef/renderer/render_frame_observer.cc @@ -28,8 +28,14 @@ CefRenderFrameObserver::CefRenderFrameObserver( CefRenderFrameObserver::~CefRenderFrameObserver() {} +void CefRenderFrameObserver::OnInterfaceRequestForFrame( + const std::string& interface_name, + mojo::ScopedMessagePipeHandle* interface_pipe) { + registry_.TryBindInterface(interface_name, interface_pipe); +} + void CefRenderFrameObserver::DidStartProvisionalLoad( - blink::WebDataSource* data_source) { + blink::WebDocumentLoader* document_loader) { blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); CefRefPtr browserPtr = CefBrowserImpl::GetBrowserForMainFrame(frame->Top()); diff --git a/libcef/renderer/render_frame_observer.h b/libcef/renderer/render_frame_observer.h index c83994af9..37bb5f278 100644 --- a/libcef/renderer/render_frame_observer.h +++ b/libcef/renderer/render_frame_observer.h @@ -6,6 +6,7 @@ #define LIBCEF_RENDERER_RENDER_FRAME_OBSERVER_H_ #include "content/public/renderer/render_frame_observer.h" +#include "services/service_manager/public/cpp/binder_registry.h" namespace content { class RenderFrame; @@ -17,7 +18,11 @@ class CefRenderFrameObserver : public content::RenderFrameObserver { ~CefRenderFrameObserver() override; // RenderFrameObserver methods: - void DidStartProvisionalLoad(blink::WebDataSource* data_source) override; + void OnInterfaceRequestForFrame( + const std::string& interface_name, + mojo::ScopedMessagePipeHandle* interface_pipe) override; + void DidStartProvisionalLoad( + blink::WebDocumentLoader* document_loader) override; void DidFinishLoad() override; void FrameDetached() override; void FrameFocused() override; @@ -29,7 +34,11 @@ class CefRenderFrameObserver : public content::RenderFrameObserver { int world_id) override; void OnDestruct() override; + service_manager::BinderRegistry* registry() { return ®istry_; } + private: + service_manager::BinderRegistry registry_; + DISALLOW_COPY_AND_ASSIGN(CefRenderFrameObserver); }; diff --git a/libcef/renderer/render_frame_util.cc b/libcef/renderer/render_frame_util.cc index 4310df487..98984b3bc 100644 --- a/libcef/renderer/render_frame_util.cc +++ b/libcef/renderer/render_frame_util.cc @@ -9,6 +9,7 @@ #include "base/logging.h" #include "content/renderer/render_frame_impl.h" +#include "third_party/WebKit/public/web/WebLocalFrame.h" namespace render_frame_util { diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index b9757c11b..171614e83 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -36,14 +36,10 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient { ~CefWebURLLoaderClient() override; // blink::WebURLLoaderClient methods. - bool WillFollowRedirect(WebURLRequest& newRequest, - const WebURLResponse& redirectResponse) override; void DidSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override; void DidReceiveResponse(const WebURLResponse& response) override; - void DidDownloadData(int dataLength, int encodedDataLength) override; void DidReceiveData(const char* data, int dataLength) override; - void DidReceiveCachedMetadata(const char* data, int dataLength) override; void DidFinishLoading(double finish_time, int64_t total_encoded_data_length, int64_t total_encoded_body_length, @@ -84,7 +80,7 @@ class CefRenderURLRequest::Context } inline bool CalledOnValidThread() { - return task_runner_->RunsTasksOnCurrentThread(); + return task_runner_->RunsTasksInCurrentSequence(); } bool Start() { @@ -240,12 +236,6 @@ CefWebURLLoaderClient::CefWebURLLoaderClient( CefWebURLLoaderClient::~CefWebURLLoaderClient() {} -bool CefWebURLLoaderClient::WillFollowRedirect( - WebURLRequest& newRequest, - const WebURLResponse& redirectResponse) { - return true; -} - void CefWebURLLoaderClient::DidSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent) { if (request_flags_ & UR_FLAG_REPORT_UPLOAD_PROGRESS) @@ -256,9 +246,6 @@ void CefWebURLLoaderClient::DidReceiveResponse(const WebURLResponse& response) { context_->OnResponse(response); } -void CefWebURLLoaderClient::DidDownloadData(int dataLength, - int encodedDataLength) {} - void CefWebURLLoaderClient::DidReceiveData(const char* data, int dataLength) { context_->OnDownloadProgress(dataLength); @@ -266,9 +253,6 @@ void CefWebURLLoaderClient::DidReceiveData(const char* data, int dataLength) { context_->OnDownloadData(data, dataLength); } -void CefWebURLLoaderClient::DidReceiveCachedMetadata(const char* data, - int dataLength) {} - void CefWebURLLoaderClient::DidFinishLoading( double finishTime, int64_t total_encoded_data_length, diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index 3eedd5375..747772019 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -812,7 +812,7 @@ CefV8HandleBase::~CefV8HandleBase() { } bool CefV8HandleBase::BelongsToCurrentThread() const { - return task_runner_->RunsTasksOnCurrentThread(); + return task_runner_->RunsTasksInCurrentSequence(); } CefV8HandleBase::CefV8HandleBase(v8::Isolate* isolate, diff --git a/libcef/renderer/v8_impl.h b/libcef/renderer/v8_impl.h index 796902e73..aecb87596 100644 --- a/libcef/renderer/v8_impl.h +++ b/libcef/renderer/v8_impl.h @@ -75,7 +75,7 @@ class CefV8ContextState : public base::RefCounted { struct CefV8DeleteOnMessageLoopThread { template static void Destruct(const T* x) { - if (x->task_runner()->RunsTasksOnCurrentThread()) { + if (x->task_runner()->RunsTasksInCurrentSequence()) { delete x; } else { if (!x->task_runner()->DeleteSoon(FROM_HERE, x)) { diff --git a/libcef/renderer/webkit_glue.cc b/libcef/renderer/webkit_glue.cc index 7a8e5783e..7cbd50d9a 100644 --- a/libcef/renderer/webkit_glue.cc +++ b/libcef/renderer/webkit_glue.cc @@ -20,13 +20,13 @@ MSVC_PUSH_WARNING_LEVEL(0); #include "third_party/WebKit/Source/core/dom/Element.h" #include "third_party/WebKit/Source/core/dom/Node.h" #include "third_party/WebKit/Source/core/editing/serializers/Serialization.h" +#include "third_party/WebKit/Source/core/exported/WebViewImpl.h" #include "third_party/WebKit/Source/core/frame/LocalFrame.h" #include "third_party/WebKit/Source/core/frame/Settings.h" +#include "third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h" #include "third_party/WebKit/Source/platform/ScriptForbiddenScope.h" #include "third_party/WebKit/Source/platform/bindings/V8Binding.h" #include "third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h" -#include "third_party/WebKit/Source/web/WebLocalFrameImpl.h" -#include "third_party/WebKit/Source/web/WebViewImpl.h" MSVC_POP_WARNING(); #undef LOG @@ -178,7 +178,8 @@ v8::MaybeLocal ExecuteV8ScriptAndReturnValue( v8CacheOptions = frame->GetSettings()->GetV8CacheOptions(); v8::Local script; - if (!blink::V8ScriptRunner::CompileScript(ssc, isolate, accessControlStatus, + if (!blink::V8ScriptRunner::CompileScript(blink::ScriptState::From(context), + ssc, accessControlStatus, v8CacheOptions) .ToLocal(&script)) { DCHECK(tryCatch.HasCaught()); diff --git a/patch/patch.cfg b/patch/patch.cfg index fa4418139..3fd40e60b 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -324,7 +324,6 @@ patches = [ }, { # Linux: Fix build errors related to dependency versions. - # https://chromium-review.googlesource.com/c/590271/ 'name': 'linux_build', }, { @@ -333,11 +332,6 @@ patches = [ 'name': 'angle_697758', 'path': 'third_party/angle/', }, - { - # macOS: Add missing availability annotations for 10.12 SDK. - # https://bugs.chromium.org/p/chromium/issues/detail?id=747693 - 'name': 'mac_build_747693', - }, { # Changes necessary to support for chrome extensions: # (a) Add a new ExtensionHost constructor that allows CEF to create the diff --git a/patch/patches/angle_697758.patch b/patch/patches/angle_697758.patch index 88a80580d..3dbdb7dd4 100644 --- a/patch/patches/angle_697758.patch +++ b/patch/patches/angle_697758.patch @@ -1,5 +1,5 @@ diff --git src/libGLESv2.gypi src/libGLESv2.gypi -index e0167d7..937dda0 100644 +index 8f12a4a9b..2d7175eb7 100644 --- src/libGLESv2.gypi +++ src/libGLESv2.gypi @@ -36,8 +36,6 @@ diff --git a/patch/patches/browser_compositor_mac.patch b/patch/patches/browser_compositor_mac.patch index df732c818..1d8114bad 100644 --- a/patch/patches/browser_compositor_mac.patch +++ b/patch/patches/browser_compositor_mac.patch @@ -1,13 +1,17 @@ diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h -index da3c2c7..93ed93d 100644 +index 4355a8cdacb4..57961ef39f8d 100644 --- content/browser/renderer_host/browser_compositor_view_mac.h +++ content/browser/renderer_host/browser_compositor_view_mac.h -@@ -50,9 +50,11 @@ class BrowserCompositorMac : public DelegatedFrameHostClient { +@@ -50,6 +50,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient { // These will not return nullptr until Destroy is called. DelegatedFrameHost* GetDelegatedFrameHost(); + ui::Layer* GetRootLayer() { return root_layer_.get(); } + // Ensure that the currect compositor frame be cleared (even if it is + // potentially visible). +@@ -57,6 +58,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient { + // This may return nullptr, if this has detached itself from its // ui::Compositor. + ui::Compositor* GetCompositor(); @@ -15,10 +19,10 @@ index da3c2c7..93ed93d 100644 void DidCreateNewRendererCompositorFrameSink( diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm -index 278c702..686bfb5 100644 +index 428bef1ff74e..e841db553ed8 100644 --- content/browser/renderer_host/browser_compositor_view_mac.mm +++ content/browser/renderer_host/browser_compositor_view_mac.mm -@@ -204,6 +204,12 @@ BrowserCompositorMac::~BrowserCompositorMac() { +@@ -205,6 +205,12 @@ BrowserCompositorMac::~BrowserCompositorMac() { g_spare_recyclable_compositors.Get().clear(); } @@ -31,7 +35,7 @@ index 278c702..686bfb5 100644 ui::AcceleratedWidgetMac* BrowserCompositorMac::GetAcceleratedWidgetMac() { if (recyclable_compositor_) return recyclable_compositor_->accelerated_widget_mac(); -@@ -425,8 +431,13 @@ SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor( +@@ -437,8 +443,13 @@ SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor( } gfx::Size BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP() const { diff --git a/patch/patches/browser_frame_host_guest_1687.patch b/patch/patches/browser_frame_host_guest_1687.patch index da5ed9f6f..2b36e5127 100644 --- a/patch/patches/browser_frame_host_guest_1687.patch +++ b/patch/patches/browser_frame_host_guest_1687.patch @@ -1,8 +1,8 @@ diff --git content/browser/frame_host/render_widget_host_view_guest.cc content/browser/frame_host/render_widget_host_view_guest.cc -index d221c6c..f3d5ad4 100644 +index a1abce179e5e..fed7d874781b 100644 --- content/browser/frame_host/render_widget_host_view_guest.cc +++ content/browser/frame_host/render_widget_host_view_guest.cc -@@ -246,13 +246,14 @@ void RenderWidgetHostViewGuest::Destroy() { +@@ -251,13 +251,14 @@ void RenderWidgetHostViewGuest::Destroy() { } gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const { diff --git a/patch/patches/browser_plugin_guest_1565.patch b/patch/patches/browser_plugin_guest_1565.patch index bd3404e69..71b097048 100644 --- a/patch/patches/browser_plugin_guest_1565.patch +++ b/patch/patches/browser_plugin_guest_1565.patch @@ -1,8 +1,8 @@ diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc -index b4eae88..bfb3887 100644 +index 13e452c2b72b..2c4c55d90a50 100644 --- content/browser/browser_plugin/browser_plugin_guest.cc +++ content/browser/browser_plugin/browser_plugin_guest.cc -@@ -336,14 +336,20 @@ void BrowserPluginGuest::InitInternal( +@@ -345,8 +345,11 @@ void BrowserPluginGuest::InitInternal( static_cast(GetWebContents()->GetView()); } @@ -15,17 +15,7 @@ index b4eae88..bfb3887 100644 // Once a BrowserPluginGuest has an embedder WebContents, it's considered to // be attached. - owner_web_contents_ = owner_web_contents; -- if (new_view) -+ if (new_view) { - new_view->OnGuestAttached(owner_web_contents_->GetView()); -+ if (delegate_) -+ delegate_->OnGuestAttached(owner_web_contents_->GetView()); -+ } - } - - RendererPreferences* renderer_prefs = -@@ -834,7 +840,8 @@ void BrowserPluginGuest::OnWillAttachComplete( +@@ -843,10 +846,19 @@ void BrowserPluginGuest::OnWillAttachComplete( static_cast(GetWebContents()->GetView()); if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) { web_contents_view->CreateViewForWidget( @@ -35,8 +25,19 @@ index b4eae88..bfb3887 100644 } } ++ if (delegate_) { ++ // Notify the delegate here instead of in InitInternal because InitInternal ++ // will now be called from Init before GuestViewBase::CompleteInit has set ++ // web_contents() to the guest WebContents. This behavior change is due to ++ // https://crrev.com/07263b56. ++ delegate_->OnGuestAttached(embedder_web_contents->GetView()); ++ } ++ + InitInternal(params, embedder_web_contents); + + attached_ = true; diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc -index de0043f..7699c2f 100644 +index 28a7ddfc40ac..33c0c4399584 100644 --- content/browser/frame_host/interstitial_page_impl.cc +++ content/browser/frame_host/interstitial_page_impl.cc @@ -609,7 +609,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() { @@ -49,7 +50,7 @@ index de0043f..7699c2f 100644 render_view_host_->GetMainFrame()->AllowBindings( BINDINGS_POLICY_DOM_AUTOMATION); diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h -index e4401f8..20b8560 100644 +index e4401f85bf3f..20b85609a23f 100644 --- content/browser/web_contents/web_contents_view.h +++ content/browser/web_contents/web_contents_view.h @@ -24,7 +24,7 @@ struct ScreenInfo; @@ -78,10 +79,10 @@ index e4401f8..20b8560 100644 // Creates a new View that holds a popup and receives messages for it. virtual RenderWidgetHostViewBase* CreateViewForPopupWidget( diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc -index a99e043..f1ef7cb 100644 +index f407726a437e..0efc406c949f 100644 --- content/browser/web_contents/web_contents_view_aura.cc +++ content/browser/web_contents/web_contents_view_aura.cc -@@ -844,7 +844,8 @@ void WebContentsViewAura::CreateView( +@@ -833,7 +833,8 @@ void WebContentsViewAura::CreateView( } RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( @@ -91,7 +92,7 @@ index a99e043..f1ef7cb 100644 if (render_widget_host->GetView()) { // 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 -@@ -856,6 +857,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( +@@ -845,6 +846,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( render_widget_host->GetView()); } @@ -100,10 +101,10 @@ index a99e043..f1ef7cb 100644 g_create_render_widget_host_view ? 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 -index bb49288..603f18a 100644 +index 7979b48375e1..add76f7404de 100644 --- content/browser/web_contents/web_contents_view_aura.h +++ content/browser/web_contents/web_contents_view_aura.h -@@ -118,7 +118,7 @@ class CONTENT_EXPORT WebContentsViewAura +@@ -116,7 +116,7 @@ class CONTENT_EXPORT WebContentsViewAura gfx::NativeView context) override; RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHost* render_widget_host, @@ -113,7 +114,7 @@ index bb49288..603f18a 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_child_frame.cc content/browser/web_contents/web_contents_view_child_frame.cc -index eb309e7..e69e6df 100644 +index e1aca335ede0..47e02fc73f74 100644 --- content/browser/web_contents/web_contents_view_child_frame.cc +++ content/browser/web_contents/web_contents_view_child_frame.cc @@ -94,7 +94,7 @@ void WebContentsViewChildFrame::CreateView(const gfx::Size& initial_size, @@ -126,7 +127,7 @@ index eb309e7..e69e6df 100644 } diff --git content/browser/web_contents/web_contents_view_child_frame.h content/browser/web_contents/web_contents_view_child_frame.h -index 18d45ee..6aa738d 100644 +index 18d45eea524f..6aa738daf5b5 100644 --- content/browser/web_contents/web_contents_view_child_frame.h +++ content/browser/web_contents/web_contents_view_child_frame.h @@ -40,7 +40,7 @@ class WebContentsViewChildFrame : public WebContentsView, @@ -139,7 +140,7 @@ index 18d45ee..6aa738d 100644 RenderWidgetHost* render_widget_host) 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 -index 0256869..da7a9b8 100644 +index 025686922ade..da7a9b88cabc 100644 --- content/browser/web_contents/web_contents_view_guest.cc +++ content/browser/web_contents/web_contents_view_guest.cc @@ -72,6 +72,8 @@ void WebContentsViewGuest::GetScreenInfo(ScreenInfo* screen_info) const { @@ -194,7 +195,7 @@ index 0256869..da7a9b8 100644 RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget( diff --git content/browser/web_contents/web_contents_view_guest.h content/browser/web_contents/web_contents_view_guest.h -index 464ea8f..0d3118d 100644 +index 464ea8f780e4..0d3118df538a 100644 --- content/browser/web_contents/web_contents_view_guest.h +++ content/browser/web_contents/web_contents_view_guest.h @@ -58,7 +58,7 @@ class WebContentsViewGuest : public WebContentsView, @@ -207,10 +208,10 @@ index 464ea8f..0d3118d 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.h -index 34945ac..542042c 100644 +index 12675d077c8a..46db5596618e 100644 --- content/browser/web_contents/web_contents_view_mac.h +++ content/browser/web_contents/web_contents_view_mac.h -@@ -91,7 +91,7 @@ class WebContentsViewMac : public WebContentsView, +@@ -90,7 +90,7 @@ class WebContentsViewMac : public WebContentsView, gfx::NativeView context) override; RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHost* render_widget_host, @@ -220,7 +221,7 @@ index 34945ac..542042c 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm -index f256f69..fbf2726 100644 +index a9111f9d9cef..33d5eea2cbb9 100644 --- content/browser/web_contents/web_contents_view_mac.mm +++ content/browser/web_contents/web_contents_view_mac.mm @@ -352,7 +352,8 @@ void WebContentsViewMac::CreateView( @@ -242,7 +243,7 @@ index f256f69..fbf2726 100644 g_create_render_widget_host_view ? 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 -index 61662f4..6a4648f 100644 +index ef0ff9d6f67b..4eab513ba4ce 100644 --- content/public/browser/browser_plugin_guest_delegate.h +++ content/public/browser/browser_plugin_guest_delegate.h @@ -19,6 +19,7 @@ namespace content { @@ -253,7 +254,7 @@ index 61662f4..6a4648f 100644 // Objects implement this interface to get notified about changes in the guest // WebContents and to provide necessary functionality. -@@ -78,6 +79,10 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate { +@@ -72,6 +73,10 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate { // content module. virtual void SetGuestHost(GuestHost* guest_host) {} @@ -265,7 +266,7 @@ index 61662f4..6a4648f 100644 // reported from the guest renderer should be ignored. The reported value // from the guest renderer is incorrect in situations where BrowserPlugin is 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 255217d..1571064 100644 +index 6f2b56d0cd90..ec6f15c0a789 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 @@ -174,6 +174,8 @@ void MimeHandlerViewGuest::CreateWebContents( @@ -275,10 +276,10 @@ index 255217d..1571064 100644 + if (delegate_) + delegate_->OverrideWebContentsCreateParams(¶ms); callback.Run(WebContents::Create(params)); - } -@@ -194,6 +196,18 @@ bool MimeHandlerViewGuest::ZoomPropagatesFromEmbedderToGuest() const { - return false; + registry_.AddInterface( +@@ -199,6 +201,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { + return true; } +void MimeHandlerViewGuest::OnGuestAttached( @@ -297,12 +298,12 @@ index 255217d..1571064 100644 WebContents* source, const content::OpenURLParams& params) { diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index f3fb783..642342c 100644 +index df25eca4aeae..3072be6a9ca5 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -@@ -87,6 +87,10 @@ class MimeHandlerViewGuest : - void DidInitialize(const base::DictionaryValue& create_params) final; +@@ -89,6 +89,10 @@ class MimeHandlerViewGuest : bool ZoomPropagatesFromEmbedderToGuest() const final; + bool ShouldDestroyOnDetach() const final; + // content::BrowserPluginGuestDelegate implementation + void OnGuestAttached(content::WebContentsView* parent_view) override; @@ -312,7 +313,7 @@ index f3fb783..642342c 100644 content::WebContents* OpenURLFromTab( content::WebContents* source, diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h -index 0928bf2..e954278 100644 +index 0928bf2f44da..e9542785ec8a 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h @@ -6,9 +6,9 @@ diff --git a/patch/patches/chrome_profile.patch b/patch/patches/chrome_profile.patch index 1b08ee054..5a9e7b528 100644 --- a/patch/patches/chrome_profile.patch +++ b/patch/patches/chrome_profile.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/profiles/incognito_helpers.cc chrome/browser/profiles/incognito_helpers.cc -index 6155e96..2125a436 100644 +index 6155e9606d67..2125a436c87e 100644 --- chrome/browser/profiles/incognito_helpers.cc +++ chrome/browser/profiles/incognito_helpers.cc @@ -8,13 +8,35 @@ @@ -39,7 +39,7 @@ index 6155e96..2125a436 100644 } diff --git chrome/browser/profiles/incognito_helpers.h chrome/browser/profiles/incognito_helpers.h -index 4b43013..169ca47 100644 +index 4b430133e16f..169ca4765907 100644 --- chrome/browser/profiles/incognito_helpers.h +++ chrome/browser/profiles/incognito_helpers.h @@ -11,6 +11,19 @@ class BrowserContext; @@ -63,23 +63,23 @@ index 4b43013..169ca47 100644 content::BrowserContext* GetBrowserContextRedirectedInIncognito( content::BrowserContext* context); diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index 00635b8..d15278e 100644 +index 460098e8f17d..9bf838204f62 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -375,7 +375,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -377,7 +377,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, content::NotificationService::AllSources()); - + - if (ProfileShortcutManager::IsFeatureEnabled() && !user_data_dir_.empty()) + if (!user_data_dir_.empty() && ProfileShortcutManager::IsFeatureEnabled()) profile_shortcut_manager_.reset(ProfileShortcutManager::Create( this)); } diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h -index b3fa180..81adaea 100644 +index 538b8458ab9e..169d4e079bf9 100644 --- chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h -@@ -94,7 +94,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -93,7 +93,7 @@ class ProfileManager : public content::NotificationObserver, // acceptable. Returns null if creation of the new profile fails. // TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then // make this method private. @@ -88,7 +88,7 @@ index b3fa180..81adaea 100644 // Returns total number of profiles available on this machine. size_t GetNumberOfProfiles(); -@@ -125,7 +125,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -124,7 +124,7 @@ class ProfileManager : public content::NotificationObserver, // Returns true if the profile pointer is known to point to an existing // profile. @@ -97,7 +97,7 @@ index b3fa180..81adaea 100644 // Returns the directory where the first created profile is stored, // relative to the user data directory currently in use. -@@ -134,7 +134,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -133,7 +133,7 @@ class ProfileManager : public content::NotificationObserver, // 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 // stored in Local State, hand back the Default profile. diff --git a/patch/patches/chrome_widevine.patch b/patch/patches/chrome_widevine.patch index 5a2693bcd..11fb3df23 100644 --- a/patch/patches/chrome_widevine.patch +++ b/patch/patches/chrome_widevine.patch @@ -1,11 +1,11 @@ diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc -index 05e23a6..051dab3 100644 +index 17d9819ad2b0..05a72199a247 100644 --- chrome/common/chrome_content_client.cc +++ chrome/common/chrome_content_client.cc @@ -82,7 +82,7 @@ #endif - #if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) && \ + #if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) && \ - !defined(WIDEVINE_CDM_IS_COMPONENT) + !defined(WIDEVINE_CDM_IS_COMPONENT) && defined(WIDEVINE_CDM_VERSION_STRING) #define WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT diff --git a/patch/patches/component_build_1617.patch b/patch/patches/component_build_1617.patch index b0ac29d9e..056bd3f70 100644 --- a/patch/patches/component_build_1617.patch +++ b/patch/patches/component_build_1617.patch @@ -1,5 +1,17 @@ +diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn +index 97c769cdf483..78d9db9d084e 100644 +--- chrome/browser/ui/BUILD.gn ++++ chrome/browser/ui/BUILD.gn +@@ -489,6 +489,7 @@ split_static_library("ui") { + "//chrome/browser/ui/webui/usb_internals:mojo_bindings", + "//chrome/common", + "//chrome/common:search_mojom", ++ "//chrome/common:service_process_mojom", + "//chrome/common/net", + "//chrome/installer/util:with_no_strings", + "//components/about_ui", diff --git content/app/content_service_manager_main_delegate.h content/app/content_service_manager_main_delegate.h -index 7563ce4..6c59474 100644 +index 7563ce48bf5e..6c594749d57b 100644 --- content/app/content_service_manager_main_delegate.h +++ content/app/content_service_manager_main_delegate.h @@ -16,7 +16,8 @@ namespace content { @@ -12,12 +24,12 @@ index 7563ce4..6c59474 100644 public: explicit ContentServiceManagerMainDelegate(const ContentMainParams& params); ~ContentServiceManagerMainDelegate() override; -diff --git third_party/WebKit/Source/web/BUILD.gn third_party/WebKit/Source/web/BUILD.gn -index 148b260..b08bb89 100644 ---- third_party/WebKit/Source/web/BUILD.gn -+++ third_party/WebKit/Source/web/BUILD.gn -@@ -15,6 +15,7 @@ component("web") { - output_name = "blink_web" +diff --git third_party/WebKit/Source/controller/BUILD.gn third_party/WebKit/Source/controller/BUILD.gn +index dbcd69337de8..fc0b6aca080f 100644 +--- third_party/WebKit/Source/controller/BUILD.gn ++++ third_party/WebKit/Source/controller/BUILD.gn +@@ -15,6 +15,7 @@ component("controller") { + output_name = "blink_controller" deps = [ + "//cef:webkit_set", diff --git a/patch/patches/compositor_1368.patch b/patch/patches/compositor_1368.patch index ecf5d7f48..2046f541a 100644 --- a/patch/patches/compositor_1368.patch +++ b/patch/patches/compositor_1368.patch @@ -1,8 +1,8 @@ diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc -index 0e405ef..f2ecb56 100644 +index 8313f13f3355..9ee1056eb825 100644 --- content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc -@@ -239,6 +239,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() { +@@ -274,6 +274,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() { std::unique_ptr GpuProcessTransportFactory::CreateSoftwareOutputDevice( ui::Compositor* compositor) { @@ -17,18 +17,18 @@ index 0e405ef..f2ecb56 100644 if (command_line->HasSwitch(switches::kHeadless)) return base::WrapUnique(new cc::SoftwareOutputDevice); diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 163fbb0..bb8dea8 100644 +index a3bc8cafc574..745f1dacb26e 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h -@@ -18,6 +18,7 @@ +@@ -17,6 +17,7 @@ + #include "base/single_thread_task_runner.h" #include "base/time/time.h" #include "build/build_config.h" - #include "cc/output/begin_frame_args.h" +#include "cc/output/software_output_device.h" #include "cc/trees/layer_tree_host_client.h" #include "cc/trees/layer_tree_host_single_thread_client.h" - #include "components/viz/common/surfaces/surface_sequence.h" -@@ -174,6 +175,17 @@ class COMPOSITOR_EXPORT ContextFactory { + #include "components/viz/common/frame_sinks/begin_frame_args.h" +@@ -179,6 +180,17 @@ class COMPOSITOR_EXPORT ContextFactory { virtual void RemoveObserver(ContextFactoryObserver* observer) = 0; }; @@ -46,7 +46,7 @@ index 163fbb0..bb8dea8 100644 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -207,6 +219,9 @@ class COMPOSITOR_EXPORT Compositor +@@ -215,6 +227,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -56,7 +56,7 @@ index 163fbb0..bb8dea8 100644 // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -389,6 +404,8 @@ class COMPOSITOR_EXPORT Compositor +@@ -431,6 +446,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, ui::ContextFactory* context_factory_; ui::ContextFactoryPrivate* context_factory_private_; diff --git a/patch/patches/content_1129_2015.patch b/patch/patches/content_1129_2015.patch index 6cef73790..ef34d8fba 100644 --- a/patch/patches/content_1129_2015.patch +++ b/patch/patches/content_1129_2015.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc -index 43bbb3a..7c03fdc 100644 +index faca8fe60751..cd96d66a5d8b 100644 --- chrome/browser/download/download_target_determiner.cc +++ chrome/browser/download/download_target_determiner.cc -@@ -477,8 +477,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context, +@@ -484,8 +484,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context, content::PluginService* plugin_service = content::PluginService::GetInstance(); bool plugin_found = plugin_service->GetPluginInfo( @@ -14,7 +14,7 @@ index 43bbb3a..7c03fdc 100644 // 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 diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc -index 1783a10..b380ef8 100644 +index 1783a101aa02..b380ef826ff7 100644 --- chrome/browser/plugins/chrome_plugin_service_filter.cc +++ chrome/browser/plugins/chrome_plugin_service_filter.cc @@ -179,6 +179,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable( @@ -26,7 +26,7 @@ index 1783a10..b380ef8 100644 content::WebPluginInfo* plugin) { base::AutoLock auto_lock(lock_); diff --git chrome/browser/plugins/chrome_plugin_service_filter.h chrome/browser/plugins/chrome_plugin_service_filter.h -index f8b651f..ec39f8d 100644 +index f8b651f1ddc4..ec39f8d7dc85 100644 --- chrome/browser/plugins/chrome_plugin_service_filter.h +++ chrome/browser/plugins/chrome_plugin_service_filter.h @@ -71,6 +71,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter, @@ -37,11 +37,24 @@ index f8b651f..ec39f8d 100644 const url::Origin& main_frame_origin, content::WebPluginInfo* plugin) override; +diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc +index 83445e1428a9..385e223b9069 100644 +--- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc ++++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc +@@ -52,7 +52,7 @@ PDFIFrameNavigationThrottle::MaybeCreateThrottleFor( + content::ResourceContext* resource_context = + handle->GetWebContents()->GetBrowserContext()->GetResourceContext(); + if (filter->IsPluginAvailable(process_id, routing_id, resource_context, +- handle->GetURL(), url::Origin(), ++ handle->GetURL(), false, url::Origin(), + &pdf_plugin_info)) { + return nullptr; + } diff --git chrome/browser/plugins/plugin_info_message_filter.cc chrome/browser/plugins/plugin_info_message_filter.cc -index 176b1bc..3e91d67 100644 +index 8d0adcac00c1..2751e745107f 100644 --- chrome/browser/plugins/plugin_info_message_filter.cc +++ chrome/browser/plugins/plugin_info_message_filter.cc -@@ -452,8 +452,8 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin( +@@ -451,8 +451,8 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin( for (; i < matching_plugins.size(); ++i) { if (!filter || filter->IsPluginAvailable(render_process_id_, render_frame_id, @@ -53,7 +66,7 @@ index 176b1bc..3e91d67 100644 } } diff --git chrome/browser/ui/cocoa/drag_util.mm chrome/browser/ui/cocoa/drag_util.mm -index fd8c993..7f70c96 100644 +index 6a2122ee1ed7..68831894695a 100644 --- chrome/browser/ui/cocoa/drag_util.mm +++ chrome/browser/ui/cocoa/drag_util.mm @@ -54,7 +54,7 @@ BOOL IsSupportedFileURL(Profile* profile, const GURL& url) { @@ -66,10 +79,10 @@ index fd8c993..7f70c96 100644 } diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -index 5ca4247..fc24263 100644 +index ef7ae9c7de76..29a4e7cb9578 100644 --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -@@ -575,6 +575,6 @@ void BrowserTabStripController::OnFindURLMimeTypeCompleted( +@@ -594,6 +594,6 @@ void BrowserTabStripController::OnFindURLMimeTypeCompleted( content::PluginService::GetInstance()->GetPluginInfo( -1, // process ID MSG_ROUTING_NONE, // routing ID @@ -78,10 +91,10 @@ index 5ca4247..fc24263 100644 mime_type, false, NULL, &plugin, NULL)); } diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc -index ec9ded6..4a0406a 100644 +index 2e4d0d9ac4cb..9bd0bf12ca88 100644 --- content/browser/frame_host/navigation_handle_impl.cc +++ content/browser/frame_host/navigation_handle_impl.cc -@@ -300,12 +300,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { +@@ -312,12 +312,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { } RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() { @@ -95,10 +108,23 @@ index ec9ded6..4a0406a 100644 } diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc -index b9f925b..eacb4167 100644 +index 7e577c8395d7..96421d4f2d88 100644 --- content/browser/frame_host/render_frame_host_impl.cc +++ content/browser/frame_host/render_frame_host_impl.cc -@@ -918,10 +918,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) { +@@ -370,9 +370,9 @@ void ForwardRequest(const char* service_name, + + void CreatePaymentManager(RenderFrameHostImpl* rfh, + payments::mojom::PaymentManagerRequest request) { +- StoragePartitionImpl* storage_partition = +- static_cast(BrowserContext::GetStoragePartition( +- rfh->GetSiteInstance()->GetBrowserContext(), rfh->GetSiteInstance())); ++ StoragePartition* storage_partition = ++ BrowserContext::GetStoragePartition( ++ rfh->GetSiteInstance()->GetBrowserContext(), rfh->GetSiteInstance()); + storage_partition->GetPaymentAppContext()->CreatePaymentManager( + std::move(request)); + } +@@ -937,10 +937,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) { IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) #endif @@ -109,7 +135,7 @@ index b9f925b..eacb4167 100644 IPC_MESSAGE_HANDLER(FrameHostMsg_RequestOverlayRoutingToken, OnRequestOverlayRoutingToken) IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow) -@@ -1410,6 +1408,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( +@@ -1436,6 +1434,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( if (navigation_handle_) { navigation_handle_->set_net_error_code( static_cast(params.error_code)); @@ -117,7 +143,7 @@ index b9f925b..eacb4167 100644 } frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); -@@ -2683,14 +2682,12 @@ void RenderFrameHostImpl::OnHidePopup() { +@@ -2705,14 +2704,12 @@ void RenderFrameHostImpl::OnHidePopup() { } #endif @@ -133,10 +159,10 @@ index b9f925b..eacb4167 100644 void RenderFrameHostImpl::OnRequestOverlayRoutingToken() { // Make sure that we have a token. diff --git content/browser/frame_host/render_frame_host_impl.h content/browser/frame_host/render_frame_host_impl.h -index c3a1726..9b3922e 100644 +index 9a4fa29dd7c6..bfd658b91c06 100644 --- content/browser/frame_host/render_frame_host_impl.h +++ content/browser/frame_host/render_frame_host_impl.h -@@ -815,8 +815,8 @@ class CONTENT_EXPORT RenderFrameHostImpl +@@ -821,8 +821,8 @@ class CONTENT_EXPORT RenderFrameHostImpl void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); void OnHidePopup(); #endif @@ -147,10 +173,10 @@ index c3a1726..9b3922e 100644 mojo::ScopedMessagePipeHandle pipe); #endif diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc -index 9b9cfbd..ae3a274 100644 +index c440d8061dac..1ee6a7ca1cf1 100644 --- content/browser/frame_host/render_frame_message_filter.cc +++ content/browser/frame_host/render_frame_message_filter.cc -@@ -475,6 +475,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id, +@@ -509,6 +509,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id, void RenderFrameMessageFilter::OnGetPlugins( bool refresh, @@ -158,12 +184,12 @@ index 9b9cfbd..ae3a274 100644 const url::Origin& main_frame_origin, IPC::Message* reply_msg) { // Don't refresh if the specified threshold has not been passed. Note that -@@ -496,18 +497,19 @@ void RenderFrameMessageFilter::OnGetPlugins( +@@ -530,18 +531,19 @@ void RenderFrameMessageFilter::OnGetPlugins( PluginServiceImpl::GetInstance()->GetPlugins( - base::Bind(&RenderFrameMessageFilter::GetPluginsCallback, this, reply_msg, -- main_frame_origin)); -+ is_main_frame, main_frame_origin)); + base::BindOnce(&RenderFrameMessageFilter::GetPluginsCallback, this, +- reply_msg, main_frame_origin)); ++ reply_msg, is_main_frame, main_frame_origin)); } void RenderFrameMessageFilter::GetPluginsCallback( @@ -180,7 +206,7 @@ index 9b9cfbd..ae3a274 100644 int routing_id = MSG_ROUTING_NONE; // In this loop, copy the WebPluginInfo (and do not use a reference) because // the filter might mutate it. -@@ -516,7 +518,7 @@ void RenderFrameMessageFilter::GetPluginsCallback( +@@ -550,7 +552,7 @@ void RenderFrameMessageFilter::GetPluginsCallback( if (!filter || filter->IsPluginAvailable(child_process_id, routing_id, resource_context_, main_frame_origin.GetURL(), @@ -189,7 +215,7 @@ index 9b9cfbd..ae3a274 100644 plugins.push_back(plugin); } } -@@ -528,6 +530,7 @@ void RenderFrameMessageFilter::GetPluginsCallback( +@@ -562,6 +564,7 @@ void RenderFrameMessageFilter::GetPluginsCallback( void RenderFrameMessageFilter::OnGetPluginInfo( int render_frame_id, const GURL& url, @@ -197,7 +223,7 @@ index 9b9cfbd..ae3a274 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool* found, -@@ -536,8 +539,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo( +@@ -570,8 +573,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo( bool allow_wildcard = true; *found = plugin_service_->GetPluginInfo( render_process_id_, render_frame_id, resource_context_, url, @@ -209,10 +235,10 @@ index 9b9cfbd..ae3a274 100644 void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin( diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h -index 3f49cc4..c593146 100644 +index 6875eb6496c4..a9248109c2b3 100644 --- content/browser/frame_host/render_frame_message_filter.h +++ content/browser/frame_host/render_frame_message_filter.h -@@ -124,13 +124,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter +@@ -127,13 +127,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter #if BUILDFLAG(ENABLE_PLUGINS) void OnGetPlugins(bool refresh, @@ -230,10 +256,10 @@ index 3f49cc4..c593146 100644 const std::string& mime_type, bool* found, diff --git content/browser/loader/mime_sniffing_resource_handler.cc content/browser/loader/mime_sniffing_resource_handler.cc -index 20d09f5..f36d855 100644 +index 482bb55c2bfe..fbbac2ab26b1 100644 --- content/browser/loader/mime_sniffing_resource_handler.cc +++ content/browser/loader/mime_sniffing_resource_handler.cc -@@ -494,8 +494,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler( +@@ -489,8 +489,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler( WebPluginInfo plugin; bool has_plugin = plugin_service_->GetPluginInfo( info->GetChildID(), info->GetRenderFrameID(), info->GetContext(), @@ -245,7 +271,7 @@ index 20d09f5..f36d855 100644 if (stale) { // Refresh the plugins asynchronously. diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc -index 4bdfa1d..cf9b916 100644 +index 4bdfa1d5455f..cf9b9166ae43 100644 --- content/browser/plugin_service_impl.cc +++ content/browser/plugin_service_impl.cc @@ -242,6 +242,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, @@ -267,10 +293,10 @@ index 4bdfa1d..cf9b916 100644 if (actual_mime_type) *actual_mime_type = mime_types[i]; diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h -index 85b64da..e77f1bb 100644 +index b654bf3c98b4..1b09cd3d0a23 100644 --- content/browser/plugin_service_impl.h +++ content/browser/plugin_service_impl.h -@@ -64,6 +64,7 @@ class CONTENT_EXPORT PluginServiceImpl +@@ -63,6 +63,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService { int render_frame_id, ResourceContext* context, const GURL& url, @@ -279,7 +305,7 @@ index 85b64da..e77f1bb 100644 const std::string& mime_type, bool allow_wildcard, diff --git content/common/frame_messages.h content/common/frame_messages.h -index 168d64f..82e9385 100644 +index 7fcc51298b12..6cde762011c9 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h @@ -1324,8 +1324,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, @@ -305,7 +331,7 @@ index 168d64f..82e9385 100644 url::Origin /* main_frame_origin */, std::string /* mime_type */, bool /* found */, -@@ -1716,9 +1718,9 @@ IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply, +@@ -1722,9 +1724,9 @@ IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply, IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, int /* nfr_request_id */, float /* distance */) @@ -317,7 +343,7 @@ index 168d64f..82e9385 100644 // Adding a new message? Stick to the sort order above: first platform // independent FrameMsg, then ifdefs for platform specific FrameMsg, then diff --git content/ppapi_plugin/ppapi_blink_platform_impl.cc content/ppapi_plugin/ppapi_blink_platform_impl.cc -index 6190e33..fbde1ba 100644 +index bf393b7025c9..ae2f1840d193 100644 --- content/ppapi_plugin/ppapi_blink_platform_impl.cc +++ content/ppapi_plugin/ppapi_blink_platform_impl.cc @@ -215,6 +215,7 @@ std::unique_ptr PpapiBlinkPlatformImpl::CreateURLLoader( @@ -329,10 +355,10 @@ index 6190e33..fbde1ba 100644 blink::WebPluginListBuilder* builder) { NOTREACHED(); diff --git content/ppapi_plugin/ppapi_blink_platform_impl.h content/ppapi_plugin/ppapi_blink_platform_impl.h -index fc83aea..9c1a4b2 100644 +index f7684513c3bd..ff6d12f17fe7 100644 --- content/ppapi_plugin/ppapi_blink_platform_impl.h +++ content/ppapi_plugin/ppapi_blink_platform_impl.h -@@ -47,6 +47,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -46,6 +46,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImpl { const blink::WebURLRequest& request, base::SingleThreadTaskRunner* task_runner) override; void GetPluginList(bool refresh, @@ -341,7 +367,7 @@ index fc83aea..9c1a4b2 100644 blink::WebPluginListBuilder*) override; blink::WebData GetDataResource(const char* name) override; diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h -index ac05c13..762262b 100644 +index ac05c13b1df8..762262bff01a 100644 --- content/public/browser/plugin_service.h +++ content/public/browser/plugin_service.h @@ -74,6 +74,7 @@ class PluginService { @@ -353,7 +379,7 @@ index ac05c13..762262b 100644 const std::string& mime_type, bool allow_wildcard, diff --git content/public/browser/plugin_service_filter.h content/public/browser/plugin_service_filter.h -index 3b610b1..7c439e0 100644 +index 3b610b1f554e..7c439e060779 100644 --- content/public/browser/plugin_service_filter.h +++ content/public/browser/plugin_service_filter.h @@ -33,6 +33,7 @@ class PluginServiceFilter { @@ -365,10 +391,10 @@ index 3b610b1..7c439e0 100644 WebPluginInfo* plugin) = 0; diff --git content/public/renderer/content_renderer_client.cc content/public/renderer/content_renderer_client.cc -index 62e2a4e..7932e91 100644 +index 303653a66248..a53478408226 100644 --- content/public/renderer/content_renderer_client.cc +++ content/public/renderer/content_renderer_client.cc -@@ -110,7 +110,6 @@ bool ContentRendererClient::AllowPopup() { +@@ -109,7 +109,6 @@ bool ContentRendererClient::AllowPopup() { return false; } @@ -376,7 +402,7 @@ index 62e2a4e..7932e91 100644 bool ContentRendererClient::HandleNavigation( RenderFrame* render_frame, bool is_content_initiated, -@@ -123,6 +122,7 @@ bool ContentRendererClient::HandleNavigation( +@@ -122,6 +121,7 @@ bool ContentRendererClient::HandleNavigation( return false; } @@ -385,7 +411,7 @@ index 62e2a4e..7932e91 100644 return false; } diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index 915dc35..a015048 100644 +index 16f55a95fdea..7f40cd466b09 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -77,6 +77,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -398,7 +424,7 @@ index 915dc35..a015048 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -197,7 +200,6 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -201,7 +204,6 @@ class CONTENT_EXPORT ContentRendererClient { // Returns true if a popup window should be allowed. virtual bool AllowPopup(); @@ -406,7 +432,7 @@ index 915dc35..a015048 100644 // TODO(sgurun) This callback is deprecated and will be removed as soon // as android webview completes implementation of a resource throttle based // shouldoverrideurl implementation. See crbug.com/325351 -@@ -213,6 +215,7 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -217,6 +219,7 @@ class CONTENT_EXPORT ContentRendererClient { blink::WebNavigationPolicy default_policy, bool is_redirect); @@ -415,12 +441,12 @@ index 915dc35..a015048 100644 // built in media player for the given |url|. Defaults to false. virtual bool ShouldUseMediaPlayerForURL(const GURL& url); diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h -index 48b932e..80110f9 100644 +index 4f8478bfa87a..52471407518e 100644 --- content/public/renderer/render_frame_observer.h +++ content/public/renderer/render_frame_observer.h -@@ -116,6 +116,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, - virtual void DidObserveLoadingBehavior( - blink::WebLoadingBehaviorFlag behavior) {} +@@ -124,6 +124,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, + // load. This is used for UseCounter feature metrics. + virtual void DidObserveNewFeatureUsage(blink::mojom::WebFeature feature) {} + // Called when this frame gains focus. + virtual void FrameFocused() {} @@ -429,10 +455,10 @@ index 48b932e..80110f9 100644 virtual void FocusedNodeChanged(const blink::WebNode& node) {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index 69bb3ef..df99298 100644 +index 7fc594620793..9082ae71219f 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc -@@ -2897,7 +2897,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( +@@ -2952,7 +2952,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( std::string mime_type; bool found = false; Send(new FrameHostMsg_GetPluginInfo( @@ -442,7 +468,7 @@ index 69bb3ef..df99298 100644 params.mime_type.Utf8(), &found, &info, &mime_type)); if (!found) return nullptr; -@@ -3205,6 +3206,8 @@ void RenderFrameImpl::FrameDetached(blink::WebLocalFrame* frame, +@@ -3258,6 +3259,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { void RenderFrameImpl::FrameFocused() { Send(new FrameHostMsg_FrameFocused(routing_id_)); @@ -451,7 +477,7 @@ index 69bb3ef..df99298 100644 } void RenderFrameImpl::WillCommitProvisionalLoad() { -@@ -5324,9 +5327,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( +@@ -5397,9 +5400,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( (!IsBrowserSideNavigationEnabled() || url != pending_navigation_params_->request_params.redirects[0])); @@ -463,19 +489,19 @@ index 69bb3ef..df99298 100644 // The handlenavigation API is deprecated and will be removed once // crbug.com/325351 is resolved. if (GetContentClient()->renderer()->HandleNavigation( -@@ -5339,7 +5341,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( +@@ -5412,7 +5414,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( } return blink::kWebNavigationPolicyIgnore; } -#endif - Referrer referrer( - RenderViewImpl::GetReferrerFromRequest(frame_, info.url_request)); + // If the browser is interested, then give it a chance to look at the request. + if (is_content_initiated && IsTopLevelNavigation(frame_) && diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index c26bd13..25e7028 100644 +index dbf1a1967f90..064f48a2e071 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -772,6 +772,8 @@ void RenderThreadImpl::Init( +@@ -774,6 +774,8 @@ void RenderThreadImpl::Init( StartServiceManagerConnection(); @@ -485,10 +511,10 @@ index c26bd13..25e7028 100644 base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index 45fcfe8..165a5f4 100644 +index 2246aa95c564..02d25c60a090 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -876,6 +876,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor( +@@ -783,6 +783,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor( void RendererBlinkPlatformImpl::GetPluginList( bool refresh, @@ -496,7 +522,7 @@ index 45fcfe8..165a5f4 100644 const blink::WebSecurityOrigin& mainFrameOrigin, blink::WebPluginListBuilder* builder) { #if BUILDFLAG(ENABLE_PLUGINS) -@@ -883,7 +884,8 @@ void RendererBlinkPlatformImpl::GetPluginList( +@@ -790,7 +791,8 @@ void RendererBlinkPlatformImpl::GetPluginList( if (!plugin_refresh_allowed_) refresh = false; RenderThread::Get()->Send( @@ -507,7 +533,7 @@ index 45fcfe8..165a5f4 100644 builder->AddPlugin(WebString::FromUTF16(plugin.name), WebString::FromUTF16(plugin.desc), diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index 0ca8faf..7c81cf9 100644 +index 18ab5e68d8a6..bd40d2914f7a 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h @@ -125,6 +125,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -519,7 +545,7 @@ index 0ca8faf..7c81cf9 100644 blink::WebPluginListBuilder* builder) override; blink::WebPublicSuffixList* PublicSuffixList() override; diff --git content/shell/browser/shell_plugin_service_filter.cc content/shell/browser/shell_plugin_service_filter.cc -index 3a48c59..d10ef64 100644 +index 3a48c59b7e3e..d10ef64adbba 100644 --- content/shell/browser/shell_plugin_service_filter.cc +++ content/shell/browser/shell_plugin_service_filter.cc @@ -18,6 +18,7 @@ bool ShellPluginServiceFilter::IsPluginAvailable( @@ -531,7 +557,7 @@ index 3a48c59..d10ef64 100644 WebPluginInfo* plugin) { return plugin->name == base::ASCIIToUTF16("Blink Test Plugin") || diff --git content/shell/browser/shell_plugin_service_filter.h content/shell/browser/shell_plugin_service_filter.h -index 7767a62..8a95377 100644 +index 7767a620a9fd..8a95377f5f3b 100644 --- content/shell/browser/shell_plugin_service_filter.h +++ content/shell/browser/shell_plugin_service_filter.h @@ -21,6 +21,7 @@ class ShellPluginServiceFilter : public PluginServiceFilter { @@ -543,7 +569,7 @@ index 7767a62..8a95377 100644 WebPluginInfo* plugin) override; diff --git content/test/fake_plugin_service.cc content/test/fake_plugin_service.cc -index 6746b9f..8634ada 100644 +index 6746b9f16e7e..8634ada48d57 100644 --- content/test/fake_plugin_service.cc +++ content/test/fake_plugin_service.cc @@ -29,6 +29,7 @@ bool FakePluginService::GetPluginInfo(int render_process_id, @@ -555,7 +581,7 @@ index 6746b9f..8634ada 100644 const std::string& mime_type, bool allow_wildcard, diff --git content/test/fake_plugin_service.h content/test/fake_plugin_service.h -index db23a83..57a4c536 100644 +index db23a83ed079..57a4c536118c 100644 --- content/test/fake_plugin_service.h +++ content/test/fake_plugin_service.h @@ -30,6 +30,7 @@ class FakePluginService : public PluginService { @@ -567,7 +593,7 @@ index db23a83..57a4c536 100644 const std::string& mime_type, bool allow_wildcard, diff --git content/test/test_blink_web_unit_test_support.cc content/test/test_blink_web_unit_test_support.cc -index c19d608..3dce54d 100644 +index c19d608cc3e1..3dce54daf1cb 100644 --- content/test/test_blink_web_unit_test_support.cc +++ content/test/test_blink_web_unit_test_support.cc @@ -290,6 +290,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() { @@ -579,7 +605,7 @@ index c19d608..3dce54d 100644 blink::WebPluginListBuilder* builder) { builder->AddPlugin("pdf", "pdf", "pdf-files"); diff --git content/test/test_blink_web_unit_test_support.h content/test/test_blink_web_unit_test_support.h -index 556242d..61853c2 100644 +index 556242d76fa9..61853c2df547 100644 --- content/test/test_blink_web_unit_test_support.h +++ content/test/test_blink_web_unit_test_support.h @@ -70,6 +70,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl { diff --git a/patch/patches/content_pepper_flash_1586.patch b/patch/patches/content_pepper_flash_1586.patch index 49b5a01ae..f5da11e78 100644 --- a/patch/patches/content_pepper_flash_1586.patch +++ b/patch/patches/content_pepper_flash_1586.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc -index 4822d0d..3efc466 100644 +index 4822d0d57e44..3efc46631f4c 100644 --- content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc +++ content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc @@ -55,7 +55,7 @@ PepperFlashFileMessageFilter::PepperFlashFileMessageFilter( diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index 748a13cae..2d9f8cedd 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -1,5 +1,5 @@ diff --git build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn -index 4d385dd..1b51f2d 100644 +index 4d385dd5512b..1b51f2d17491 100644 --- build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn +++ build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn @@ -2,6 +2,8 @@ @@ -31,7 +31,7 @@ index 4d385dd..1b51f2d 100644 cflags = [ "/wd4201" ] } diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc -index effec5c..1cd8f58 100644 +index 1b3349852829..c1425f39e28d 100644 --- chrome/common/crash_keys.cc +++ chrome/common/crash_keys.cc @@ -4,6 +4,8 @@ @@ -52,7 +52,7 @@ index effec5c..1cd8f58 100644 // The following keys may be chunked by the underlying crash logging system, // but ultimately constitute a single key-value pair. // -@@ -229,10 +231,16 @@ size_t RegisterChromeCrashKeys() { +@@ -212,10 +214,16 @@ size_t RegisterChromeCrashKeys() { // This dynamic set of keys is used for sets of key value pairs when gathering // a collection of data, like command line switches or extension IDs. @@ -71,7 +71,7 @@ index effec5c..1cd8f58 100644 // Register the extension IDs. { -@@ -266,7 +274,7 @@ size_t RegisterChromeCrashKeys() { +@@ -249,7 +257,7 @@ size_t RegisterChromeCrashKeys() { return base::debug::InitCrashKeys(&keys.at(0), keys.size(), kChunkMaxLength); } @@ -80,7 +80,7 @@ index effec5c..1cd8f58 100644 static const char* const kIgnoreSwitches[] = { switches::kEnableLogging, switches::kFlagSwitchesBegin, -@@ -322,7 +330,7 @@ static bool IsBoringSwitch(const std::string& flag) { +@@ -305,7 +313,7 @@ static bool IsBoringSwitch(const std::string& flag) { } void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) { @@ -90,7 +90,7 @@ index effec5c..1cd8f58 100644 void SetActiveExtensions(const std::set& extensions) { diff --git chrome/common/crash_keys.h chrome/common/crash_keys.h -index 687146e..b1b73d6 100644 +index 687146e9e92c..b1b73d6e36b2 100644 --- chrome/common/crash_keys.h +++ chrome/common/crash_keys.h @@ -22,10 +22,18 @@ class CommandLine; @@ -113,7 +113,7 @@ index 687146e..b1b73d6 100644 // on the given |command_line|. void SetCrashKeysFromCommandLine(const base::CommandLine& command_line); diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn -index 8ae2c85..cea4a3d 100644 +index f8ac4823fa05..83386f77dd69 100644 --- chrome_elf/BUILD.gn +++ chrome_elf/BUILD.gn @@ -7,6 +7,7 @@ @@ -124,7 +124,7 @@ index 8ae2c85..cea4a3d 100644 import("//chrome/process_version_rc_template.gni") import("//testing/test.gni") -@@ -137,16 +138,15 @@ static_library("blacklist") { +@@ -158,9 +159,6 @@ static_library("blacklist") { static_library("crash") { sources = [ @@ -134,18 +134,17 @@ index 8ae2c85..cea4a3d 100644 "crash/crash_helper.cc", "crash/crash_helper.h", ] -+ - deps = [ +@@ -168,6 +166,7 @@ static_library("crash") { ":hook_util", - "//base:base", # This needs to go. DEP of app, crash_keys, client. + "//base", # This needs to go. DEP of app, crash_keys, client. "//base:base_static", # pe_image + "//cef/libcef/features", "//chrome/install_static:install_static_util", - "//components/crash/content/app:app", + "//components/crash/content/app", "//components/crash/core/common", # crash_keys -@@ -155,6 +155,17 @@ static_library("crash") { +@@ -176,6 +175,17 @@ static_library("crash") { "//gpu/config:crash_keys", - "//third_party/crashpad/crashpad/client:client", # DumpWithoutCrash + "//third_party/crashpad/crashpad/client", # DumpWithoutCrash ] + + if (enable_cef) { @@ -162,7 +161,7 @@ index 8ae2c85..cea4a3d 100644 static_library("hook_util") { diff --git chrome_elf/crash/crash_helper.cc chrome_elf/crash/crash_helper.cc -index 31ed150..aacbb02 100644 +index e1bede4790c0..e21761ecaf52 100644 --- chrome_elf/crash/crash_helper.cc +++ chrome_elf/crash/crash_helper.cc @@ -11,12 +11,17 @@ @@ -196,7 +195,7 @@ index 31ed150..aacbb02 100644 g_crash_helper_enabled = true; return true; diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc -index 2199920..e6e8f58 100644 +index 2199920ee793..e6e8f58a0be0 100644 --- components/crash/content/app/breakpad_linux.cc +++ components/crash/content/app/breakpad_linux.cc @@ -29,6 +29,7 @@ @@ -274,7 +273,7 @@ index 2199920..e6e8f58 100644 void InitNonBrowserCrashReporterForAndroid(const std::string& process_type) { SanitizationInfo sanitization_info; diff --git components/crash/content/app/breakpad_linux.h components/crash/content/app/breakpad_linux.h -index 4a2a429..70f3adb 100644 +index 4a2a429fc052..70f3adbc73cf 100644 --- components/crash/content/app/breakpad_linux.h +++ components/crash/content/app/breakpad_linux.h @@ -16,6 +16,9 @@ namespace breakpad { @@ -288,7 +287,7 @@ index 4a2a429..70f3adb 100644 extern void InitCrashKeysForTesting(); diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc -index 2e9ee28..de53f59 100644 +index 2e9ee28e1b00..de53f5927143 100644 --- components/crash/content/app/crash_reporter_client.cc +++ components/crash/content/app/crash_reporter_client.cc @@ -88,11 +88,12 @@ int CrashReporterClient::GetResultCodeRespawnFailed() { @@ -357,7 +356,7 @@ index 2e9ee28..de53f59 100644 - } // namespace crash_reporter diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h -index 9f69c19..2abaee00 100644 +index 9f69c193dda2..2abaee004c47 100644 --- components/crash/content/app/crash_reporter_client.h +++ components/crash/content/app/crash_reporter_client.h @@ -8,6 +8,7 @@ @@ -383,14 +382,14 @@ index 9f69c19..2abaee00 100644 virtual base::FilePath GetReporterLogFilename(); // Custom crash minidump handler after the minidump is generated. -@@ -119,6 +121,7 @@ class CrashReporterClient { +@@ -118,6 +120,7 @@ class CrashReporterClient { + // WARNING: this handler runs in a compromised context. It may not call into // libc nor allocate memory normally. virtual bool HandleCrashDump(const char* crashdump_filename); - #endif +#endif + #endif // The location where minidump files should be written. Returns true if - // |crash_dir| was set. Windows has to use base::string16 because this code @@ -197,6 +200,23 @@ class CrashReporterClient { // Returns true if breakpad should run in the given process type. @@ -416,10 +415,10 @@ index 9f69c19..2abaee00 100644 } // namespace crash_reporter diff --git components/crash/content/app/crashpad.cc components/crash/content/app/crashpad.cc -index ede08d7..d7caf4d 100644 +index aface8de549a..df37644bd872 100644 --- components/crash/content/app/crashpad.cc +++ components/crash/content/app/crashpad.cc -@@ -139,7 +139,8 @@ void InitializeCrashpadImpl(bool initial_client, +@@ -135,7 +135,8 @@ void InitializeCrashpadImpl(bool initial_client, // fallback. Forwarding is turned off for debug-mode builds even for the // browser process, because the system's crash reporter can take a very long // time to chew on symbols. @@ -430,7 +429,7 @@ index ede08d7..d7caf4d 100644 crashpad::TriState::kDisabled); } diff --git components/crash/content/app/crashpad_mac.mm components/crash/content/app/crashpad_mac.mm -index 485c2b4..3b5f3ea 100644 +index 485c2b4b3e98..3b5f3eaa3926 100644 --- components/crash/content/app/crashpad_mac.mm +++ components/crash/content/app/crashpad_mac.mm @@ -16,11 +16,14 @@ @@ -531,10 +530,10 @@ index 485c2b4..3b5f3ea 100644 handler_path, database_path, metrics_path, url, process_annotations, arguments, true, false); diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc -index 3946d2a..175fb2e 100644 +index bb5c09732c20..da3628cf8eb1 100644 --- components/crash/content/app/crashpad_win.cc +++ components/crash/content/app/crashpad_win.cc -@@ -33,8 +33,8 @@ void GetPlatformCrashpadAnnotations( +@@ -34,8 +34,8 @@ void GetPlatformCrashpadAnnotations( base::string16 product_name, version, special_build, channel_name; crash_reporter_client->GetProductNameAndVersion( exe_file, &product_name, &version, &special_build, &channel_name); @@ -545,7 +544,7 @@ index 3946d2a..175fb2e 100644 #if defined(GOOGLE_CHROME_BUILD) // Empty means stable. const bool allow_empty_channel = true; -@@ -46,9 +46,9 @@ void GetPlatformCrashpadAnnotations( +@@ -47,9 +47,9 @@ void GetPlatformCrashpadAnnotations( if (!special_build.empty()) (*annotations)["special"] = base::UTF16ToUTF8(special_build); #if defined(ARCH_CPU_X86) @@ -557,7 +556,7 @@ index 3946d2a..175fb2e 100644 #endif } -@@ -82,7 +82,7 @@ base::FilePath PlatformCrashpadInitialization( +@@ -83,7 +83,7 @@ base::FilePath PlatformCrashpadInitialization( #if defined(GOOGLE_CHROME_BUILD) std::string url = "https://clients2.google.com/cr/report"; #else @@ -566,7 +565,7 @@ index 3946d2a..175fb2e 100644 #endif // Allow the crash server to be overridden for testing. If the variable -@@ -102,13 +102,14 @@ base::FilePath PlatformCrashpadInitialization( +@@ -103,13 +103,14 @@ base::FilePath PlatformCrashpadInitialization( crashpad::TriState::kEnabled, kIndirectMemoryLimit); } @@ -586,7 +585,7 @@ index 3946d2a..175fb2e 100644 if (!user_data_dir.empty()) { start_arguments.push_back(std::string("--user-data-dir=") + user_data_dir); -@@ -119,9 +120,12 @@ base::FilePath PlatformCrashpadInitialization( +@@ -120,9 +121,12 @@ base::FilePath PlatformCrashpadInitialization( start_arguments.push_back("/prefetch:7"); } else { base::FilePath exe_dir = exe_file.DirName(); @@ -601,7 +600,7 @@ index 3946d2a..175fb2e 100644 if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc -index bcf53d5..d4f070b 100644 +index c1764c511286..46165027b9d8 100644 --- content/browser/frame_host/debug_urls.cc +++ content/browser/frame_host/debug_urls.cc @@ -139,7 +139,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) { diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index 725cf6454..17785f85a 100644 --- a/patch/patches/crashpad_tp_1995.patch +++ b/patch/patches/crashpad_tp_1995.patch @@ -1,5 +1,5 @@ diff --git third_party/crashpad/crashpad/client/prune_crash_reports.cc third_party/crashpad/crashpad/client/prune_crash_reports.cc -index 3aaaeee..d99fcb4 100644 +index 3aaaeee5d07f..d99fcb418d9e 100644 --- third_party/crashpad/crashpad/client/prune_crash_reports.cc +++ third_party/crashpad/crashpad/client/prune_crash_reports.cc @@ -67,13 +67,19 @@ void PruneCrashReportDatabase(CrashReportDatabase* database, @@ -26,7 +26,7 @@ index 3aaaeee..d99fcb4 100644 static const time_t kSecondsInDay = 60 * 60 * 24; diff --git third_party/crashpad/crashpad/client/prune_crash_reports.h third_party/crashpad/crashpad/client/prune_crash_reports.h -index 6dac5f3..34f5ee1 100644 +index 6dac5f3002b3..34f5ee111d3d 100644 --- third_party/crashpad/crashpad/client/prune_crash_reports.h +++ third_party/crashpad/crashpad/client/prune_crash_reports.h @@ -57,7 +57,8 @@ class PruneCondition { @@ -40,7 +40,7 @@ index 6dac5f3..34f5ee1 100644 virtual ~PruneCondition() {} diff --git third_party/crashpad/crashpad/client/settings.cc third_party/crashpad/crashpad/client/settings.cc -index 15d16f2..5e8eadf 100644 +index 15d16f2e0928..5e8eadfd3ad1 100644 --- third_party/crashpad/crashpad/client/settings.cc +++ third_party/crashpad/crashpad/client/settings.cc @@ -38,7 +38,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) { @@ -130,7 +130,7 @@ index 15d16f2..5e8eadf 100644 Settings::ScopedLockedFileHandle Settings::MakeScopedLockedFileHandle( FileHandle file, diff --git third_party/crashpad/crashpad/client/settings.h third_party/crashpad/crashpad/client/settings.h -index b64f74f..0c3c22e 100644 +index b64f74fbaf28..0c3c22e215b6 100644 --- third_party/crashpad/crashpad/client/settings.h +++ third_party/crashpad/crashpad/client/settings.h @@ -102,6 +102,11 @@ class Settings { @@ -146,7 +146,7 @@ index b64f74f..0c3c22e 100644 struct Data; diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.h third_party/crashpad/crashpad/handler/crash_report_upload_thread.h -index c769efe..daec6cd 100644 +index c769efed5c54..daec6cd17f37 100644 --- third_party/crashpad/crashpad/handler/crash_report_upload_thread.h +++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.h @@ -89,7 +89,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate { @@ -177,7 +177,7 @@ index c769efe..daec6cd 100644 //! \brief Attempts to upload a crash report. //! diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc -index e6d05e2..93e5eb1 100644 +index abc22bf3ef0c..05753af3c2a1 100644 --- third_party/crashpad/crashpad/handler/handler_main.cc +++ third_party/crashpad/crashpad/handler/handler_main.cc @@ -35,8 +35,10 @@ diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index c062232d3..c0643f965 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -1,8 +1,8 @@ diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc -index c8b4275..05ca91e 100644 +index 799d2925b21a..43f9173e5db2 100644 --- content/browser/frame_host/render_frame_host_manager.cc +++ content/browser/frame_host/render_frame_host_manager.cc -@@ -1083,10 +1083,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( +@@ -1072,10 +1072,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( // TODO(alexmos): This check should've been enforced earlier in the // navigation, in chrome::Navigate(). Verify this, and then convert this to // a CHECK and remove the fallback. @@ -18,7 +18,7 @@ index c8b4275..05ca91e 100644 return true; } -@@ -1208,7 +1209,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( +@@ -1197,7 +1198,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( // Double-check that the new SiteInstance is associated with the right // BrowserContext. @@ -29,10 +29,10 @@ index c8b4275..05ca91e 100644 // If |new_instance| is a new SiteInstance for a subframe with an isolated // origin, 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 -index e226ba1..9c9c7cf 100644 +index 507f728ffe5b..20c49cc25387 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -310,6 +310,13 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -316,6 +316,13 @@ class CONTENT_EXPORT ContentBrowserClient { const GURL& current_url, const GURL& new_url); @@ -47,7 +47,7 @@ index e226ba1..9c9c7cf 100644 // current SiteInstance, if it does not yet have a site. virtual bool ShouldAssignSiteForURL(const GURL& url); diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc -index 4ec655a..b937c20 100644 +index 4ec655aa834c..b937c201ecf9 100644 --- extensions/browser/extension_host.cc +++ extensions/browser/extension_host.cc @@ -69,11 +69,12 @@ ExtensionHost::ExtensionHost(const Extension* extension, @@ -117,7 +117,7 @@ index 4ec655a..b937c20 100644 ExtensionRegistry::Get(browser_context_)->RemoveObserver(this); diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h -index fea09ed..16f81b1 100644 +index fea09edc247f..16f81b139476 100644 --- extensions/browser/extension_host.h +++ extensions/browser/extension_host.h @@ -51,11 +51,17 @@ class ExtensionHost : public DeferredStartRenderHost, @@ -150,18 +150,18 @@ index fea09ed..16f81b1 100644 // 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 diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h -index 64cf7b0..e801fb0 100644 +index 0c70794823d3..4922df0d5398 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h -@@ -17,6 +17,7 @@ - #include "extensions/common/view_type.h" +@@ -18,6 +18,7 @@ + #include "services/service_manager/public/cpp/binder_registry.h" class ExtensionFunctionRegistry; +class GURL; class PrefService; namespace base { -@@ -48,6 +49,7 @@ class ComponentExtensionResourceManager; +@@ -49,6 +50,7 @@ class ComponentExtensionResourceManager; class Extension; class ExtensionCache; class ExtensionError; @@ -169,7 +169,7 @@ index 64cf7b0..e801fb0 100644 class ExtensionHostDelegate; class ExtensionPrefsObserver; class ExtensionApiFrameIdMap; -@@ -102,6 +104,11 @@ class ExtensionsBrowserClient { +@@ -103,6 +105,11 @@ class ExtensionsBrowserClient { virtual content::BrowserContext* GetOriginalContext( content::BrowserContext* context) = 0; @@ -181,7 +181,7 @@ index 64cf7b0..e801fb0 100644 #if defined(OS_CHROMEOS) // Returns a user id hash from |context| or an empty string if no hash could // be extracted. -@@ -162,6 +169,14 @@ class ExtensionsBrowserClient { +@@ -163,6 +170,14 @@ class ExtensionsBrowserClient { virtual std::unique_ptr CreateExtensionHostDelegate() = 0; @@ -197,10 +197,10 @@ index 64cf7b0..e801fb0 100644 // once each time the extensions system is loaded per browser_context. The // implementation may wish to use the BrowserContext to record the current diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc -index cb63e50..6e3eccd 100644 +index 073efff20e05..7a7656206cef 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc -@@ -347,9 +347,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, +@@ -349,9 +349,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, return true; // TODO(kalman): return false here? It might break things... DVLOG(1) << "CreateBackgroundHost " << extension->id(); @@ -221,7 +221,7 @@ index cb63e50..6e3eccd 100644 OnBackgroundHostCreated(host); return true; diff --git extensions/browser/process_manager_factory.cc extensions/browser/process_manager_factory.cc -index e8929c5..5ae43b4 100644 +index e8929c5da255..5ae43b4361a4 100644 --- extensions/browser/process_manager_factory.cc +++ extensions/browser/process_manager_factory.cc @@ -5,6 +5,7 @@ diff --git a/patch/patches/font_family_cache_1501.patch b/patch/patches/font_family_cache_1501.patch index 7c7da104a..689dfe66b 100644 --- a/patch/patches/font_family_cache_1501.patch +++ b/patch/patches/font_family_cache_1501.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/font_family_cache.h chrome/browser/font_family_cache.h -index 2961f37..2ef6a30 100644 +index 9366134bfe8e..c85039bad70b 100644 --- chrome/browser/font_family_cache.h +++ chrome/browser/font_family_cache.h @@ -21,6 +21,8 @@ class Profile; diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index d9f19942c..fcad3259b 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index 441b8ac..c3fe3b1 100644 +index 29d65d771249..eb61510004a7 100644 --- .gn +++ .gn -@@ -271,6 +271,8 @@ exec_script_whitelist = +@@ -255,6 +255,8 @@ exec_script_whitelist = # in the Chromium repo outside of //build. "//build_overrides/build.gni", @@ -12,10 +12,10 @@ index 441b8ac..c3fe3b1 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index d274819..191ea00 100644 +index 5fdb6c5f516c..654c28e9f3a0 100644 --- BUILD.gn +++ BUILD.gn -@@ -170,6 +170,7 @@ group("gn_all") { +@@ -172,6 +172,7 @@ group("gn_all") { if (!is_ios && !is_fuchsia) { deps += [ "//cc:cc_unittests", @@ -24,7 +24,7 @@ index d274819..191ea00 100644 "//chrome/test:unit_tests", "//components:components_browsertests", diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni -index 982fbe8..e757be46 100644 +index 982fbe8d3f0d..e757be4688f1 100644 --- build/config/win/visual_studio_version.gni +++ build/config/win/visual_studio_version.gni @@ -12,9 +12,8 @@ declare_args() { @@ -56,7 +56,7 @@ index 982fbe8..e757be46 100644 + "studio path") } diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py -index 8150d3a..39441ef 100644 +index 8150d3a4e4ac..39441ef7ae89 100644 --- build/toolchain/win/setup_toolchain.py +++ build/toolchain/win/setup_toolchain.py @@ -132,17 +132,21 @@ def _LoadToolchainEnv(cpu, sdk_dir): @@ -91,7 +91,7 @@ index 8150d3a..39441ef 100644 diff --git build/vs_toolchain.py build/vs_toolchain.py -index 3b2c727..60e4984 100755 +index 93a04ceb27d0..05342d2707e9 100755 --- build/vs_toolchain.py +++ build/vs_toolchain.py @@ -79,11 +79,18 @@ def SetEnvironmentAndGetRuntimeDllDirs(): @@ -114,10 +114,10 @@ index 3b2c727..60e4984 100755 # directory in order to run binaries locally, but they are needed in order # to create isolates or the mini_installer. Copying them to the output diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index a7778f9..5e3eb75a 100644 +index c9a9a3d95f29..41f3bd29d7dc 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni -@@ -252,7 +252,7 @@ template("chrome_paks") { +@@ -248,7 +248,7 @@ template("chrome_paks") { } input_locales = locales @@ -127,10 +127,10 @@ index a7778f9..5e3eb75a 100644 if (is_mac) { output_locales = locales_as_mac_outputs diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn -index 2afab1a..c8791ea 100644 +index 14a729a33cd4..3651ff58915c 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn -@@ -128,7 +128,7 @@ template("generate_mini_installer") { +@@ -130,7 +130,7 @@ template("generate_mini_installer") { inputs = [ "$chrome_dll_file", "$root_out_dir/chrome.exe", diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index ed57c6b26..6873d2f09 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,5 +1,5 @@ diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids -index 9a0f5ed..9de2636 100644 +index ee0116d1852b..be1ec3e1c230 100644 --- tools/gritsettings/resource_ids +++ tools/gritsettings/resource_ids @@ -380,4 +380,11 @@ diff --git a/patch/patches/ime_1610.patch b/patch/patches/ime_1610.patch index 1d9a7d589..2e945f558 100644 --- a/patch/patches/ime_1610.patch +++ b/patch/patches/ime_1610.patch @@ -1,5 +1,5 @@ diff --git ui/base/ime/input_method_win.cc ui/base/ime/input_method_win.cc -index 3e33b5a..6b425cc 100644 +index 3e33b5a74170..6b425cc0fbee 100644 --- ui/base/ime/input_method_win.cc +++ ui/base/ime/input_method_win.cc @@ -688,8 +688,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const { diff --git a/patch/patches/linux_build.patch b/patch/patches/linux_build.patch index 97ed9f1dc..fc1140377 100644 --- a/patch/patches/linux_build.patch +++ b/patch/patches/linux_build.patch @@ -1,33 +1,20 @@ diff --git chrome/browser/ui/libgtkui/gtk_ui.cc chrome/browser/ui/libgtkui/gtk_ui.cc -index a38c6b8..bb4fa59 100644 +index f45f2b1..dbabf1b 100644 --- chrome/browser/ui/libgtkui/gtk_ui.cc +++ chrome/browser/ui/libgtkui/gtk_ui.cc -@@ -1053,7 +1053,11 @@ float GtkUi::GetRawDeviceScaleFactor() { - return display::Display::GetForcedDeviceScaleFactor(); +@@ -92,6 +92,7 @@ namespace libgtkui { + + namespace { - GdkScreen* screen = gdk_screen_get_default(); +#if GTK_MAJOR_VERSION == 3 - gint scale = gtk_widget_get_scale_factor(fake_window_); -+#else -+ gint scale = 1; + // We would like this to be a feature flag, but GtkUi gets initialized + // earlier than the feature flag registry, so just use a simple bool. + // The reason for wanting a flag is so that we can release the GTK3 +@@ -100,6 +101,7 @@ namespace { + // Since this was never really intended to be toggled by users, this + // is fine for now. + const bool kUseGtkNavButtonLayoutManager = true; +#endif - gdouble resolution = gdk_screen_get_resolution(screen); - const float scale_factor = - resolution <= 0 ? scale : resolution * scale / kDefaultDPI; -diff --git ui/accessibility/platform/ax_platform_node_auralinux.cc ui/accessibility/platform/ax_platform_node_auralinux.cc -index c73d7a9..5fcc441 100644 ---- ui/accessibility/platform/ax_platform_node_auralinux.cc -+++ ui/accessibility/platform/ax_platform_node_auralinux.cc -@@ -474,8 +474,12 @@ void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) { - atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDED); - if (data.HasState(ui::AX_STATE_FOCUSABLE)) - atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE); -+#if defined(ATK_CHECK_VERSION) -+#if ATK_CHECK_VERSION(2, 11, 2) - if (data.HasState(ui::AX_STATE_HASPOPUP)) - atk_state_set_add_state(atk_state_set, ATK_STATE_HAS_POPUP); -+#endif -+#endif - if (data.HasState(ui::AX_STATE_SELECTED)) - atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTED); - if (data.HasState(ui::AX_STATE_SELECTABLE)) + + const double kDefaultDPI = 96; + diff --git a/patch/patches/mac_build_747693.patch b/patch/patches/mac_build_747693.patch deleted file mode 100755 index 1e497a6d8..000000000 --- a/patch/patches/mac_build_747693.patch +++ /dev/null @@ -1,118 +0,0 @@ -diff --git chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h -index 18755d494cf3..3605076be5d1 100644 ---- chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h -+++ chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h -@@ -8,6 +8,7 @@ - #import - #include - -+#include "base/mac/availability.h" - #import "chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h" - #import "ui/base/cocoa/touch_bar_forward_declarations.h" - -@@ -38,7 +39,7 @@ class AutofillPopupViewCocoaDelegate; - - (void)invalidateRow:(NSInteger)row; - - // Creates and returns a touch bar if the popup is for credit cards. --- (NSTouchBar*)makeTouchBar; -+- (NSTouchBar*)makeTouchBar API_AVAILABLE(macos(10.12.2)); - - @end - -diff --git chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm -index 46733a165a31..2d71d4446a36 100644 ---- chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm -+++ chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm -@@ -178,7 +178,8 @@ - (void)drawRect:(NSRect)dirtyRect { - #pragma mark NSTouchBarDelegate implementation: - - - (NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar -- makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier { -+ makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier -+ API_AVAILABLE(macos(10.12.2)) { - if (![identifier hasSuffix:kCreditCardItemsTouchId]) - return nil; - -diff --git chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa_unittest.mm chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa_unittest.mm -index aebb22367472..2e6d6be61b5f 100644 ---- chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa_unittest.mm -+++ chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa_unittest.mm -@@ -110,31 +110,27 @@ void SetLineCount(int line_count) { - - // Tests to check if the touch bar shows up properly. - TEST_F(AutofillPopupViewCocoaUnitTest, CreditCardAutofillTouchBar) { -- if (!base::mac::IsAtLeastOS10_12()) -- return; -- -- // Touch bar shouldn't appear if the popup is not for credit cards. -- autofill_popup_controller_.SetIsCreditCardField(false); -- EXPECT_FALSE([view_ makeTouchBar]); -- -- // Touch bar shouldn't appear if the popup is empty. -- autofill_popup_controller_.SetIsCreditCardField(true); -- SetLineCount(0); -- EXPECT_FALSE([view_ makeTouchBar]); -- -- autofill_popup_controller_.SetIsCreditCardField(true); -- SetLineCount(3); -- NSTouchBar* touch_bar = [view_ makeTouchBar]; -- EXPECT_TRUE(touch_bar); -- EXPECT_TRUE([[touch_bar customizationIdentifier] -- isEqual:ui::GetTouchBarId(kCreditCardAutofillTouchBarId)]); -+ if (@available(macOS 10.12.2, *)) { -+ // Touch bar shouldn't appear if the popup is not for credit cards. -+ autofill_popup_controller_.SetIsCreditCardField(false); -+ EXPECT_FALSE([view_ makeTouchBar]); -+ -+ // Touch bar shouldn't appear if the popup is empty. -+ autofill_popup_controller_.SetIsCreditCardField(true); -+ SetLineCount(0); -+ EXPECT_FALSE([view_ makeTouchBar]); -+ -+ autofill_popup_controller_.SetIsCreditCardField(true); -+ SetLineCount(3); -+ NSTouchBar* touch_bar = [view_ makeTouchBar]; -+ EXPECT_TRUE(touch_bar); -+ EXPECT_TRUE([[touch_bar customizationIdentifier] -+ isEqual:ui::GetTouchBarId(kCreditCardAutofillTouchBarId)]); -+ } - } - --// Tests that the touch bar logs into the histogram correctly. -+// Tests that the touch bar histogram is logged correctly. - TEST_F(AutofillPopupViewCocoaUnitTest, CreditCardAutofillTouchBarMetric) { -- if (!base::mac::IsAtLeastOS10_12()) -- return; -- - { - base::HistogramTester histogram_tester; - [view_ acceptCreditCard:nil]; -diff --git chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm -index 5378abc9cc2a..f0e7d9e8c86c 100644 ---- chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm -+++ chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm -@@ -235,7 +235,10 @@ - (void)loadView { - } - - - (NSTouchBar*)makeTouchBar { -- return [touchBarController_ makeTouchBar]; -+ if (@available(macOS 10.12.2, *)) -+ return [touchBarController_ makeTouchBar]; -+ -+ return nil; - } - - - (void)ensureContentsVisibleInSuperview:(NSView*)superview { -diff --git chrome/browser/ui/cocoa/web_textfield_touch_bar_controller.h chrome/browser/ui/cocoa/web_textfield_touch_bar_controller.h -index c3dc305aa48e..d50a2689d9de 100644 ---- chrome/browser/ui/cocoa/web_textfield_touch_bar_controller.h -+++ chrome/browser/ui/cocoa/web_textfield_touch_bar_controller.h -@@ -28,7 +28,7 @@ - - (void)showCreditCardAutofillForPopupView:(AutofillPopupViewCocoa*)popupView; - - // Creates and returns a touch bar. --- (NSTouchBar*)makeTouchBar; -+- (NSTouchBar*)makeTouchBar API_AVAILABLE(macos(10.12.2)); - - @end - diff --git a/patch/patches/message_loop_443_1992243003.patch b/patch/patches/message_loop_443_1992243003.patch index dc61edd32..eba446511 100644 --- a/patch/patches/message_loop_443_1992243003.patch +++ b/patch/patches/message_loop_443_1992243003.patch @@ -1,8 +1,8 @@ diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h -index 83c3191..c4c1290a 100644 +index a118917ea1cc..5c89a01e1019 100644 --- base/message_loop/message_loop.h +++ base/message_loop/message_loop.h -@@ -291,6 +291,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate, +@@ -278,6 +278,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate, void AddTaskObserver(TaskObserver* task_observer); void RemoveTaskObserver(TaskObserver* task_observer); @@ -16,11 +16,11 @@ index 83c3191..c4c1290a 100644 + } +#endif // OS_WIN + - // Returns true if the message loop has high resolution timers enabled. - // Provided for testing. - bool HasHighResolutionTasks(); -@@ -427,6 +437,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate, - // insider a (accidentally induced?) nested message pump. + // Returns true if the message loop is "idle". Provided for testing. + bool IsIdleForTesting(); + +@@ -413,6 +423,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate, + // need to be checked in conditionals). bool nestable_tasks_allowed_; +#if defined(OS_WIN) @@ -33,7 +33,7 @@ index 83c3191..c4c1290a 100644 // if type_ is TYPE_CUSTOM and pump_ is null. MessagePumpFactoryCallback pump_factory_; diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 6f48da1..e427941 100644 +index 6f48da1c744e..e427941bfd06 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -366,20 +366,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) { diff --git a/patch/patches/net_filter_515.patch b/patch/patches/net_filter_515.patch index 5cdb41814..c0f06f202 100644 --- a/patch/patches/net_filter_515.patch +++ b/patch/patches/net_filter_515.patch @@ -1,5 +1,5 @@ diff --git net/base/network_delegate.h net/base/network_delegate.h -index 79a94d6..19af0d1 100644 +index 22d22d03554a..c9a1c6df8f1b 100644 --- net/base/network_delegate.h +++ net/base/network_delegate.h @@ -16,6 +16,7 @@ @@ -22,10 +22,10 @@ index 79a94d6..19af0d1 100644 THREAD_CHECKER(thread_checker_); diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc -index 7a776d3..84c0189 100644 +index 9112c4467cb2..4298ab28eab1 100644 --- net/url_request/url_request_job.cc +++ net/url_request/url_request_job.cc -@@ -532,6 +532,12 @@ void URLRequestJob::NotifyHeadersComplete() { +@@ -531,6 +531,12 @@ void URLRequestJob::NotifyHeadersComplete() { DCHECK(!source_stream_); source_stream_ = SetUpSourceStream(); diff --git a/patch/patches/net_security_expiration_1994.patch b/patch/patches/net_security_expiration_1994.patch index 57111daed..0448501c7 100644 --- a/patch/patches/net_security_expiration_1994.patch +++ b/patch/patches/net_security_expiration_1994.patch @@ -1,5 +1,5 @@ diff --git net/cert/ct_policy_enforcer.cc net/cert/ct_policy_enforcer.cc -index 0dd6a0d..8bc6502d 100644 +index 0dd6a0d6bc0c..8bc6502d1e6f 100644 --- net/cert/ct_policy_enforcer.cc +++ net/cert/ct_policy_enforcer.cc @@ -35,15 +35,6 @@ namespace net { @@ -33,7 +33,7 @@ index 0dd6a0d..8bc6502d 100644 + } // namespace net diff --git net/cert/ct_policy_enforcer.h net/cert/ct_policy_enforcer.h -index b594cba..285eae8 100644 +index b594cba1a6fc..285eae814c50 100644 --- net/cert/ct_policy_enforcer.h +++ net/cert/ct_policy_enforcer.h @@ -42,6 +42,17 @@ class NET_EXPORT CTPolicyEnforcer { @@ -55,7 +55,7 @@ index b594cba..285eae8 100644 } // namespace net diff --git net/http/transport_security_state.cc net/http/transport_security_state.cc -index 4ffe9e8..013cea5 100644 +index 718c70b8f865..0973f4ac142c 100644 --- net/http/transport_security_state.cc +++ net/http/transport_security_state.cc @@ -1550,8 +1550,10 @@ void TransportSecurityState::ClearReportCachesForTesting() { @@ -72,7 +72,7 @@ index 4ffe9e8..013cea5 100644 // We consider built-in information to be timely for 10 weeks. return (base::Time::Now() - build_time).InDays() < 70 /* 10 weeks */; diff --git net/http/transport_security_state.h net/http/transport_security_state.h -index 5e75551..1d1ca02 100644 +index b4bab0db79db..6c11351b43ba 100644 --- net/http/transport_security_state.h +++ net/http/transport_security_state.h @@ -574,6 +574,10 @@ class NET_EXPORT TransportSecurityState { diff --git a/patch/patches/net_urlrequest_1327.patch b/patch/patches/net_urlrequest_1327.patch index 41143eb11..660708e37 100644 --- a/patch/patches/net_urlrequest_1327.patch +++ b/patch/patches/net_urlrequest_1327.patch @@ -1,10 +1,10 @@ diff --git net/url_request/url_request.h net/url_request/url_request.h -index e529c37..9039974 100644 +index ae6bba1cdfa7..6fe1172b01b8 100644 --- net/url_request/url_request.h +++ net/url_request/url_request.h -@@ -667,10 +667,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { - return traffic_annotation_; - } +@@ -681,10 +681,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { + // called with a response from the server. + void SetResponseHeadersCallback(ResponseHeadersCallback callback); - protected: // Allow the URLRequestJob class to control the is_pending() flag. diff --git a/patch/patches/pdfium_print_549365.patch b/patch/patches/pdfium_print_549365.patch index 444d53186..27dfc8f44 100644 --- a/patch/patches/pdfium_print_549365.patch +++ b/patch/patches/pdfium_print_549365.patch @@ -1,5 +1,5 @@ diff --git BUILD.gn BUILD.gn -index 80a258e..7f343f1 100644 +index f268a0c3f..8767aed1d 100644 --- BUILD.gn +++ BUILD.gn @@ -227,6 +227,10 @@ static_library("pdfium") { @@ -14,10 +14,10 @@ index 80a258e..7f343f1 100644 static_library("test_support") { diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp -index 7dbaf7f..3b41421 100644 +index e93e8bcd5..c003f9f9b 100644 --- fpdfsdk/fpdfview.cpp +++ fpdfsdk/fpdfview.cpp -@@ -37,6 +37,7 @@ +@@ -38,6 +38,7 @@ #include "fpdfsdk/fsdk_define.h" #include "fpdfsdk/fsdk_pauseadapter.h" #include "fpdfsdk/javascript/ijs_runtime.h" @@ -25,7 +25,7 @@ index 7dbaf7f..3b41421 100644 #include "public/fpdf_edit.h" #include "public/fpdf_ext.h" #include "public/fpdf_progressive.h" -@@ -419,6 +420,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() { +@@ -480,6 +481,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() { CPDF_ModuleMgr::Destroy(); CFX_GEModule::Destroy(); diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index 6fa3d3b84..b5328ffb1 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -1,5 +1,5 @@ diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h -index 95656cd..35f26f1 100644 +index 24302aa9a63b..ba5c08bf5892 100644 --- content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h @@ -205,6 +205,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) @@ -11,10 +11,10 @@ index 95656cd..35f26f1 100644 IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc -index 767e91c..34f59fe 100644 +index a9c7b7d8c3ae..7c9d26fb223f 100644 --- content/public/common/web_preferences.cc +++ content/public/common/web_preferences.cc -@@ -171,6 +171,7 @@ WebPreferences::WebPreferences() +@@ -170,6 +170,7 @@ WebPreferences::WebPreferences() spatial_navigation_enabled(false), use_solid_color_scrollbars(false), navigate_on_drag_drop(true), @@ -23,7 +23,7 @@ index 767e91c..34f59fe 100644 record_whole_document(false), cookie_enabled(true), diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h -index 5012952..ed17a57 100644 +index 1e24ea16ae51..2c4062d42992 100644 --- content/public/common/web_preferences.h +++ content/public/common/web_preferences.h @@ -191,6 +191,7 @@ struct CONTENT_EXPORT WebPreferences { @@ -35,10 +35,10 @@ index 5012952..ed17a57 100644 bool record_whole_document; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc -index f26cc78..fab85a3 100644 +index 344e89232ca7..c74e5c5432ed 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc -@@ -1317,6 +1317,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal( +@@ -1309,6 +1309,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal( blink::WebView* web_view, CompositorDependencies* compositor_deps) { ApplyWebPreferences(prefs, web_view); diff --git a/patch/patches/print_header_footer_1478_1565.patch b/patch/patches/print_header_footer_1478_1565.patch index aa02ae8cb..721aff0ec 100644 --- a/patch/patches/print_header_footer_1478_1565.patch +++ b/patch/patches/print_header_footer_1478_1565.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/ui/cocoa/applescript/tab_applescript.mm chrome/browser/ui/cocoa/applescript/tab_applescript.mm -index 0cd84f3..2f872dd 100644 +index 0cd84f38c229..2f872dd3dfe2 100644 --- chrome/browser/ui/cocoa/applescript/tab_applescript.mm +++ chrome/browser/ui/cocoa/applescript/tab_applescript.mm @@ -9,7 +9,6 @@ @@ -41,7 +41,7 @@ index 0cd84f3..2f872dd 100644 - (void)handlesSaveScriptCommand:(NSScriptCommand*)command { diff --git chrome/common/chrome_utility_printing_messages.h chrome/common/chrome_utility_printing_messages.h -index f5712a7..11c0366 100644 +index f5712a7a5bb8..11c03661412b 100644 --- chrome/common/chrome_utility_printing_messages.h +++ chrome/common/chrome_utility_printing_messages.h @@ -26,7 +26,6 @@ @@ -61,10 +61,10 @@ index f5712a7..11c0366 100644 IPC_STRUCT_TRAITS_MEMBER(printer_capabilities) IPC_STRUCT_TRAITS_MEMBER(caps_mime_type) diff --git components/printing/common/print_messages.cc components/printing/common/print_messages.cc -index de03634..76ee3a7 100644 +index 4a7c94d1cdd0..7bf3e6ae072c 100644 --- components/printing/common/print_messages.cc +++ components/printing/common/print_messages.cc -@@ -105,7 +105,6 @@ void PrintMsg_PrintPages_Params::Reset() { +@@ -107,7 +107,6 @@ void PrintMsg_PrintPages_Params::Reset() { pages = std::vector(); } @@ -72,16 +72,16 @@ index de03634..76ee3a7 100644 PrintHostMsg_RequestPrintPreview_Params:: PrintHostMsg_RequestPrintPreview_Params() : is_modifiable(false), -@@ -127,4 +126,3 @@ PrintHostMsg_SetOptionsFromDocument_Params:: +@@ -129,4 +128,3 @@ PrintHostMsg_SetOptionsFromDocument_Params:: PrintHostMsg_SetOptionsFromDocument_Params:: ~PrintHostMsg_SetOptionsFromDocument_Params() { } -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h -index fd39591..fbeea6d 100644 +index f9b1daf905f2..971b92bccfdc 100644 --- components/printing/common/print_messages.h +++ components/printing/common/print_messages.h -@@ -74,7 +74,6 @@ struct PrintMsg_PrintPages_Params { +@@ -76,7 +76,6 @@ struct PrintMsg_PrintPages_Params { std::vector pages; }; @@ -89,7 +89,7 @@ index fd39591..fbeea6d 100644 struct PrintHostMsg_RequestPrintPreview_Params { PrintHostMsg_RequestPrintPreview_Params(); ~PrintHostMsg_RequestPrintPreview_Params(); -@@ -93,7 +92,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params { +@@ -95,7 +94,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params { printing::DuplexMode duplex; printing::PageRanges page_ranges; }; @@ -97,7 +97,7 @@ index fd39591..fbeea6d 100644 #endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ -@@ -173,7 +171,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange) +@@ -180,7 +178,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange) IPC_STRUCT_TRAITS_MEMBER(to) IPC_STRUCT_TRAITS_END() @@ -105,7 +105,7 @@ index fd39591..fbeea6d 100644 IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params) IPC_STRUCT_TRAITS_MEMBER(is_modifiable) IPC_STRUCT_TRAITS_MEMBER(webnode_only) -@@ -194,7 +191,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params) +@@ -201,7 +198,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params) // Specifies page range to be printed. IPC_STRUCT_TRAITS_MEMBER(page_ranges) IPC_STRUCT_TRAITS_END() @@ -113,7 +113,7 @@ index fd39591..fbeea6d 100644 IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) IPC_STRUCT_TRAITS_MEMBER(content_width) -@@ -214,7 +210,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params) +@@ -221,7 +217,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params) IPC_STRUCT_TRAITS_MEMBER(pages) IPC_STRUCT_TRAITS_END() @@ -121,7 +121,7 @@ index fd39591..fbeea6d 100644 // Parameters to describe a rendered document. IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params) // A shared memory handle to metafile data. -@@ -265,7 +260,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params) +@@ -272,7 +267,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params) // Indicates whether the existing preview data needs to be cleared or not. IPC_STRUCT_MEMBER(bool, clear_preview_data) IPC_STRUCT_END() @@ -129,7 +129,7 @@ index fd39591..fbeea6d 100644 // Parameters to describe a rendered page. IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params) -@@ -308,22 +302,20 @@ IPC_STRUCT_END() +@@ -315,22 +309,20 @@ IPC_STRUCT_END() // Messages sent from the browser to the renderer. @@ -154,7 +154,7 @@ index fd39591..fbeea6d 100644 #if BUILDFLAG(ENABLE_BASIC_PRINTING) // Tells the RenderFrame to switch the CSS to print media type, renders every -@@ -341,13 +333,11 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, +@@ -348,13 +340,11 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, // Tells the RenderFrame whether printing is enabled or not. IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */) @@ -168,7 +168,7 @@ index fd39591..fbeea6d 100644 // Messages sent from the renderer to the browser. -@@ -404,7 +394,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten, +@@ -411,7 +401,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten, int /* page count */) #endif // defined(OS_ANDROID) @@ -176,7 +176,7 @@ index fd39591..fbeea6d 100644 // Asks the browser to do print preview. IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, PrintHostMsg_RequestPrintPreview_Params /* params */) -@@ -438,7 +427,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel, +@@ -445,7 +434,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel, // The memory handle in this message is already valid in the browser process. IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting, PrintHostMsg_DidPreviewDocument_Params /* params */) @@ -184,7 +184,7 @@ index fd39591..fbeea6d 100644 // This is sent when there are invalid printer settings. IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) -@@ -447,7 +435,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) +@@ -454,7 +442,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, int /* document cookie */) @@ -192,15 +192,15 @@ index fd39591..fbeea6d 100644 // Tell the browser print preview failed. IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, int /* document cookie */) -@@ -474,4 +461,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, +@@ -481,4 +468,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, // Notify the browser to set print presets based on source PDF document. IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, PrintHostMsg_SetOptionsFromDocument_Params /* params */) -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) -diff --git components/printing/renderer/print_web_view_helper.cc components/printing/renderer/print_web_view_helper.cc -index 3c9dfc0..e6a3236 100644 ---- components/printing/renderer/print_web_view_helper.cc -+++ components/printing/renderer/print_web_view_helper.cc +diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc +index 18469953e9f0..bb94f44e58b0 100644 +--- components/printing/renderer/print_render_frame_helper.cc ++++ components/printing/renderer/print_render_frame_helper.cc @@ -320,7 +320,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, return plugin && plugin->SupportsPaginatedPrint(); } @@ -217,7 +217,7 @@ index 3c9dfc0..e6a3236 100644 #if BUILDFLAG(ENABLE_PRINTING) // Disable scaling when either: -@@ -398,7 +396,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, +@@ -399,7 +397,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, } #endif @@ -233,7 +233,7 @@ index 3c9dfc0..e6a3236 100644 // Helper function to scale and round an integer value with a double valued // scaling. -@@ -938,6 +934,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderFrame* render_frame, +@@ -977,6 +973,7 @@ PrintRenderFrameHelper::PrintRenderFrameHelper( print_for_preview_(false), delegate_(std::move(delegate)), print_node_in_progress_(false), @@ -241,7 +241,7 @@ index 3c9dfc0..e6a3236 100644 is_loading_(false), is_scripted_preview_delayed_(false), ipc_nesting_level_(0), -@@ -1000,10 +997,8 @@ void PrintWebViewHelper::ScriptedPrint(bool user_initiated) { +@@ -1038,10 +1035,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { return; if (g_is_preview_enabled) { @@ -252,7 +252,7 @@ index 3c9dfc0..e6a3236 100644 } else { #if BUILDFLAG(ENABLE_BASIC_PRINTING) Print(web_frame, blink::WebNode(), true /* is_scripted? */); -@@ -1029,14 +1024,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) { +@@ -1067,14 +1062,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages) IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog) #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) @@ -267,65 +267,65 @@ index 3c9dfc0..e6a3236 100644 IPC_MESSAGE_HANDLER(PrintMsg_SetPrintingEnabled, OnSetPrintingEnabled) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() -@@ -1084,7 +1075,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() { +@@ -1122,7 +1113,6 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() { } #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) -#if BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) - void PrintWebViewHelper::OnPrintForPrintPreview( + void PrintRenderFrameHelper::OnPrintForPrintPreview( const base::DictionaryValue& job_settings) { CHECK_LE(ipc_nesting_level_, 1); -@@ -1144,7 +1134,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview( +@@ -1182,7 +1172,6 @@ void PrintRenderFrameHelper::OnPrintForPrintPreview( DidFinishPrinting(FAIL_PRINT); } } -#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) - void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout( + void PrintRenderFrameHelper::GetPageSizeAndContentAreaFromPageLayout( const PageSizeMargins& page_layout_in_points, -@@ -1169,7 +1158,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo( +@@ -1207,7 +1196,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( ignore_css_margins_ = (margins_type != DEFAULT_MARGINS); } -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) - void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) { + void PrintRenderFrameHelper::OnPrintPreview( + const base::DictionaryValue& settings) { if (ipc_nesting_level_ > 1) - return; -@@ -1361,7 +1349,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() { +@@ -1399,7 +1387,7 @@ bool PrintRenderFrameHelper::CreatePreviewDocument() { return true; } -#if !defined(OS_MACOSX) && BUILDFLAG(ENABLE_PRINT_PREVIEW) +#if !defined(OS_MACOSX) - bool PrintWebViewHelper::RenderPreviewPage( + bool PrintRenderFrameHelper::RenderPreviewPage( int page_number, const PrintMsg_Print_Params& print_params) { -@@ -1390,7 +1378,7 @@ bool PrintWebViewHelper::RenderPreviewPage( +@@ -1429,7 +1417,7 @@ bool PrintRenderFrameHelper::RenderPreviewPage( } return PreviewPageRendered(page_number, draft_metafile.get()); } -#endif // !defined(OS_MACOSX) && BUILDFLAG(ENABLE_PRINT_PREVIEW) +#endif // !defined(OS_MACOSX) - bool PrintWebViewHelper::FinalizePrintReadyDocument() { + bool PrintRenderFrameHelper::FinalizePrintReadyDocument() { DCHECK(!is_print_ready_metafile_sent_); -@@ -1420,7 +1408,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() { +@@ -1458,7 +1446,6 @@ bool PrintRenderFrameHelper::FinalizePrintReadyDocument() { Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params)); return true; } -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) - void PrintWebViewHelper::OnPrintingDone(bool success) { + void PrintRenderFrameHelper::OnPrintingDone(bool success) { if (ipc_nesting_level_ > 1) -@@ -1435,7 +1422,6 @@ void PrintWebViewHelper::OnSetPrintingEnabled(bool enabled) { +@@ -1473,7 +1460,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { is_printing_enabled_ = enabled; } -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) - void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) { + void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { if (ipc_nesting_level_ > 1) return; -@@ -1446,7 +1432,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1484,7 +1470,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { // that instead. auto plugin = delegate_->GetPdfElement(frame); if (!plugin.IsNull()) { @@ -335,15 +335,15 @@ index 3c9dfc0..e6a3236 100644 return; } print_preview_context_.InitWithFrame(frame); -@@ -1454,7 +1442,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1492,7 +1480,6 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { ? PRINT_PREVIEW_USER_INITIATED_SELECTION : PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME); } -#endif - bool PrintWebViewHelper::IsPrintingEnabled() const { + bool PrintRenderFrameHelper::IsPrintingEnabled() const { return is_printing_enabled_; -@@ -1476,11 +1463,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) { +@@ -1514,11 +1501,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { print_node_in_progress_ = true; @@ -356,7 +356,7 @@ index 3c9dfc0..e6a3236 100644 } else { #if BUILDFLAG(ENABLE_BASIC_PRINTING) // Make a copy of the node, in case RenderView::OnContextMenuClosed() resets -@@ -1570,7 +1555,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) { +@@ -1608,7 +1593,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { } break; @@ -364,7 +364,7 @@ index 3c9dfc0..e6a3236 100644 case FAIL_PREVIEW: if (!is_print_ready_metafile_sent_) { if (notify_browser_of_print_failure_) { -@@ -1587,7 +1571,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) { +@@ -1625,7 +1609,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { cookie)); print_preview_context_.Failed(false); break; @@ -372,43 +372,43 @@ index 3c9dfc0..e6a3236 100644 } prep_frame_view_.reset(); print_pages_params_.reset(); -@@ -1720,7 +1703,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, +@@ -1757,7 +1740,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, return true; } -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) - bool PrintWebViewHelper::SetOptionsFromPdfDocument( + bool PrintRenderFrameHelper::SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options) { blink::WebLocalFrame* source_frame = print_preview_context_.source_frame(); -@@ -1827,7 +1809,6 @@ bool PrintWebViewHelper::UpdatePrintSettings( +@@ -1864,7 +1846,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS); return false; } -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) #if BUILDFLAG(ENABLE_BASIC_PRINTING) - void PrintWebViewHelper::GetPrintSettingsFromUser( -@@ -1985,7 +1966,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem( + void PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2023,7 +2004,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToSharedMem( return true; } -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) - void PrintWebViewHelper::ShowScriptedPrintPreview() { + void PrintRenderFrameHelper::ShowScriptedPrintPreview() { if (is_scripted_preview_delayed_) { is_scripted_preview_delayed_ = false; -@@ -2116,7 +2096,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number, +@@ -2154,7 +2134,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(int page_number, Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params)); return true; } -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) - PrintWebViewHelper::PrintPreviewContext::PrintPreviewContext() + PrintRenderFrameHelper::PrintPreviewContext::PrintPreviewContext() : total_page_count_(0), -diff --git components/printing/renderer/print_web_view_helper.h components/printing/renderer/print_web_view_helper.h -index fc5e964..ed384ba 100644 ---- components/printing/renderer/print_web_view_helper.h -+++ components/printing/renderer/print_web_view_helper.h -@@ -152,10 +152,8 @@ class PrintWebViewHelper +diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h +index 6a52cd8bb78e..d5ca1ceb264d 100644 +--- components/printing/renderer/print_render_frame_helper.h ++++ components/printing/renderer/print_render_frame_helper.h +@@ -156,10 +156,8 @@ class PrintRenderFrameHelper OK, FAIL_PRINT_INIT, FAIL_PRINT, @@ -419,7 +419,7 @@ index fc5e964..ed384ba 100644 }; enum PrintPreviewErrorBuckets { -@@ -191,10 +189,8 @@ class PrintWebViewHelper +@@ -196,10 +194,8 @@ class PrintRenderFrameHelper void OnPrintForSystemDialog(); void OnPrintForPrintPreview(const base::DictionaryValue& job_settings); #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) @@ -430,7 +430,7 @@ index fc5e964..ed384ba 100644 void OnPrintingDone(bool success); // Get |page_size| and |content_area| information from -@@ -207,7 +203,6 @@ class PrintWebViewHelper +@@ -212,7 +208,6 @@ class PrintRenderFrameHelper // Update |ignore_css_margins_| based on settings. void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings); @@ -438,7 +438,7 @@ index fc5e964..ed384ba 100644 // Prepare frame for creating preview document. void PrepareFrameForPreviewDocument(); -@@ -224,7 +219,6 @@ class PrintWebViewHelper +@@ -229,7 +224,6 @@ class PrintRenderFrameHelper // Finalize the print ready preview document. bool FinalizePrintReadyDocument(); @@ -446,7 +446,7 @@ index fc5e964..ed384ba 100644 // Enable/Disable printing. void OnSetPrintingEnabled(bool enabled); -@@ -254,7 +248,6 @@ class PrintWebViewHelper +@@ -259,7 +253,6 @@ class PrintRenderFrameHelper const blink::WebNode& node, int* number_of_pages); @@ -454,7 +454,7 @@ index fc5e964..ed384ba 100644 // Set options for print preset from source PDF document. bool SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options); -@@ -265,7 +258,6 @@ class PrintWebViewHelper +@@ -270,7 +263,6 @@ class PrintRenderFrameHelper bool UpdatePrintSettings(blink::WebLocalFrame* frame, const blink::WebNode& node, const base::DictionaryValue& passed_job_settings); @@ -462,7 +462,7 @@ index fc5e964..ed384ba 100644 #if BUILDFLAG(ENABLE_BASIC_PRINTING) // Get final print settings from the user. -@@ -367,7 +359,6 @@ class PrintWebViewHelper +@@ -374,7 +366,6 @@ class PrintRenderFrameHelper bool IsScriptInitiatedPrintAllowed(blink::WebLocalFrame* frame, bool user_initiated); @@ -470,7 +470,7 @@ index fc5e964..ed384ba 100644 // Shows scripted print preview when options from plugin are available. void ShowScriptedPrintPreview(); -@@ -385,7 +376,6 @@ class PrintWebViewHelper +@@ -392,7 +383,6 @@ class PrintRenderFrameHelper // |metafile| is the rendered page. Otherwise |metafile| is NULL. // Returns true if print preview should continue, false on failure. bool PreviewPageRendered(int page_number, PdfMetafileSkia* metafile); @@ -478,7 +478,7 @@ index fc5e964..ed384ba 100644 void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings); -@@ -545,6 +535,7 @@ class PrintWebViewHelper +@@ -553,6 +543,7 @@ class PrintRenderFrameHelper ScriptingThrottler scripting_throttler_; bool print_node_in_progress_; @@ -486,23 +486,23 @@ index fc5e964..ed384ba 100644 PrintPreviewContext print_preview_context_; bool is_loading_; bool is_scripted_preview_delayed_; -diff --git components/printing/renderer/print_web_view_helper_mac.mm components/printing/renderer/print_web_view_helper_mac.mm -index a00cfa0..4608dc0 100644 ---- components/printing/renderer/print_web_view_helper_mac.mm -+++ components/printing/renderer/print_web_view_helper_mac.mm -@@ -76,7 +76,6 @@ void PrintWebViewHelper::PrintPagesInternal( +diff --git components/printing/renderer/print_render_frame_helper_mac.mm components/printing/renderer/print_render_frame_helper_mac.mm +index 42149955ee2c..ca6cb42ffce1 100644 +--- components/printing/renderer/print_render_frame_helper_mac.mm ++++ components/printing/renderer/print_render_frame_helper_mac.mm +@@ -76,7 +76,6 @@ void PrintRenderFrameHelper::PrintPagesInternal( } } -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) - bool PrintWebViewHelper::RenderPreviewPage( + bool PrintRenderFrameHelper::RenderPreviewPage( int page_number, const PrintMsg_Print_Params& print_params) { -@@ -115,7 +114,6 @@ bool PrintWebViewHelper::RenderPreviewPage( +@@ -115,7 +114,6 @@ bool PrintRenderFrameHelper::RenderPreviewPage( } return PreviewPageRendered(page_number, draft_metafile.get()); } -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) - void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params, - int page_number, + void PrintRenderFrameHelper::RenderPage(const PrintMsg_Print_Params& params, + int page_number, diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index b523cfcc5..e9ded1026 100644 --- a/patch/patches/printing_context_2196.patch +++ b/patch/patches/printing_context_2196.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc -index 5616013..6d3737d 100644 +index a884d985f16f..2d4df5e9b13a 100644 --- chrome/browser/printing/print_job_worker.cc +++ chrome/browser/printing/print_job_worker.cc @@ -125,6 +125,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, @@ -11,7 +11,7 @@ index 5616013..6d3737d 100644 PrintJobWorker::~PrintJobWorker() { diff --git printing/printing_context.h printing/printing_context.h -index 7054654..ed5b664 100644 +index 7054654260a7..ed5b664f86a7 100644 --- printing/printing_context.h +++ printing/printing_context.h @@ -127,6 +127,13 @@ class PRINTING_EXPORT PrintingContext { diff --git a/patch/patches/render_view_host_impl_1392.patch b/patch/patches/render_view_host_impl_1392.patch index 7d0ab466c..ca10fff74 100644 --- a/patch/patches/render_view_host_impl_1392.patch +++ b/patch/patches/render_view_host_impl_1392.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_view_host_impl.h content/browser/renderer_host/render_view_host_impl.h -index 7e0cc57..66916d4 100644 +index d9667c321aab..1cee78df71d3 100644 --- content/browser/renderer_host/render_view_host_impl.h +++ content/browser/renderer_host/render_view_host_impl.h @@ -155,6 +155,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost, diff --git a/patch/patches/render_widget_latency_2060.patch b/patch/patches/render_widget_latency_2060.patch index c9682d566..220a4ab48 100644 --- a/patch/patches/render_widget_latency_2060.patch +++ b/patch/patches/render_widget_latency_2060.patch @@ -1,5 +1,5 @@ diff --git ui/latency/latency_histogram_macros.h ui/latency/latency_histogram_macros.h -index 77e3eee..f8dd635 100644 +index 77e3eeef70ba..f8dd6350c120 100644 --- ui/latency/latency_histogram_macros.h +++ ui/latency/latency_histogram_macros.h @@ -10,8 +10,7 @@ diff --git a/patch/patches/renderer_preferences_util_545103.patch b/patch/patches/renderer_preferences_util_545103.patch index 49371cbea..b942b6aad 100644 --- a/patch/patches/renderer_preferences_util_545103.patch +++ b/patch/patches/renderer_preferences_util_545103.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc -index 7296a04..c702d31 100644 +index 7296a04a56cc..c702d3178eb6 100644 --- chrome/browser/renderer_preferences_util.cc +++ chrome/browser/renderer_preferences_util.cc @@ -32,7 +32,8 @@ diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index aeffc43a8..f6558ff3a 100644 --- a/patch/patches/rwh_background_color_1984.patch +++ b/patch/patches/rwh_background_color_1984.patch @@ -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 -index 91e326b7c623..72fd49dca893 100644 +index dda1da688eb7..936fc509685c 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -422,13 +422,6 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host, @@ -16,7 +16,7 @@ index 91e326b7c623..72fd49dca893 100644 } //////////////////////////////////////////////////////////////////////////////// -@@ -740,8 +733,10 @@ void RenderWidgetHostViewAura::UpdateBackgroundColorFromRenderer( +@@ -746,8 +739,10 @@ void RenderWidgetHostViewAura::UpdateBackgroundColorFromRenderer( background_color_ = color; bool opaque = SkColorGetA(color) == SK_AlphaOPAQUE; @@ -29,7 +29,7 @@ index 91e326b7c623..72fd49dca893 100644 } bool RenderWidgetHostViewAura::IsMouseLocked() { -@@ -1915,6 +1910,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -1933,6 +1928,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { window_->Init(ui::LAYER_SOLID_COLOR); window_->layer()->SetColor(background_color_); diff --git a/patch/patches/service_factory_1680.patch b/patch/patches/service_factory_1680.patch index a7d88040a..b12af9e22 100644 --- a/patch/patches/service_factory_1680.patch +++ b/patch/patches/service_factory_1680.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/spellchecker/spellcheck_factory.cc chrome/browser/spellchecker/spellcheck_factory.cc -index a866993..520e2d9 100644 +index 9f9eb3bdd044..63988fba828d 100644 --- chrome/browser/spellchecker/spellcheck_factory.cc +++ chrome/browser/spellchecker/spellcheck_factory.cc @@ -17,6 +17,13 @@ @@ -26,7 +26,7 @@ index a866993..520e2d9 100644 SpellcheckServiceFactory::SpellcheckServiceFactory() diff --git chrome/browser/spellchecker/spellcheck_factory.h chrome/browser/spellchecker/spellcheck_factory.h -index e8eb9f7..2e1b7cf 100644 +index e8eb9f7e8aa6..2e1b7cf84081 100644 --- chrome/browser/spellchecker/spellcheck_factory.h +++ chrome/browser/spellchecker/spellcheck_factory.h @@ -7,7 +7,7 @@ @@ -48,7 +48,7 @@ index e8eb9f7..2e1b7cf 100644 SpellcheckServiceFactory(); ~SpellcheckServiceFactory() override; diff --git chrome/browser/supervised_user/supervised_user_settings_service_factory.cc chrome/browser/supervised_user/supervised_user_settings_service_factory.cc -index 173ac31..473e561 100644 +index 173ac3132161..473e56161cca 100644 --- chrome/browser/supervised_user/supervised_user_settings_service_factory.cc +++ chrome/browser/supervised_user/supervised_user_settings_service_factory.cc @@ -9,6 +9,13 @@ @@ -75,7 +75,7 @@ index 173ac31..473e561 100644 SupervisedUserSettingsServiceFactory::SupervisedUserSettingsServiceFactory() diff --git chrome/browser/supervised_user/supervised_user_settings_service_factory.h chrome/browser/supervised_user/supervised_user_settings_service_factory.h -index 2907619..f941fba 100644 +index 2907619549ba..f941fba363b5 100644 --- chrome/browser/supervised_user/supervised_user_settings_service_factory.h +++ chrome/browser/supervised_user/supervised_user_settings_service_factory.h @@ -5,7 +5,7 @@ @@ -97,7 +97,7 @@ index 2907619..f941fba 100644 SupervisedUserSettingsServiceFactory(); diff --git chrome/browser/ui/prefs/prefs_tab_helper.cc chrome/browser/ui/prefs/prefs_tab_helper.cc -index 4d4fd0e..e5bb39ad 100644 +index 4d4fd0e7a4bb..e5bb39adc24e 100644 --- chrome/browser/ui/prefs/prefs_tab_helper.cc +++ chrome/browser/ui/prefs/prefs_tab_helper.cc @@ -11,8 +11,8 @@ diff --git a/patch/patches/service_manager_654986.patch b/patch/patches/service_manager_654986.patch index 42a311dfa..d43fe1d7b 100644 --- a/patch/patches/service_manager_654986.patch +++ b/patch/patches/service_manager_654986.patch @@ -1,5 +1,5 @@ diff --git services/service_manager/embedder/main.cc services/service_manager/embedder/main.cc -index 7acf0e4..b5c0efa 100644 +index 87ac6f053947..868ff9e0c115 100644 --- services/service_manager/embedder/main.cc +++ services/service_manager/embedder/main.cc @@ -317,13 +317,30 @@ int RunService(MainDelegate* delegate) { @@ -136,7 +136,7 @@ index 7acf0e4..b5c0efa 100644 } diff --git services/service_manager/embedder/main.h services/service_manager/embedder/main.h -index e86697a..771acd8 100644 +index e86697a26d0f..771acd80a3e1 100644 --- services/service_manager/embedder/main.h +++ services/service_manager/embedder/main.h @@ -5,9 +5,15 @@ @@ -178,7 +178,7 @@ index e86697a..771acd8 100644 } // namespace service_manager diff --git services/service_manager/embedder/set_process_title.cc services/service_manager/embedder/set_process_title.cc -index 80b9a0a..5162354 100644 +index 1dc53b847ef9..5432ab02a088 100644 --- services/service_manager/embedder/set_process_title.cc +++ services/service_manager/embedder/set_process_title.cc @@ -44,7 +44,7 @@ void SetProcessTitleFromCommandLine(const char** main_argv) { diff --git a/patch/patches/storage_partition_1973.patch b/patch/patches/storage_partition_1973.patch index 149a765b7..62619d9bd 100644 --- a/patch/patches/storage_partition_1973.patch +++ b/patch/patches/storage_partition_1973.patch @@ -1,8 +1,8 @@ diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc -index e9ad038..2a10c80 100644 +index f7c812a2c9b1..d0f5c191a4f5 100644 --- content/browser/appcache/appcache_internals_ui.cc +++ content/browser/appcache/appcache_internals_ui.cc -@@ -369,8 +369,8 @@ void AppCacheInternalsUI::CreateProxyForPartition( +@@ -372,8 +372,8 @@ void AppCacheInternalsUI::CreateProxyForPartition( StoragePartition* storage_partition) { scoped_refptr proxy = new Proxy(weak_ptr_factory_.GetWeakPtr(), storage_partition->GetPath()); @@ -14,7 +14,7 @@ index e9ad038..2a10c80 100644 } diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc -index d814ea2..fa00560 100644 +index 325736ab142b..cbb25b803aa6 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc @@ -78,6 +78,11 @@ class BlobHandleImpl : public BlobHandle { @@ -30,7 +30,7 @@ index d814ea2..fa00560 100644 BrowserContext* context) { DCHECK_CURRENTLY_ON(BrowserThread::UI); diff --git content/browser/blob_storage/chrome_blob_storage_context.h content/browser/blob_storage/chrome_blob_storage_context.h -index 00b6123..aa915f3 100644 +index 00b61232c391..aa915f3130d1 100644 --- content/browser/blob_storage/chrome_blob_storage_context.h +++ content/browser/blob_storage/chrome_blob_storage_context.h @@ -47,6 +47,8 @@ class CONTENT_EXPORT ChromeBlobStorageContext @@ -43,10 +43,10 @@ index 00b6123..aa915f3 100644 static ChromeBlobStorageContext* GetFor( BrowserContext* browser_context); diff --git content/browser/bluetooth/web_bluetooth_service_impl.cc content/browser/bluetooth/web_bluetooth_service_impl.cc -index 4edb4da..8b8a8fc 100644 +index 13d802fa72cd..a2d34d1d72eb 100644 --- content/browser/bluetooth/web_bluetooth_service_impl.cc +++ content/browser/bluetooth/web_bluetooth_service_impl.cc -@@ -1232,9 +1232,9 @@ url::Origin WebBluetoothServiceImpl::GetOrigin() { +@@ -1233,9 +1233,9 @@ url::Origin WebBluetoothServiceImpl::GetOrigin() { } BluetoothAllowedDevices& WebBluetoothServiceImpl::allowed_devices() { @@ -59,7 +59,7 @@ index 4edb4da..8b8a8fc 100644 partition->GetBluetoothAllowedDevicesMap(); return allowed_devices_map->GetOrCreateAllowedDevices(GetOrigin()); diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index 1dddb59..90c05c1 100644 +index 42b002908c3b..f7d9c3933090 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc @@ -125,7 +125,14 @@ StoragePartition* GetStoragePartitionFromConfig( @@ -78,7 +78,7 @@ index 1dddb59..90c05c1 100644 } void SaveSessionStateOnIOThread( -@@ -539,6 +546,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor( +@@ -544,6 +551,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor( BrowserContext::BrowserContext() : media_device_id_salt_(CreateRandomMediaDeviceIDSalt()) {} @@ -91,10 +91,10 @@ index 1dddb59..90c05c1 100644 CHECK(GetUserData(kMojoWasInitialized)) << "Attempting to destroy a BrowserContext that never called " diff --git content/browser/devtools/protocol/service_worker_handler.cc content/browser/devtools/protocol/service_worker_handler.cc -index 9ad73e7..757af27 100644 +index c2fbb6a68dd3..8e5747a50908 100644 --- content/browser/devtools/protocol/service_worker_handler.cc +++ content/browser/devtools/protocol/service_worker_handler.cc -@@ -320,10 +320,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent( +@@ -321,10 +321,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent( if (!base::StringToInt64(registration_id, &id)) return CreateInvalidVersionIdErrorResponse(); @@ -107,11 +107,26 @@ index 9ad73e7..757af27 100644 BackgroundSyncContext* sync_context = partition->GetBackgroundSyncContext(); BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, +diff --git content/browser/download/download_manager_impl.cc content/browser/download/download_manager_impl.cc +index 4722f367c327..bd7720092bf2 100644 +--- content/browser/download/download_manager_impl.cc ++++ content/browser/download/download_manager_impl.cc +@@ -81,8 +81,8 @@ scoped_refptr GetURLLoaderFactoryGetter( + if (render_frame_host_) + site_instance = render_frame_host_->GetSiteInstance(); + } +- StoragePartitionImpl* partition = static_cast( +- BrowserContext::GetStoragePartition(context, site_instance)); ++ StoragePartition* partition = ++ BrowserContext::GetStoragePartition(context, site_instance); + return partition->url_loader_factory_getter(); + } + diff --git content/browser/loader/navigation_url_loader_network_service.cc content/browser/loader/navigation_url_loader_network_service.cc -index e925cdc..480663d 100644 +index 8a9139cc0c53..1feb90ab9d5e 100644 --- content/browser/loader/navigation_url_loader_network_service.cc +++ content/browser/loader/navigation_url_loader_network_service.cc -@@ -371,8 +371,8 @@ NavigationURLLoaderNetworkService::NavigationURLLoaderNetworkService( +@@ -469,8 +469,8 @@ NavigationURLLoaderNetworkService::NavigationURLLoaderNetworkService( DCHECK(!request_controller_); request_controller_ = base::MakeUnique( std::move(new_request), resource_context, @@ -123,22 +138,11 @@ index e925cdc..480663d 100644 BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, diff --git content/browser/payments/payment_app_provider_impl.cc content/browser/payments/payment_app_provider_impl.cc -index 6d0cdd6..57023e5 100644 +index 7b72610e288a..6c95278110d6 100644 --- content/browser/payments/payment_app_provider_impl.cc +++ content/browser/payments/payment_app_provider_impl.cc -@@ -157,8 +157,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps( - GetAllPaymentAppsCallback callback) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - -- StoragePartitionImpl* partition = static_cast( -- BrowserContext::GetDefaultStoragePartition(browser_context)); -+ StoragePartition* partition = -+ BrowserContext::GetDefaultStoragePartition(browser_context); - scoped_refptr payment_app_context = - partition->GetPaymentAppContext(); - -@@ -175,10 +175,11 @@ void PaymentAppProviderImpl::InvokePaymentApp( - const InvokePaymentAppCallback& callback) { +@@ -328,10 +328,11 @@ void StartServiceWorkerForDispatch(BrowserContext* browser_context, + ServiceWorkerStartCallback callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - StoragePartitionImpl* partition = static_cast( @@ -152,8 +156,19 @@ index 6d0cdd6..57023e5 100644 BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, +@@ -357,8 +358,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps( + GetAllPaymentAppsCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + +- StoragePartitionImpl* partition = static_cast( +- BrowserContext::GetDefaultStoragePartition(browser_context)); ++ StoragePartition* partition = ++ BrowserContext::GetDefaultStoragePartition(browser_context); + scoped_refptr payment_app_context = + partition->GetPaymentAppContext(); + diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc -index d742f69..5200a9c 100644 +index 678135b37ee9..cdbdf8248453 100644 --- content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc @@ -489,9 +489,8 @@ class SpareRenderProcessHostManager : public RenderProcessHostObserver { @@ -184,7 +199,7 @@ index d742f69..5200a9c 100644 // Is this the default storage partition? If it isn't, then just give it its // own non-shared process. -@@ -1187,7 +1185,7 @@ void RenderProcessHost::SetMaxRendererProcessCount(size_t count) { +@@ -1199,7 +1197,7 @@ void RenderProcessHost::SetMaxRendererProcessCount(size_t count) { // static RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( BrowserContext* browser_context, @@ -193,7 +208,7 @@ index d742f69..5200a9c 100644 SiteInstance* site_instance, bool is_for_guests_only) { if (g_render_process_host_factory_) { -@@ -1196,8 +1194,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( +@@ -1208,8 +1206,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( } if (!storage_partition_impl) { @@ -204,7 +219,7 @@ index d742f69..5200a9c 100644 } return new RenderProcessHostImpl(browser_context, storage_partition_impl, -@@ -1207,7 +1205,7 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( +@@ -1219,7 +1217,7 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( // static RenderProcessHost* RenderProcessHostImpl::CreateOrUseSpareRenderProcessHost( BrowserContext* browser_context, @@ -213,7 +228,7 @@ index d742f69..5200a9c 100644 SiteInstance* site_instance, bool is_for_guests_only) { RenderProcessHost* render_process_host = -@@ -1227,7 +1225,7 @@ RenderProcessHost* RenderProcessHostImpl::CreateOrUseSpareRenderProcessHost( +@@ -1239,7 +1237,7 @@ RenderProcessHost* RenderProcessHostImpl::CreateOrUseSpareRenderProcessHost( RenderProcessHostImpl::RenderProcessHostImpl( BrowserContext* browser_context, @@ -222,7 +237,7 @@ index d742f69..5200a9c 100644 bool is_for_guests_only) : fast_shutdown_started_(false), deleting_soon_(false), -@@ -1260,7 +1258,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1275,7 +1273,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( indexed_db_factory_(new IndexedDBDispatcherHost( id_, storage_partition_impl_->GetURLRequestContext(), @@ -232,7 +247,7 @@ index d742f69..5200a9c 100644 ChromeBlobStorageContext::GetFor(browser_context_))), channel_connected_(false), sent_render_process_ready_(false), -@@ -1294,7 +1293,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1309,7 +1308,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( } push_messaging_manager_.reset(new PushMessagingManager( @@ -242,7 +257,7 @@ index d742f69..5200a9c 100644 AddObserver(indexed_db_factory_.get()); #if defined(OS_MACOSX) -@@ -1500,7 +1500,7 @@ bool RenderProcessHostImpl::Init() { +@@ -1520,7 +1520,7 @@ bool RenderProcessHostImpl::Init() { } void RenderProcessHostImpl::EnableSendQueue() { @@ -251,7 +266,7 @@ index d742f69..5200a9c 100644 InitializeChannelProxy(); } -@@ -1597,6 +1597,22 @@ void RenderProcessHostImpl::ResetChannelProxy() { +@@ -1617,6 +1617,22 @@ void RenderProcessHostImpl::ResetChannelProxy() { void RenderProcessHostImpl::CreateMessageFilters() { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -274,7 +289,7 @@ index d742f69..5200a9c 100644 AddFilter(new ResourceSchedulerFilter(GetID())); MediaInternals* media_internals = MediaInternals::GetInstance(); // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages -@@ -1611,8 +1627,8 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1631,8 +1647,8 @@ void RenderProcessHostImpl::CreateMessageFilters() { new RenderMessageFilter( GetID(), GetBrowserContext(), request_context.get(), widget_helper_.get(), media_internals, @@ -285,7 +300,7 @@ index d742f69..5200a9c 100644 AddFilter(render_message_filter.get()); render_frame_message_filter_ = new RenderFrameMessageFilter( -@@ -1641,10 +1657,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1661,10 +1677,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { ChromeBlobStorageContext::GetFor(browser_context); resource_message_filter_ = new ResourceMessageFilter( @@ -298,7 +313,7 @@ index d742f69..5200a9c 100644 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); AddFilter(resource_message_filter_.get()); -@@ -1671,10 +1687,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1691,10 +1707,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter( new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service())); AddFilter(new AppCacheDispatcherHost( @@ -311,7 +326,7 @@ index d742f69..5200a9c 100644 #if BUILDFLAG(ENABLE_WEBRTC) peer_connection_tracker_host_ = new PeerConnectionTrackerHost( -@@ -1713,13 +1729,12 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1731,13 +1747,12 @@ void RenderProcessHostImpl::CreateMessageFilters() { scoped_refptr cache_storage_filter = new CacheStorageDispatcherHost(); @@ -327,7 +342,7 @@ index d742f69..5200a9c 100644 AddFilter(service_worker_filter.get()); AddFilter(new SharedWorkerMessageFilter( -@@ -1727,12 +1742,12 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1745,12 +1760,12 @@ void RenderProcessHostImpl::CreateMessageFilters() { WorkerStoragePartition( storage_partition_impl_->GetURLRequestContext(), storage_partition_impl_->GetMediaURLRequestContext(), @@ -343,7 +358,7 @@ index d742f69..5200a9c 100644 base::Bind(&RenderWidgetHelper::GetNextRoutingID, base::Unretained(widget_helper_.get())))); -@@ -1748,11 +1763,8 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1766,11 +1781,8 @@ void RenderProcessHostImpl::CreateMessageFilters() { GetID(), storage_partition_impl_->GetQuotaManager(), GetContentClient()->browser()->CreateQuotaPermissionContext())); @@ -356,7 +371,7 @@ index d742f69..5200a9c 100644 resource_context, service_worker_context, browser_context); AddFilter(notification_message_filter_.get()); -@@ -1768,6 +1780,11 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1786,6 +1798,11 @@ void RenderProcessHostImpl::CreateMessageFilters() { void RenderProcessHostImpl::RegisterMojoInterfaces() { auto registry = base::MakeUnique(); @@ -368,7 +383,7 @@ index d742f69..5200a9c 100644 channel_->AddAssociatedInterfaceForIOThread( base::Bind(&IndexedDBDispatcherHost::AddBinding, base::Unretained(indexed_db_factory_.get()))); -@@ -1818,8 +1835,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -1836,8 +1853,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { AddUIThreadInterface( registry.get(), base::Bind(&PlatformNotificationContextImpl::CreateService, @@ -378,19 +393,19 @@ index d742f69..5200a9c 100644 GetID())); AddUIThreadInterface( registry.get(), -@@ -2085,6 +2101,7 @@ void RenderProcessHostImpl::ForceReleaseWorkerRefCounts() { +@@ -2088,6 +2104,7 @@ void RenderProcessHostImpl::DisableKeepAliveRefCount() { DCHECK_CURRENTLY_ON(BrowserThread::UI); - DCHECK(!is_worker_ref_count_disabled_); - is_worker_ref_count_disabled_ = true; + DCHECK(!is_keep_alive_ref_count_disabled_); + is_keep_alive_ref_count_disabled_ = true; + browser_context_ = nullptr; - if (!GetWorkerRefCount()) + if (!keep_alive_ref_count_) return; - service_worker_ref_count_ = 0; + keep_alive_ref_count_ = 0; diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h -index ede5f06..5e205fb 100644 +index dd7df59cb5c4..3c802e969d80 100644 --- content/browser/renderer_host/render_process_host_impl.h +++ content/browser/renderer_host/render_process_host_impl.h -@@ -84,7 +84,6 @@ class ResourceMessageFilter; +@@ -87,7 +87,6 @@ class ResourceMessageFilter; class SiteInstance; class SiteInstanceImpl; class StoragePartition; @@ -398,7 +413,7 @@ index ede5f06..5e205fb 100644 typedef base::Thread* (*RendererMainThreadFactoryFunction)( const InProcessChildThreadParams& params); -@@ -123,7 +122,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -126,7 +125,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // legal). static RenderProcessHost* CreateOrUseSpareRenderProcessHost( BrowserContext* browser_context, @@ -407,7 +422,7 @@ index ede5f06..5e205fb 100644 SiteInstance* site_instance, bool is_for_guests_only); -@@ -135,7 +134,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -138,7 +137,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // null. static RenderProcessHost* CreateRenderProcessHost( BrowserContext* browser_context, @@ -416,7 +431,7 @@ index ede5f06..5e205fb 100644 SiteInstance* site_instance, bool is_for_guests_only); -@@ -402,7 +401,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -417,7 +416,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Use CreateRenderProcessHost() instead of calling this constructor // directly. RenderProcessHostImpl(BrowserContext* browser_context, @@ -425,7 +440,7 @@ index ede5f06..5e205fb 100644 bool is_for_guests_only); // Initializes a new IPC::ChannelProxy in |channel_|, which will be connected -@@ -631,10 +630,10 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -647,10 +646,10 @@ class CONTENT_EXPORT RenderProcessHostImpl // called. int instance_id_ = 1; @@ -439,10 +454,10 @@ index ede5f06..5e205fb 100644 // The observers watching our lifetime. base::ObserverList observers_; diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h -index a0df88a..d996a81 100644 +index b5902ac7f70f..8592375cc0d6 100644 --- content/browser/storage_partition_impl.h +++ content/browser/storage_partition_impl.h -@@ -113,14 +113,13 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -114,30 +114,30 @@ class CONTENT_EXPORT StoragePartitionImpl const base::Closure& callback) override; void Flush() override; void ClearBluetoothAllowedDevicesMapForTesting() override; @@ -464,14 +479,8 @@ index a0df88a..d996a81 100644 // mojom::StoragePartitionService interface. void OpenLocalStorage( -@@ -129,17 +128,20 @@ class CONTENT_EXPORT StoragePartitionImpl - - // Returns the NetworkContext associated with this storage partition. Only - // used when the network service is enabled. -- mojom::NetworkContext* network_context() { return network_context_.get(); } -+ mojom::NetworkContext* network_context() override { -+ return network_context_.get(); -+ } + const url::Origin& origin, + mojo::InterfaceRequest request) override; - scoped_refptr url_loader_factory_getter() { - return url_loader_factory_getter_; @@ -484,14 +493,15 @@ index a0df88a..d996a81 100644 + BrowserContext* browser_context() const override; // Called by each renderer process once. -- void Bind(mojo::InterfaceRequest request); -+ void Bind(mojo::InterfaceRequest request) -+ override; + void Bind(int process_id, +- mojo::InterfaceRequest request); ++ mojo::InterfaceRequest request) ++ override; struct DataDeletionHelper; struct QuotaManagedDataDeletionHelper; diff --git content/browser/streams/stream_context.cc content/browser/streams/stream_context.cc -index 22e3c06..883114d 100644 +index b23d083c7342..49d52038a049 100644 --- content/browser/streams/stream_context.cc +++ content/browser/streams/stream_context.cc @@ -22,6 +22,11 @@ namespace content { @@ -507,7 +517,7 @@ index 22e3c06..883114d 100644 if (!context->GetUserData(kStreamContextKeyName)) { scoped_refptr stream = new StreamContext(); diff --git content/browser/streams/stream_context.h content/browser/streams/stream_context.h -index 075ae3e..57fb5fd 100644 +index 075ae3e7431e..57fb5fd2c4a8 100644 --- content/browser/streams/stream_context.h +++ content/browser/streams/stream_context.h @@ -29,6 +29,7 @@ class StreamContext @@ -519,10 +529,10 @@ index 075ae3e..57fb5fd 100644 void InitializeOnIOThread(); diff --git content/browser/webui/web_ui_url_loader_factory.cc content/browser/webui/web_ui_url_loader_factory.cc -index 99bc1b3..d96d2db 100644 +index 3c49b85b0474..d15896854e9e 100644 --- content/browser/webui/web_ui_url_loader_factory.cc +++ content/browser/webui/web_ui_url_loader_factory.cc -@@ -18,13 +18,13 @@ +@@ -19,13 +19,13 @@ #include "content/browser/frame_host/render_frame_host_impl.h" #include "content/browser/histogram_internals_url_loader.h" #include "content/browser/resource_context_impl.h" @@ -537,7 +547,7 @@ index 99bc1b3..d96d2db 100644 #include "content/public/browser/web_contents.h" #include "content/public/common/network_service.mojom.h" #include "content/public/common/url_constants.h" -@@ -210,8 +210,8 @@ class WebUIURLLoaderFactory : public mojom::URLLoaderFactory, +@@ -208,8 +208,8 @@ class WebUIURLLoaderFactory : public mojom::URLLoaderFactory, public: WebUIURLLoaderFactory(FrameTreeNode* ftn) : frame_tree_node_id_(ftn->frame_tree_node_id()), @@ -548,7 +558,7 @@ index 99bc1b3..d96d2db 100644 ftn->AddObserver(this); } -@@ -282,7 +282,7 @@ class WebUIURLLoaderFactory : public mojom::URLLoaderFactory, +@@ -277,7 +277,7 @@ class WebUIURLLoaderFactory : public mojom::URLLoaderFactory, private: int frame_tree_node_id_; @@ -558,7 +568,7 @@ index 99bc1b3..d96d2db 100644 DISALLOW_COPY_AND_ASSIGN(WebUIURLLoaderFactory); diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h -index 8503ee8..8f87408 100644 +index 486eee89ef60..ee0aa05c2215 100644 --- content/public/browser/browser_context.h +++ content/public/browser/browser_context.h @@ -188,6 +188,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { @@ -570,7 +580,7 @@ index 8503ee8..8f87408 100644 ~BrowserContext() override; // Shuts down the storage partitions associated to this browser context. -@@ -269,6 +271,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { +@@ -272,6 +274,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { const base::FilePath& partition_path, bool in_memory) = 0; @@ -586,7 +596,7 @@ index 8503ee8..8f87408 100644 std::map; diff --git content/public/browser/storage_partition.h content/public/browser/storage_partition.h -index 60e5c7d..e90a494 100644 +index cf270b894186..1f95c9c3b023 100644 --- content/public/browser/storage_partition.h +++ content/public/browser/storage_partition.h @@ -13,6 +13,7 @@ @@ -618,9 +628,9 @@ index 60e5c7d..e90a494 100644 #if !defined(OS_ANDROID) class HostZoomLevelContext; -@@ -54,6 +63,11 @@ class HostZoomMap; - class ZoomLevelDelegate; - #endif // !defined(OS_ANDROID) +@@ -58,6 +67,11 @@ namespace mojom { + class NetworkContext; + } +namespace mojom { +class NetworkContext; @@ -630,7 +640,7 @@ index 60e5c7d..e90a494 100644 // Defines what persistent state a child process can access. // // The StoragePartition defines the view each child process has of the -@@ -79,6 +93,13 @@ class CONTENT_EXPORT StoragePartition { +@@ -86,6 +100,13 @@ class CONTENT_EXPORT StoragePartition { virtual ZoomLevelDelegate* GetZoomLevelDelegate() = 0; #endif // !defined(OS_ANDROID) virtual PlatformNotificationContext* GetPlatformNotificationContext() = 0; @@ -644,16 +654,16 @@ index 60e5c7d..e90a494 100644 enum : uint32_t { REMOVE_DATA_MASK_APPCACHE = 1 << 0, -@@ -184,6 +205,14 @@ class CONTENT_EXPORT StoragePartition { +@@ -191,6 +212,14 @@ class CONTENT_EXPORT StoragePartition { // Clear the bluetooth allowed devices map. For test use only. virtual void ClearBluetoothAllowedDevicesMapForTesting() = 0; -+ virtual mojom::NetworkContext* network_context() = 0; + virtual URLLoaderFactoryGetter* url_loader_factory_getter() = 0; + virtual BrowserContext* browser_context() const = 0; + + // Called by each renderer process once. + virtual void Bind( ++ int process_id, + mojo::InterfaceRequest request) = 0; + protected: diff --git a/patch/patches/supports_user_data_1710.patch b/patch/patches/supports_user_data_1710.patch index 7ac372014..ef4191f0d 100644 --- a/patch/patches/supports_user_data_1710.patch +++ b/patch/patches/supports_user_data_1710.patch @@ -1,11 +1,11 @@ diff --git base/supports_user_data.h base/supports_user_data.h -index 56522e2..b945297 100644 +index 356c97329b8d..8fce524d7572 100644 --- base/supports_user_data.h +++ base/supports_user_data.h -@@ -37,9 +37,9 @@ class BASE_EXPORT SupportsUserData { - // Multiple user data values can be stored under different keys. +@@ -38,9 +38,9 @@ class BASE_EXPORT SupportsUserData { // This object will TAKE OWNERSHIP of the given data pointer, and will // delete the object if it is changed or the object is destroyed. + // |key| must not be null--that value is too vulnerable for collision. - Data* GetUserData(const void* key) const; - void SetUserData(const void* key, std::unique_ptr data); - void RemoveUserData(const void* key); diff --git a/patch/patches/ui_dragdrop_355390.patch b/patch/patches/ui_dragdrop_355390.patch index 06d5b919d..250701691 100644 --- a/patch/patches/ui_dragdrop_355390.patch +++ b/patch/patches/ui_dragdrop_355390.patch @@ -1,5 +1,5 @@ diff --git ui/base/dragdrop/os_exchange_data_provider_aurax11.cc ui/base/dragdrop/os_exchange_data_provider_aurax11.cc -index 1a6e9a1..08eb800 100644 +index 1a6e9a1c7892..08eb8007c5f7 100644 --- ui/base/dragdrop/os_exchange_data_provider_aurax11.cc +++ ui/base/dragdrop/os_exchange_data_provider_aurax11.cc @@ -141,7 +141,8 @@ void OSExchangeDataProviderAuraX11::SetURL(const GURL& url, diff --git a/patch/patches/underlay_1051.patch b/patch/patches/underlay_1051.patch index 650ba49af..330aaa640 100644 --- a/patch/patches/underlay_1051.patch +++ b/patch/patches/underlay_1051.patch @@ -1,5 +1,5 @@ diff --git ui/base/cocoa/underlay_opengl_hosting_window.h ui/base/cocoa/underlay_opengl_hosting_window.h -index d673c31..806d134 100644 +index d673c31a0f31..806d1341567b 100644 --- ui/base/cocoa/underlay_opengl_hosting_window.h +++ ui/base/cocoa/underlay_opengl_hosting_window.h @@ -12,7 +12,7 @@ diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index a5d078355..49c451e1a 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -1,5 +1,5 @@ diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h -index 0755f27..0322b8c 100644 +index 0755f2752f1d..0322b8c638e7 100644 --- ui/base/models/menu_model.h +++ ui/base/models/menu_model.h @@ -15,6 +15,7 @@ @@ -39,10 +39,10 @@ index 0755f27..0322b8c 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index 041c9f2..4b8beb4 100644 +index f8999eb9f61c..dff78c1ca921 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc -@@ -486,6 +486,14 @@ void RenderText::SetElideBehavior(ElideBehavior elide_behavior) { +@@ -495,6 +495,14 @@ void RenderText::SetElideBehavior(ElideBehavior elide_behavior) { } } @@ -57,7 +57,7 @@ index 041c9f2..4b8beb4 100644 void RenderText::SetDisplayRect(const Rect& r) { if (r != display_rect_) { display_rect_ = r; -@@ -1386,6 +1394,19 @@ void RenderText::OnTextAttributeChanged() { +@@ -1395,6 +1403,19 @@ void RenderText::OnTextAttributeChanged() { if (!multiline_ && replace_newline_chars_with_symbols_) base::ReplaceChars(layout_text_, kNewline, kNewlineSymbol, &layout_text_); @@ -78,10 +78,10 @@ index 041c9f2..4b8beb4 100644 } diff --git ui/gfx/render_text.h ui/gfx/render_text.h -index 24ea3d4..4554f12 100644 +index 024c73ed1ac3..29ad09f7c2f0 100644 --- ui/gfx/render_text.h +++ ui/gfx/render_text.h -@@ -275,6 +275,10 @@ class GFX_EXPORT RenderText { +@@ -276,6 +276,10 @@ class GFX_EXPORT RenderText { void SetElideBehavior(ElideBehavior elide_behavior); ElideBehavior elide_behavior() const { return elide_behavior_; } @@ -92,7 +92,7 @@ index 24ea3d4..4554f12 100644 const Rect& display_rect() const { return display_rect_; } void SetDisplayRect(const Rect& r); -@@ -827,6 +831,8 @@ class GFX_EXPORT RenderText { +@@ -828,6 +832,8 @@ class GFX_EXPORT RenderText { // The ratio of strike-through line thickness to text height. SkScalar strike_thickness_factor_; @@ -102,7 +102,7 @@ index 24ea3d4..4554f12 100644 }; diff --git ui/views/animation/ink_drop_host_view.h ui/views/animation/ink_drop_host_view.h -index 8ac475f..ec58c2b 100644 +index 8ac475fa752c..ec58c2b28441 100644 --- ui/views/animation/ink_drop_host_view.h +++ ui/views/animation/ink_drop_host_view.h @@ -67,6 +67,8 @@ class VIEWS_EXPORT InkDropHostView : public View, public InkDropHost { @@ -115,7 +115,7 @@ index 8ac475f..ec58c2b 100644 static constexpr int kInkDropSmallCornerRadius = 2; static constexpr int kInkDropLargeCornerRadius = 4; diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index 1d9e7b8..671d578 100644 +index 68be16e39a1d..8038f932444d 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc @@ -188,6 +188,7 @@ gfx::Size LabelButton::CalculatePreferredSize() const { @@ -140,10 +140,10 @@ index 1d9e7b8..671d578 100644 const gfx::Size previous_image_size(image_->GetPreferredSize()); UpdateImage(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index 0fb0337..38397cd 100644 +index bc5190a4bc76..053cb7ce900b 100644 --- ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h -@@ -106,6 +106,9 @@ class VIEWS_EXPORT LabelButton : public CustomButton, +@@ -105,6 +105,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { std::unique_ptr CreateInkDropRipple() const override; std::unique_ptr CreateInkDropHighlight() const override; @@ -154,7 +154,7 @@ index 0fb0337..38397cd 100644 ImageView* image() const { return image_; } Label* label() const; diff --git ui/views/controls/button/menu_button.cc ui/views/controls/button/menu_button.cc -index 0e4194e..736e2c3 100644 +index 8a823199304a..c1c6d3d8972d 100644 --- ui/views/controls/button/menu_button.cc +++ ui/views/controls/button/menu_button.cc @@ -186,7 +186,7 @@ bool MenuButton::IsTriggerableEventType(const ui::Event& event) { @@ -187,7 +187,7 @@ index 0e4194e..736e2c3 100644 + } // namespace views diff --git ui/views/controls/button/menu_button.h ui/views/controls/button/menu_button.h -index 9adbee9..1b5151a 100644 +index e38200b8a43a..f40b079f82ec 100644 --- ui/views/controls/button/menu_button.h +++ ui/views/controls/button/menu_button.h @@ -57,6 +57,9 @@ class VIEWS_EXPORT MenuButton : public LabelButton { @@ -211,7 +211,7 @@ index 9adbee9..1b5151a 100644 // The time is used for simulating menu behavior for the menu button; that // is, if the menu is shown and the button is pressed, we need to close the diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index 05c9338..3d64177 100644 +index 16aec515d729..a75ddb9802bb 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc @@ -26,6 +26,7 @@ @@ -243,7 +243,7 @@ index 05c9338..3d64177 100644 } // namespace const char Label::kViewClassName[] = "Label"; -@@ -219,6 +234,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { +@@ -227,6 +242,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { ResetLayout(); } @@ -259,7 +259,7 @@ index 05c9338..3d64177 100644 void Label::SetTooltipText(const base::string16& tooltip_text) { DCHECK(handles_tooltips_); tooltip_text_ = tooltip_text; -@@ -438,7 +462,19 @@ std::unique_ptr Label::CreateRenderText( +@@ -454,7 +478,19 @@ std::unique_ptr Label::CreateRenderText( render_text->SetFontList(font_list()); render_text->set_shadows(shadows()); render_text->SetCursorEnabled(false); @@ -281,10 +281,10 @@ index 05c9338..3d64177 100644 } diff --git ui/views/controls/label.h ui/views/controls/label.h -index 38eb5f3..1298fc6 100644 +index 7cae587453c0..33d15cd4bc59 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h -@@ -146,6 +146,10 @@ class VIEWS_EXPORT Label : public View, +@@ -151,6 +151,10 @@ class VIEWS_EXPORT Label : public View, void SetElideBehavior(gfx::ElideBehavior elide_behavior); gfx::ElideBehavior elide_behavior() const { return elide_behavior_; } @@ -295,7 +295,7 @@ index 38eb5f3..1298fc6 100644 // Sets the tooltip text. Default behavior for a label (single-line) is to // show the full text if it is wider than its bounds. Calling this overrides // the default behavior and lets you set a custom tooltip. To revert to -@@ -365,6 +369,7 @@ class VIEWS_EXPORT Label : public View, +@@ -371,6 +375,7 @@ class VIEWS_EXPORT Label : public View, bool collapse_when_hidden_; int fixed_width_; int max_width_; @@ -304,7 +304,7 @@ index 38eb5f3..1298fc6 100644 // TODO(ckocagil): Remove is_first_paint_text_ before crbug.com/441028 is // closed. diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index e9125d6..e0849a7 100644 +index 9c0a30130cdc..36f1e4db0ad0 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc @@ -2267,8 +2267,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( @@ -335,7 +335,7 @@ index e9125d6..e0849a7 100644 SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); else if (item->GetParentMenuItem()->GetParentMenuItem()) diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h -index 4dea63f..ef50b71 100644 +index 4dea63f9f286..ef50b710c5af 100644 --- ui/views/controls/menu/menu_delegate.h +++ ui/views/controls/menu/menu_delegate.h @@ -10,6 +10,7 @@ @@ -382,10 +382,10 @@ index 4dea63f..ef50b71 100644 virtual int GetMaxWidthForMenu(MenuItemView* menu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index 905690f..333148c 100644 +index fcf1e9aa0b74..dd4f65849feb 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -763,7 +763,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { +@@ -810,7 +810,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { // only need the background when we want it to look different, as when we're // selected. ui::NativeTheme* native_theme = GetNativeTheme(); @@ -399,7 +399,7 @@ index 905690f..333148c 100644 gfx::Rect item_bounds(0, 0, width(), height()); AdjustBoundsForRTLUI(&item_bounds); -@@ -875,6 +880,13 @@ void MenuItemView::PaintMinorText(gfx::Canvas* canvas, SkColor color) { +@@ -899,6 +904,13 @@ void MenuItemView::PaintMinorText(gfx::Canvas* canvas, SkColor color) { SkColor MenuItemView::GetTextColor(bool minor, bool render_selection, bool emphasized) const { @@ -414,7 +414,7 @@ index 905690f..333148c 100644 minor ? ui::NativeTheme::kColorId_MenuItemSubtitleColor : ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor; diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc -index 06a9d3c..c602a13 100644 +index 06a9d3cfda9b..c602a13efd6a 100644 --- ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc @@ -245,6 +245,77 @@ void MenuModelAdapter::SelectionChanged(MenuItemView* menu) { @@ -496,7 +496,7 @@ index 06a9d3c..c602a13 100644 // Look up the menu model for this menu. const std::map::const_iterator map_iterator = diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h -index 0ac493c..741769e 100644 +index 0ac493c3c6a0..741769e90eb0 100644 --- 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 { @@ -521,7 +521,7 @@ index 0ac493c..741769e 100644 void WillHideMenu(MenuItemView* menu) override; void OnMenuClosed(MenuItemView* menu) override; diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc -index 08ba198..595b375 100644 +index 08ba198141b2..595b3750c544 100644 --- ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc @@ -184,6 +184,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) @@ -537,7 +537,7 @@ index 08ba198..595b375 100644 content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition()); diff --git ui/views/test/ui_controls_factory_desktop_aurax11.cc ui/views/test/ui_controls_factory_desktop_aurax11.cc -index 534e0c4..974d82d 100644 +index 534e0c4cb41d..974d82da99cb 100644 --- ui/views/test/ui_controls_factory_desktop_aurax11.cc +++ ui/views/test/ui_controls_factory_desktop_aurax11.cc @@ -147,10 +147,6 @@ class UIControlsDesktopX11 : public UIControlsAura { @@ -552,7 +552,7 @@ index 534e0c4..974d82d 100644 // Move the cursor because EnterNotify/LeaveNotify are generated with the // current mouse position as a result of XGrabPointer() diff --git ui/views/view.h ui/views/view.h -index 7a8a7b3..e712ef7 100644 +index 33f393275cbc..67cc5d64c58d 100644 --- ui/views/view.h +++ ui/views/view.h @@ -18,6 +18,7 @@ @@ -563,7 +563,7 @@ index 7a8a7b3..e712ef7 100644 #include "build/build_config.h" #include "ui/accessibility/ax_enums.h" #include "ui/base/accelerators/accelerator.h" -@@ -117,7 +118,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, +@@ -118,7 +119,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, public ui::AcceleratorTarget, public ui::EventTarget, public ui::EventHandler, diff --git a/patch/patches/views_widget_180_1481_1565_1677_1749.patch b/patch/patches/views_widget_180_1481_1565_1677_1749.patch index e69f506b0..4fdfc191c 100644 --- a/patch/patches/views_widget_180_1481_1565_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1565_1677_1749.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index ebf64e9..f242f5f 100644 +index 69c338c37b5a..6301d3737b12 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc @@ -298,6 +298,14 @@ void RenderWidgetHostViewBase::FocusedNodeTouched( @@ -18,10 +18,10 @@ index ebf64e9..f242f5f 100644 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 -index 9a124eb..84d1c63 100644 +index faec1e5bb3bc..4331d143c5c4 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h -@@ -77,6 +77,7 @@ class BrowserAccessibilityManager; +@@ -74,6 +74,7 @@ class BrowserAccessibilityManager; class CursorManager; class RenderWidgetHostImpl; class RenderWidgetHostViewBaseObserver; @@ -29,7 +29,7 @@ index 9a124eb..84d1c63 100644 class SyntheticGestureTarget; class TextInputManager; class TouchSelectionControllerClientManager; -@@ -94,6 +95,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, +@@ -91,6 +92,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, float current_device_scale_factor() const { return current_device_scale_factor_; } @@ -39,7 +39,7 @@ index 9a124eb..84d1c63 100644 // Returns the focused RenderWidgetHost inside this |view|'s RWH. RenderWidgetHostImpl* GetFocusedWidget() const; -@@ -123,6 +127,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, +@@ -120,6 +124,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, void EndFrameSubscription() override; void FocusedNodeTouched(const gfx::Point& location_dips_screen, bool editable) override; @@ -48,7 +48,7 @@ index 9a124eb..84d1c63 100644 TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; -@@ -365,6 +371,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, +@@ -366,6 +372,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, // helps to position the full screen widget on the correct monitor. virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0; @@ -61,7 +61,7 @@ index 9a124eb..84d1c63 100644 // Sets the cursor for this view to the one associated with the specified // cursor_type. virtual void UpdateCursor(const WebCursor& cursor) = 0; -@@ -492,6 +504,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, +@@ -493,6 +505,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, WebContentsAccessibility* web_contents_accessibility_; @@ -73,7 +73,7 @@ index 9a124eb..84d1c63 100644 gfx::Rect current_display_area_; diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc -index ed267bc..514eade 100644 +index 02614b2e7eff..38c207888aba 100644 --- content/browser/renderer_host/render_widget_host_view_event_handler.cc +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc @@ -28,6 +28,10 @@ @@ -87,10 +87,11 @@ index ed267bc..514eade 100644 #if defined(OS_WIN) #include "content/browser/frame_host/render_frame_host_impl.h" #include "content/public/common/context_menu_params.h" -@@ -851,6 +855,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { +@@ -850,6 +854,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { + ::SetFocus(hwnd); } } - #endif ++#endif +#if defined(OS_LINUX) + if (host_view_->HasExternalParent() && + window_ && window_->delegate()->CanFocus()) { @@ -98,12 +99,11 @@ index ed267bc..514eade 100644 + if (host) + host->Show(); + } -+#endif + #endif // TODO(wjmaclean): can host_ ever be null? if (host_ && set_focus_on_mouse_down_or_key_event_) { - set_focus_on_mouse_down_or_key_event_ = false; diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h -index 995f917..dbbd883 100644 +index 995f917d9ebc..dbbd8833b6fe 100644 --- content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h @@ -236,6 +236,14 @@ class CONTENT_EXPORT RenderWidgetHostView { @@ -122,7 +122,7 @@ index 995f917..dbbd883 100644 // Return the accelerated widget which hosts the CALayers that draw the // content of the view in GetNativeView. This may be null. diff --git ui/views/widget/desktop_aura/desktop_screen_win.cc ui/views/widget/desktop_aura/desktop_screen_win.cc -index f772f64..7d13f9f 100644 +index f772f64d656e..7d13f9f81b6c 100644 --- ui/views/widget/desktop_aura/desktop_screen_win.cc +++ ui/views/widget/desktop_aura/desktop_screen_win.cc @@ -32,6 +32,8 @@ display::Display DesktopScreenWin::GetDisplayMatching( @@ -135,10 +135,10 @@ index f772f64..7d13f9f 100644 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 -index 4d0dfbe..7ef6ace 100644 +index c332dc7e0a58..6be166492241 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -85,6 +85,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin( +@@ -84,6 +84,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin( should_animate_window_close_(false), pending_close_(false), has_non_client_view_(false), @@ -146,7 +146,7 @@ index 4d0dfbe..7ef6ace 100644 tooltip_(NULL) { } -@@ -123,8 +124,12 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window, +@@ -122,8 +123,12 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window, native_widget_delegate_); HWND parent_hwnd = NULL; @@ -160,7 +160,7 @@ index 4d0dfbe..7ef6ace 100644 remove_standard_frame_ = params.remove_standard_frame; has_non_client_view_ = Widget::RequiresNonClientView(params.type); -@@ -831,11 +836,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -825,11 +830,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { } void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { @@ -179,10 +179,10 @@ index 4d0dfbe..7ef6ace 100644 bool DesktopWindowTreeHostWin::HandleMouseEvent(const 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 -index 3f1c7bf..2658da5 100644 +index 4ee4bb30a122..5441d5e8a2a5 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -@@ -264,6 +264,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin +@@ -265,6 +265,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin // True if the window should have the frame removed. bool remove_standard_frame_; @@ -194,7 +194,7 @@ index 3f1c7bf..2658da5 100644 // a reference. 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 -index e8a7a79..a5f4d0e 100644 +index fa2878ae0d1d..fde5a8e549be 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc @@ -152,6 +152,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( @@ -211,9 +211,9 @@ index e8a7a79..a5f4d0e 100644 modal_dialog_counter_(0), + xwindow_destroyed_(false), close_widget_factory_(this), - weak_factory_(this) { - } -@@ -201,6 +203,8 @@ std::vector DesktopWindowTreeHostX11::GetAllOpenWindows() { + weak_factory_(this) {} + +@@ -200,6 +202,8 @@ std::vector DesktopWindowTreeHostX11::GetAllOpenWindows() { } gfx::Rect DesktopWindowTreeHostX11::GetX11RootWindowBounds() const { @@ -222,7 +222,7 @@ index e8a7a79..a5f4d0e 100644 return bounds_in_pixels_; } -@@ -512,7 +516,8 @@ void DesktopWindowTreeHostX11::CloseNow() { +@@ -511,7 +515,8 @@ void DesktopWindowTreeHostX11::CloseNow() { // Actually free our native resources. if (ui::PlatformEventSource::GetInstance()) ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); @@ -232,7 +232,7 @@ index e8a7a79..a5f4d0e 100644 xwindow_ = None; desktop_native_widget_aura_->OnHostClosed(); -@@ -653,6 +658,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement( +@@ -652,6 +657,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement( } gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const { @@ -241,7 +241,7 @@ index e8a7a79..a5f4d0e 100644 return ToDIPRect(bounds_in_pixels_); } -@@ -1245,6 +1252,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels( +@@ -1247,6 +1254,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels( } gfx::Point DesktopWindowTreeHostX11::GetLocationOnScreenInPixels() const { @@ -250,7 +250,7 @@ index e8a7a79..a5f4d0e 100644 return bounds_in_pixels_.origin(); } -@@ -1335,7 +1344,6 @@ void DesktopWindowTreeHostX11::InitX11Window( +@@ -1339,7 +1348,6 @@ void DesktopWindowTreeHostX11::InitX11Window( ::Atom window_type; switch (params.type) { case Widget::InitParams::TYPE_MENU: @@ -258,7 +258,7 @@ index e8a7a79..a5f4d0e 100644 window_type = gfx::GetAtom("_NET_WM_WINDOW_TYPE_MENU"); break; case Widget::InitParams::TYPE_TOOLTIP: -@@ -1391,9 +1399,15 @@ void DesktopWindowTreeHostX11::InitX11Window( +@@ -1395,9 +1403,15 @@ void DesktopWindowTreeHostX11::InitX11Window( attribute_mask |= CWBorderPixel; swa.border_pixel = 0; @@ -275,7 +275,7 @@ index e8a7a79..a5f4d0e 100644 bounds_in_pixels_.y(), bounds_in_pixels_.width(), bounds_in_pixels_.height(), 0, // border width -@@ -1998,6 +2012,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( +@@ -2011,6 +2025,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( } break; } @@ -287,7 +287,7 @@ index e8a7a79..a5f4d0e 100644 case FocusOut: OnFocusEvent(xev->type == 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 -index cb18967..0c143d2 100644 +index b72ec26d3ed6..263c233bf0f6 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h @@ -86,6 +86,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 @@ -303,7 +303,7 @@ index cb18967..0c143d2 100644 protected: // Overridden from DesktopWindowTreeHost: void Init(aura::Window* content_window, -@@ -305,6 +311,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 +@@ -308,6 +314,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 // The bounds of |xwindow_|. gfx::Rect bounds_in_pixels_; @@ -313,7 +313,7 @@ index cb18967..0c143d2 100644 // Whenever the bounds are set, we keep the previous set of bounds around so // we can have a better chance of getting the real // |restored_bounds_in_pixels_|. Window managers tend to send a Configure -@@ -344,6 +353,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 +@@ -347,6 +356,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 // Whether we used an ARGB visual for our window. bool use_argb_visual_; @@ -324,7 +324,7 @@ index cb18967..0c143d2 100644 DesktopDragDropClientAuraX11* drag_drop_client_; std::unique_ptr x11_non_client_event_filter_; -@@ -431,6 +444,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 +@@ -434,6 +447,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 uint32_t modal_dialog_counter_; @@ -335,7 +335,7 @@ index cb18967..0c143d2 100644 base::WeakPtrFactory weak_factory_; diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 32a50e8..43191a9 100644 +index d37585c6fa39..d036db18c12d 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc @@ -130,6 +130,7 @@ Widget::InitParams::InitParams(Type type) @@ -369,7 +369,7 @@ index 32a50e8..43191a9 100644 } // This must come after SetContentsView() or it might not be able to find // the correct NativeTheme (on Linux). See http://crbug.com/384492 -@@ -1098,10 +1104,16 @@ void Widget::OnNativeWidgetDestroyed() { +@@ -1094,10 +1100,16 @@ void Widget::OnNativeWidgetDestroyed() { } gfx::Size Widget::GetMinimumSize() const { @@ -387,10 +387,10 @@ index 32a50e8..43191a9 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index 63fcb9d..7237ae6 100644 +index 6590ea90b805..814bd617df3b 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h -@@ -253,6 +253,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -254,6 +254,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // Whether the widget should be maximized or minimized. ui::WindowShowState show_state; gfx::NativeView parent; @@ -399,7 +399,7 @@ index 63fcb9d..7237ae6 100644 // 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 diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h -index bd4d8a7..998cfa0 100644 +index bd4d8a7a1de2..998cfa05ea51 100644 --- ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h @@ -187,6 +187,10 @@ class VIEWS_EXPORT WidgetDelegate { @@ -414,7 +414,7 @@ index bd4d8a7..998cfa0 100644 virtual ~WidgetDelegate() {} diff --git ui/views/widget/widget_hwnd_utils.cc ui/views/widget/widget_hwnd_utils.cc -index 163e4b5..58f594db 100644 +index 163e4b54b033..58f594db5019 100644 --- ui/views/widget/widget_hwnd_utils.cc +++ ui/views/widget/widget_hwnd_utils.cc @@ -73,7 +73,7 @@ void CalculateWindowStylesFromInitParams( @@ -427,10 +427,10 @@ index 163e4b5..58f594db 100644 if (native_widget_delegate->IsDialogBox()) { *style |= DS_MODALFRAME; diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index 559f968..f679144 100644 +index 4af7811d64d9..7f8f08900ac1 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -2650,8 +2650,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -2659,8 +2659,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, active_mouse_tracking_flags_ = 0; } else if (event.type() == ui::ET_MOUSEWHEEL) { // Reroute the mouse wheel to the window under the pointer if applicable. diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index aa83171d7..dcbc1f33a 100644 --- a/patch/patches/web_contents_1257_1565.patch +++ b/patch/patches/web_contents_1257_1565.patch @@ -1,8 +1,8 @@ diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc -index 13cb8a2..4bd3e2f 100644 +index 5b54c7614dcb..89addf197fae 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -1698,6 +1698,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1772,6 +1772,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -15,7 +15,7 @@ index 13cb8a2..4bd3e2f 100644 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -1708,6 +1714,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1782,6 +1788,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -23,7 +23,7 @@ index 13cb8a2..4bd3e2f 100644 if (browser_plugin_guest_ && !GuestMode::IsCrossProcessFrameGuest(this)) { view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(), -@@ -2272,6 +2279,15 @@ void WebContentsImpl::CreateNewWindow( +@@ -2343,6 +2350,15 @@ void WebContentsImpl::CreateNewWindow( create_params.renderer_initiated_creation = main_frame_route_id != MSG_ROUTING_NONE; @@ -39,7 +39,7 @@ index 13cb8a2..4bd3e2f 100644 WebContentsImpl* new_contents = NULL; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -2301,7 +2317,7 @@ void WebContentsImpl::CreateNewWindow( +@@ -2372,7 +2388,7 @@ void WebContentsImpl::CreateNewWindow( // 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. new_view->CreateViewForWidget( @@ -48,7 +48,7 @@ index 13cb8a2..4bd3e2f 100644 } // Save the created window associated with the route so we can show it // later. -@@ -5345,7 +5361,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { +@@ -5534,7 +5550,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( RenderViewHost* render_view_host) { RenderWidgetHostViewBase* rwh_view = @@ -58,7 +58,7 @@ index 13cb8a2..4bd3e2f 100644 // Now that the RenderView has been created, we need to tell it its size. if (rwh_view) diff --git content/public/browser/web_contents.cc content/public/browser/web_contents.cc -index fa0afb5..d677b31 100644 +index fa0afb545df9..d677b310e5ec 100644 --- content/public/browser/web_contents.cc +++ content/public/browser/web_contents.cc @@ -29,7 +29,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context, @@ -73,7 +73,7 @@ index fa0afb5..d677b31 100644 WebContents::CreateParams::CreateParams(const CreateParams& other) = default; diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index 06f8d80..4ec9757 100644 +index ddaf664254ab..ffec3b79332e 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h @@ -68,9 +68,11 @@ class PageState; @@ -100,7 +100,7 @@ index 06f8d80..4ec9757 100644 // Creates a new WebContents. diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h -index e62fe35..f5b9fe0 100644 +index 8b548ba29917..dd9bff8f3939 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -43,11 +43,13 @@ class ColorChooser; @@ -117,7 +117,7 @@ index e62fe35..f5b9fe0 100644 struct ColorSuggestion; struct ContextMenuParams; struct DropData; -@@ -331,6 +333,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -320,6 +322,14 @@ class CONTENT_EXPORT WebContentsDelegate { const std::string& partition_id, SessionStorageNamespace* session_storage_namespace); diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index 0483f06c8..1a1f7b28b 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -1,8 +1,8 @@ diff --git third_party/WebKit/Source/core/dom/DOMImplementation.cpp third_party/WebKit/Source/core/dom/DOMImplementation.cpp -index 9a2e9f7..4379c0c 100644 +index 9a7f30516021..22f1214abbe2 100644 --- third_party/WebKit/Source/core/dom/DOMImplementation.cpp +++ third_party/WebKit/Source/core/dom/DOMImplementation.cpp -@@ -241,10 +241,11 @@ Document* DOMImplementation::createDocument(const String& type, +@@ -242,10 +242,11 @@ Document* DOMImplementation::createDocument(const String& type, // For that reason, the origin must be retrieved directly from init.url(). if (init.GetFrame()->IsMainFrame()) { RefPtr origin = SecurityOrigin::Create(init.Url()); @@ -17,10 +17,10 @@ index 9a2e9f7..4379c0c 100644 .Top() .GetSecurityContext() diff --git third_party/WebKit/Source/core/frame/LocalFrame.cpp third_party/WebKit/Source/core/frame/LocalFrame.cpp -index 72aaf88..ec45bcb 100644 +index a06acdcd51ff..90ba2c860542 100644 --- third_party/WebKit/Source/core/frame/LocalFrame.cpp +++ third_party/WebKit/Source/core/frame/LocalFrame.cpp -@@ -1012,7 +1012,7 @@ ContentSettingsClient* LocalFrame::GetContentSettingsClient() { +@@ -1016,7 +1016,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { PluginData* LocalFrame::GetPluginData() const { if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) return nullptr; @@ -30,10 +30,10 @@ index 72aaf88..ec45bcb 100644 } diff --git third_party/WebKit/Source/core/page/Page.cpp third_party/WebKit/Source/core/page/Page.cpp -index 17f01a7..4a0b13b 100644 +index bdc85924f2b3..8105be8f4e5d 100644 --- third_party/WebKit/Source/core/page/Page.cpp +++ third_party/WebKit/Source/core/page/Page.cpp -@@ -118,7 +118,8 @@ Page::Page(PageClients& page_clients) +@@ -126,7 +126,8 @@ Page::Page(PageClients& page_clients) overscroll_controller_( OverscrollController::Create(GetVisualViewport(), GetChromeClient())), main_frame_(nullptr), @@ -43,7 +43,7 @@ index 17f01a7..4a0b13b 100644 editor_client_(page_clients.editor_client), spell_checker_client_(page_clients.spell_checker_client), use_counter_(page_clients.chrome_client && -@@ -292,21 +293,38 @@ void Page::RefreshPlugins() { +@@ -300,21 +301,38 @@ void Page::RefreshPlugins() { PluginData::RefreshBrowserSidePluginCache(); } @@ -91,7 +91,7 @@ index 17f01a7..4a0b13b 100644 page->NotifyPluginsChanged(); } } -@@ -653,7 +671,8 @@ DEFINE_TRACE(Page) { +@@ -661,7 +679,8 @@ DEFINE_TRACE(Page) { visitor->Trace(visual_viewport_); visitor->Trace(overscroll_controller_); visitor->Trace(main_frame_); @@ -102,7 +102,7 @@ index 17f01a7..4a0b13b 100644 visitor->Trace(use_counter_); visitor->Trace(plugins_changed_observers_); diff --git third_party/WebKit/Source/core/page/Page.h third_party/WebKit/Source/core/page/Page.h -index f854ba7..0fd317c 100644 +index 0ba364b0a934..e9b79de58841 100644 --- third_party/WebKit/Source/core/page/Page.h +++ third_party/WebKit/Source/core/page/Page.h @@ -135,7 +135,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, @@ -115,7 +115,7 @@ index f854ba7..0fd317c 100644 // Refreshes the browser-side plugin cache. static void RefreshPlugins(); -@@ -348,7 +349,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, +@@ -351,7 +352,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, // longer needed. Member main_frame_; @@ -126,7 +126,7 @@ index f854ba7..0fd317c 100644 EditorClient* const editor_client_; SpellCheckerClient* const spell_checker_client_; diff --git third_party/WebKit/Source/platform/plugins/PluginData.cpp third_party/WebKit/Source/platform/plugins/PluginData.cpp -index c4fb8d7..1d5945c 100644 +index 5eb6af5fbdd5..eac85461c7de 100644 --- third_party/WebKit/Source/platform/plugins/PluginData.cpp +++ third_party/WebKit/Source/platform/plugins/PluginData.cpp @@ -79,16 +79,18 @@ DEFINE_TRACE(PluginData) { @@ -152,7 +152,7 @@ index c4fb8d7..1d5945c 100644 for (PluginInfo* plugin_info : plugins_) { for (MimeClassInfo* mime_class_info : plugin_info->mimes_) diff --git third_party/WebKit/Source/platform/plugins/PluginData.h third_party/WebKit/Source/platform/plugins/PluginData.h -index 6cb520cd..fdcaf93 100644 +index 6cb520cd5810..fdcaf938b28a 100644 --- third_party/WebKit/Source/platform/plugins/PluginData.h +++ third_party/WebKit/Source/platform/plugins/PluginData.h @@ -93,7 +93,7 @@ class PLATFORM_EXPORT PluginData final @@ -165,10 +165,10 @@ index 6cb520cd..fdcaf93 100644 bool SupportsMimeType(const String& mime_type) const; diff --git third_party/WebKit/public/platform/Platform.h third_party/WebKit/public/platform/Platform.h -index bf92050..6f4949d 100644 +index de906059109c..baaeb09ec8f5 100644 --- third_party/WebKit/public/platform/Platform.h +++ third_party/WebKit/public/platform/Platform.h -@@ -379,6 +379,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -384,6 +384,7 @@ class BLINK_PLATFORM_EXPORT Platform { // satisfy this call. mainFrameOrigin is used by the browser process to // filter plugins from the plugin list based on content settings. virtual void GetPluginList(bool refresh, diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 1e0a48f33..0eb34bd87 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,34 +1,24 @@ -diff --git third_party/WebKit/Source/core/exported/WebViewBase.h third_party/WebKit/Source/core/exported/WebViewBase.h -index 5b6db09f..73c2260 100644 ---- third_party/WebKit/Source/core/exported/WebViewBase.h -+++ third_party/WebKit/Source/core/exported/WebViewBase.h -@@ -157,7 +157,7 @@ class WebViewBase : public WebView, public RefCounted { +diff --git third_party/WebKit/Source/core/exported/WebViewImpl.cpp third_party/WebKit/Source/core/exported/WebViewImpl.cpp +index 827581a9cb57..318e5181545a 100644 +--- third_party/WebKit/Source/core/exported/WebViewImpl.cpp ++++ third_party/WebKit/Source/core/exported/WebViewImpl.cpp +@@ -247,8 +247,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { + g_should_use_external_popup_menus = use_external_popup_menus; + } - // Returns true if popup menus should be rendered by the browser, false if - // they should be rendered by WebKit (which is the default). -- static bool UseExternalPopupMenus(); -+ virtual bool UseExternalPopupMenus() const = 0; +-bool WebViewImpl::UseExternalPopupMenus() { +- return g_should_use_external_popup_menus; ++void WebViewImpl::SetUseExternalPopupMenusThisInstance( ++ bool use_external_popup_menus) { ++ should_use_external_popup_menus_ = use_external_popup_menus; ++} ++ ++bool WebViewImpl::UseExternalPopupMenus() const { ++ return should_use_external_popup_menus_; + } - virtual GraphicsLayer* RootGraphicsLayer() = 0; - virtual void RegisterViewportLayersWithCompositor() = 0; -diff --git third_party/WebKit/Source/web/ChromeClientImpl.cpp third_party/WebKit/Source/web/ChromeClientImpl.cpp -index cf36ed93..e508f14 100644 ---- third_party/WebKit/Source/web/ChromeClientImpl.cpp -+++ third_party/WebKit/Source/web/ChromeClientImpl.cpp -@@ -781,7 +781,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, - return nullptr; - - NotifyPopupOpeningObservers(); -- if (WebViewBase::UseExternalPopupMenus()) -+ if (web_view_->UseExternalPopupMenus()) - return new ExternalPopupMenu(frame, select, *web_view_); - - DCHECK(RuntimeEnabledFeatures::PagePopupEnabled()); -diff --git third_party/WebKit/Source/web/WebViewImpl.cpp third_party/WebKit/Source/web/WebViewImpl.cpp -index f7fc7dd..7aa4f01 100644 ---- third_party/WebKit/Source/web/WebViewImpl.cpp -+++ third_party/WebKit/Source/web/WebViewImpl.cpp -@@ -320,6 +320,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, + namespace { +@@ -342,6 +347,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, enable_fake_page_scale_animation_for_testing_(false), fake_page_scale_animation_page_scale_factor_(0), fake_page_scale_animation_use_anchor_(false), @@ -36,39 +26,21 @@ index f7fc7dd..7aa4f01 100644 compositor_device_scale_factor_override_(0), suppress_next_keypress_event_(false), ime_accept_events_(true), -@@ -3644,12 +3645,13 @@ void WebViewImpl::MainFrameScrollOffsetChanged() { - dev_tools_emulator_->MainFrameScrollOrScaleChanged(); - } - --bool WebViewBase::UseExternalPopupMenus() { -- return WebViewImpl::UseExternalPopupMenus(); -+void WebViewImpl::SetUseExternalPopupMenusThisInstance( -+ bool useExternalPopupMenus) { -+ should_use_external_popup_menus_ = useExternalPopupMenus; - } - --bool WebViewImpl::UseExternalPopupMenus() { -- return g_should_use_external_popup_menus; -+bool WebViewImpl::UseExternalPopupMenus() const { -+ return should_use_external_popup_menus_; - } - - void WebViewImpl::SetBackgroundColorOverride(WebColor color) { -diff --git third_party/WebKit/Source/web/WebViewImpl.h third_party/WebKit/Source/web/WebViewImpl.h -index 5ea6e7b..5c7b4d8 100644 ---- third_party/WebKit/Source/web/WebViewImpl.h -+++ third_party/WebKit/Source/web/WebViewImpl.h -@@ -345,7 +345,8 @@ class WEB_EXPORT WebViewImpl final - +diff --git third_party/WebKit/Source/core/exported/WebViewImpl.h third_party/WebKit/Source/core/exported/WebViewImpl.h +index 7ea90b01b4c6..30e54df93efc 100644 +--- third_party/WebKit/Source/core/exported/WebViewImpl.h ++++ third_party/WebKit/Source/core/exported/WebViewImpl.h +@@ -108,7 +108,8 @@ class CORE_EXPORT WebViewImpl final + static const WebInputEvent* CurrentInputEvent(); // Returns true if popup menus should be rendered by the browser, false if // they should be rendered by WebKit (which is the default). - static bool UseExternalPopupMenus(); + void SetUseExternalPopupMenusThisInstance(bool); -+ bool UseExternalPopupMenus() const override; ++ bool UseExternalPopupMenus() const; - bool ShouldAutoResize() const override { return should_auto_resize_; } - -@@ -637,6 +638,8 @@ class WEB_EXPORT WebViewImpl final + // WebWidget methods: + void Close() override; +@@ -615,6 +616,8 @@ class CORE_EXPORT WebViewImpl final float fake_page_scale_animation_page_scale_factor_; bool fake_page_scale_animation_use_anchor_; @@ -77,8 +49,21 @@ index 5ea6e7b..5c7b4d8 100644 float compositor_device_scale_factor_override_; TransformationMatrix device_emulation_transform_; +diff --git third_party/WebKit/Source/core/page/ChromeClientImpl.cpp third_party/WebKit/Source/core/page/ChromeClientImpl.cpp +index 581b6b5b9538..14aec97bd676 100644 +--- third_party/WebKit/Source/core/page/ChromeClientImpl.cpp ++++ third_party/WebKit/Source/core/page/ChromeClientImpl.cpp +@@ -776,7 +776,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, + return nullptr; + + NotifyPopupOpeningObservers(); +- if (WebViewImpl::UseExternalPopupMenus()) ++ if (web_view_->UseExternalPopupMenus()) + return new ExternalPopupMenu(frame, select, *web_view_); + + DCHECK(RuntimeEnabledFeatures::PagePopupEnabled()); diff --git third_party/WebKit/public/web/WebView.h third_party/WebKit/public/web/WebView.h -index 1917509..536c147 100644 +index 729c1ceabb91..a11ad9e6c86e 100644 --- third_party/WebKit/public/web/WebView.h +++ third_party/WebKit/public/web/WebView.h @@ -374,6 +374,7 @@ class WebView : protected WebWidget { diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index 3284d61e2..5430343f5 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc -index c76b85d5c8f6..45663219337f 100644 +index 0442d4d191a5..9b2d2e572f1f 100644 --- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc @@ -163,6 +163,10 @@ void ChromeInternalLogSource::Fetch(const SysLogsSourceCallback& callback) { @@ -14,10 +14,10 @@ index c76b85d5c8f6..45663219337f 100644 Profile* profile = ProfileManager::GetPrimaryUserProfile(); if (!profile || diff --git chrome/browser/ui/webui/net_internals/net_internals_ui.cc chrome/browser/ui/webui/net_internals/net_internals_ui.cc -index 028eff9..2495103d 100644 +index 1c3b918736f5..a408d04f550a 100644 --- chrome/browser/ui/webui/net_internals/net_internals_ui.cc +++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc -@@ -508,41 +508,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache( +@@ -515,41 +515,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache( void NetInternalsMessageHandler::OnGetPrerenderInfo( const base::ListValue* list) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -64,7 +64,7 @@ index 028eff9..2495103d 100644 } //////////////////////////////////////////////////////////////////////////////// -@@ -622,9 +612,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( +@@ -629,9 +619,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( PrePopulateEventList(); @@ -85,7 +85,7 @@ index 028eff9..2495103d 100644 } void NetInternalsMessageHandler::IOThreadImpl::OnGetNetInfo( -@@ -1026,7 +1024,8 @@ void NetInternalsMessageHandler::IOThreadImpl::PrePopulateEventList() { +@@ -1105,7 +1103,8 @@ void NetInternalsMessageHandler::IOThreadImpl::PrePopulateEventList() { std::set contexts; for (const auto& getter : context_getters_) contexts.insert(getter->GetURLRequestContext()); @@ -96,7 +96,7 @@ index 028eff9..2495103d 100644 // Add entries for ongoing network objects. CreateNetLogEntriesForActiveObjects(contexts, this); diff --git content/browser/resource_context_impl.cc content/browser/resource_context_impl.cc -index 141a083..b16b4d6 100644 +index 141a08305332..b16b4d61988d 100644 --- content/browser/resource_context_impl.cc +++ content/browser/resource_context_impl.cc @@ -58,6 +58,10 @@ URLDataManagerBackend* GetURLDataManagerForResourceContext( @@ -111,7 +111,7 @@ index 141a083..b16b4d6 100644 ResourceContext* resource_context = browser_context->GetResourceContext(); diff --git content/browser/resource_context_impl.h content/browser/resource_context_impl.h -index 903cc54..5bd30ae 100644 +index 903cc543a242..5bd30ae82974 100644 --- content/browser/resource_context_impl.h +++ content/browser/resource_context_impl.h @@ -28,6 +28,8 @@ CONTENT_EXPORT StreamContext* GetStreamContextForResourceContext( @@ -124,23 +124,23 @@ index 903cc54..5bd30ae 100644 CONTENT_EXPORT void InitializeResourceContext(BrowserContext* browser_context); diff --git content/browser/webui/url_data_manager.cc content/browser/webui/url_data_manager.cc -index 5681ff5..7d96c24 100644 +index 5681ff549fd4..7d96c24fab2f 100644 --- content/browser/webui/url_data_manager.cc +++ content/browser/webui/url_data_manager.cc -@@ -153,6 +153,11 @@ void URLDataManager::UpdateWebUIDataSource( +@@ -152,6 +152,11 @@ void URLDataManager::UpdateWebUIDataSource( + ->UpdateWebUIDataSource(source_name, std::move(update)); } - // static ++// static +const void* URLDataManager::GetUserDataKey() { + return kURLDataManagerKeyName; +} + -+// static + // static bool URLDataManager::IsScheduledForDeletion( const URLDataSourceImpl* data_source) { - base::AutoLock lock(g_delete_lock.Get()); diff --git content/browser/webui/url_data_manager.h content/browser/webui/url_data_manager.h -index 5ceb74d..0c584d6 100644 +index 5ceb74d411fc..0c584d6e69b5 100644 --- 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 { diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index da7f89b58..5426e16bb 100644 --- a/patch/patches/webview_plugin_2020.patch +++ b/patch/patches/webview_plugin_2020.patch @@ -1,8 +1,8 @@ diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd -index 7bd88ac..7fe77b3 100644 +index 97b732500593..899c6a710344 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -5045,7 +5045,7 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -5060,7 +5060,7 @@ Keep your key file in a safe place. You will need it to create new versions of y diff --git a/patch/patches/zlib.patch b/patch/patches/zlib.patch index bd416eb0a..7fa4e87a2 100644 --- a/patch/patches/zlib.patch +++ b/patch/patches/zlib.patch @@ -1,5 +1,5 @@ diff --git third_party/zlib/contrib/minizip/unzip.c third_party/zlib/contrib/minizip/unzip.c -index 199b472..be42478 100644 +index 199b4723fcfc..be424783fece 100644 --- third_party/zlib/contrib/minizip/unzip.c +++ third_party/zlib/contrib/minizip/unzip.c @@ -69,7 +69,7 @@ diff --git a/tests/ceftests/osr_accessibility_unittest.cc b/tests/ceftests/osr_accessibility_unittest.cc index b226df808..44fc1bfe3 100644 --- a/tests/ceftests/osr_accessibility_unittest.cc +++ b/tests/ceftests/osr_accessibility_unittest.cc @@ -367,10 +367,8 @@ class AccessibilityTestHandler : public TestHandler, } EXPECT_TRUE(tip.get()); EXPECT_STREQ("tooltip", tip->GetString("role").ToString().c_str()); - // Validate tooltip color property is Red. CefRefPtr tipattr = tip->GetDictionary("attributes"); EXPECT_TRUE(tipattr.get()); - EXPECT_STREQ("0xFFFF0000", tipattr->GetString("color").ToString().c_str()); EXPECT_TRUE(editbox.get()); EXPECT_STREQ("textField", editbox->GetString("role").ToString().c_str()); diff --git a/tests/ceftests/webui_unittest.cc b/tests/ceftests/webui_unittest.cc index 48a3c1a39..ea4977a39 100644 --- a/tests/ceftests/webui_unittest.cc +++ b/tests/ceftests/webui_unittest.cc @@ -131,7 +131,7 @@ TEST(WebUITest, network_error) { // -310 is ERR_TOO_MANY_REDIRECTS url_list.push_back("chrome://network-error/-310"); CefRefPtr handler = new WebUITestHandler(url_list); - handler->set_expected_url("data:text/html,chromewebdata"); + handler->set_expected_url("chrome-error://chromewebdata/"); handler->set_expected_error_code(ERR_TOO_MANY_REDIRECTS); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); diff --git a/tools/distrib/linux/README.redistrib.txt b/tools/distrib/linux/README.redistrib.txt index d151d427e..3e6cf9f78 100644 --- a/tools/distrib/linux/README.redistrib.txt +++ b/tools/distrib/linux/README.redistrib.txt @@ -16,6 +16,7 @@ The following components are required. CEF will not function without them. * V8 snapshot data. * natives_blob.bin * snapshot_blob.bin + * v8_context_snapshot.bin Optional components: diff --git a/tools/distrib/mac/README.redistrib.txt b/tools/distrib/mac/README.redistrib.txt index 30f0407f7..ecbffc2c3 100644 --- a/tools/distrib/mac/README.redistrib.txt +++ b/tools/distrib/mac/README.redistrib.txt @@ -22,7 +22,7 @@ cefclient.app/ devtools_resources.pak <=^ crash_inspector, crash_report_sender <= breakpad support icudtl.dat <= unicode support - natives_blob.bin, snapshot_blob.bin <= V8 initial snapshot + natives_blob.bin, snapshot_blob.bin, v8_context_snapshot.bin <= V8 initial snapshot en.lproj/, ... <= locale-specific resources and strings Info.plist cefclient Helper.app/ @@ -61,6 +61,7 @@ The following components are required. CEF will not function without them. * V8 snapshot data. * Chromium Embedded Framework.framework/Resources/natives_blob.bin * Chromium Embedded Framework.framework/Resources/snapshot_blob.bin + * Chromium Embedded Framework.framework/Resources/v8_context_snapshot.bin Optional components: diff --git a/tools/distrib/win/README.redistrib.txt b/tools/distrib/win/README.redistrib.txt index 05074df65..f2a1e91f4 100644 --- a/tools/distrib/win/README.redistrib.txt +++ b/tools/distrib/win/README.redistrib.txt @@ -19,6 +19,7 @@ The following components are required. CEF will not function without them. * V8 snapshot data. * natives_blob.bin * snapshot_blob.bin + * v8_context_snapshot.bin Optional components: diff --git a/tools/make_distrib.py b/tools/make_distrib.py index 6859b10b3..f73cfaaf4 100644 --- a/tools/make_distrib.py +++ b/tools/make_distrib.py @@ -661,6 +661,7 @@ if platform == 'windows': 'libGLESv2.dll', 'natives_blob.bin', 'snapshot_blob.bin', + 'v8_context_snapshot.bin', # Should match the output path from media/cdm/ppapi/cdm_paths.gni. 'WidevineCdm\\_platform_specific\\win_%s\\widevinecdmadapter.dll' % \ ('x64' if options.x64build else 'x86'), @@ -949,6 +950,9 @@ elif platform == 'linux': os.path.join(build_dir, 'natives_blob.bin'), dst_dir, options.quiet) copy_file( os.path.join(build_dir, 'snapshot_blob.bin'), dst_dir, options.quiet) + copy_file( + os.path.join(build_dir, 'v8_context_snapshot.bin'), dst_dir, + options.quiet) else: sys.stderr.write("No Debug build files.\n") @@ -973,6 +977,9 @@ elif platform == 'linux': os.path.join(build_dir, 'natives_blob.bin'), dst_dir, options.quiet) copy_file( os.path.join(build_dir, 'snapshot_blob.bin'), dst_dir, options.quiet) + copy_file( + os.path.join(build_dir, 'v8_context_snapshot.bin'), dst_dir, + options.quiet) else: sys.stderr.write("No Release build files.\n")