diff --git a/BUILD.gn b/BUILD.gn index c70622cbe..2bd1b75b9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -425,6 +425,8 @@ static_library("libcef_static") { "libcef/browser/alloy/alloy_content_browser_client.h", "libcef/browser/audio_capturer.cc", "libcef/browser/audio_capturer.h", + "libcef/browser/audio_loopback_stream_creator.cc", + "libcef/browser/audio_loopback_stream_creator.h", "libcef/browser/browser_contents_delegate.cc", "libcef/browser/browser_contents_delegate.h", "libcef/browser/browser_context.cc", @@ -1187,6 +1189,9 @@ static_library("libcef_static") { if (use_x11) { sources += [ # Support for UI input events. + # Part of //ui/base/x:test_support which is testingonly. + "//ui/base/x/test/x11_ui_controls_test_helper.cc", + "//ui/base/x/test/x11_ui_controls_test_helper.h", # Part of //ui/aura:test_support which is testingonly. "//ui/aura/test/x11_event_sender.h", # Part of //ui/views:test_support which is testingonly. @@ -1364,6 +1369,7 @@ repack("pak_extensions") { "$root_gen_dir/extensions/extensions_renderer_resources.pak", "$root_gen_dir/extensions/extensions_resources.pak", "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak", + "$root_gen_dir/ui/resources/webui_generated_resources.pak", "$root_gen_dir/ui/resources/webui_resources.pak", ] @@ -1377,6 +1383,7 @@ repack("pak_extensions") { "//extensions:extensions_renderer_resources", "//extensions:extensions_resources_grd", "//mojo/public/js:resources", + "//ui/resources:webui_generated_resources_grd", "//ui/resources:webui_resources_grd", ] @@ -1428,10 +1435,10 @@ repack("pak") { # 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/base/tracing/protos/tracing_proto_resources.pak", "$root_gen_dir/chrome/browser_resources.pak", "$root_gen_dir/chrome/dev_ui_browser_resources.pak", "$root_gen_dir/chrome/net_internals_resources.pak", - "$root_gen_dir/chrome/print_preview_pdf_resources.pak", "$root_gen_dir/chrome/print_preview_resources.pak", "$root_gen_dir/chrome/common_resources.pak", "$root_gen_dir/components/components_resources.pak", @@ -1448,11 +1455,11 @@ repack("pak") { # the libcef_static target. Grit deps that generate .cc files must be # listed both here and in the libcef_static target. public_deps = [ + "//base/tracing/protos:chrome_track_event_resources", "//chrome/browser:dev_ui_browser_resources", "//chrome/browser:resources", "//chrome/browser/resources/net_internals:net_internals_resources", - "//chrome/browser/resources:print_preview_pdf_resources", - "//chrome/browser/resources:print_preview_resources", + "//chrome/browser/resources/print_preview:print_preview_resources", "//chrome/common:resources", "//components/resources:components_resources", "//components/resources:dev_ui_components_resources", @@ -1498,13 +1505,13 @@ template("make_pack_header") { make_pack_header("resources") { header = "$root_out_dir/includes/include/cef_pack_resources.h" inputs = [ + "$root_gen_dir/base/tracing/protos/grit/tracing_proto_resources.h", "$root_gen_dir/cef/grit/cef_resources.h", "$root_gen_dir/chrome/grit/browser_resources.h", "$root_gen_dir/chrome/grit/common_resources.h", "$root_gen_dir/chrome/grit/component_extension_resources.h", "$root_gen_dir/chrome/grit/dev_ui_browser_resources.h", "$root_gen_dir/chrome/grit/net_internals_resources.h", - "$root_gen_dir/chrome/grit/print_preview_pdf_resources.h", "$root_gen_dir/chrome/grit/print_preview_resources.h", "$root_gen_dir/chrome/grit/renderer_resources.h", "$root_gen_dir/components/grit/components_resources.h", @@ -1519,6 +1526,7 @@ make_pack_header("resources") { "$root_gen_dir/net/grit/net_resources.h", "$root_gen_dir/third_party/blink/public/resources/grit/blink_resources.h", "$root_gen_dir/ui/resources/grit/ui_resources.h", + "$root_gen_dir/ui/resources/grit/webui_generated_resources.h", "$root_gen_dir/ui/resources/grit/webui_resources.h", "$root_gen_dir/ui/views/resources/grit/views_resources.h", ] @@ -1632,7 +1640,7 @@ if (is_mac) { ] public_deps += [ "//v8" ] if (use_v8_context_snapshot) { - sources += [ "$root_out_dir/v8_context_snapshot.bin" ] + sources += [ "$root_out_dir/$v8_context_snapshot_filename" ] public_deps += [ "//tools/v8_context_snapshot" ] } } diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 517909a4c..5c7956cd1 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'refs/tags/87.0.4280.0' + 'chromium_checkout': 'refs/tags/88.0.4324.0' } diff --git a/CMakeLists.txt.in b/CMakeLists.txt.in index 51aa74554..1b13a894f 100644 --- a/CMakeLists.txt.in +++ b/CMakeLists.txt.in @@ -48,7 +48,7 @@ # libgtkglext1-dev (required by the cefclient target only) # # - MacOS requirements: -# Xcode 8 or newer building on MacOS 10.10 (Yosemite) or newer. Xcode 11.2 +# Xcode 8 or newer building on MacOS 10.11 (El Capitan) or newer. Xcode 11.2 # and MacOS 10.14 are recommended. The Xcode command-line tools must also be # installed. Only 64-bit builds are supported. # diff --git a/cef_paths2.gypi b/cef_paths2.gypi index 10e5a696a..ebdbd5836 100644 --- a/cef_paths2.gypi +++ b/cef_paths2.gypi @@ -13,7 +13,6 @@ 'include/base/cef_build.h', 'include/base/cef_callback.h', 'include/base/cef_callback_forward.h', - 'include/base/cef_callback_helpers.h', 'include/base/cef_callback_list.h', 'include/base/cef_cancelable_callback.h', 'include/base/cef_lock.h', @@ -124,7 +123,6 @@ 'libcef_dll_wrapper_sources_base': [ 'libcef_dll/base/cef_atomicops_x86_gcc.cc', 'libcef_dll/base/cef_bind_helpers.cc', - 'libcef_dll/base/cef_callback_helpers.cc', 'libcef_dll/base/cef_callback_internal.cc', 'libcef_dll/base/cef_lock.cc', 'libcef_dll/base/cef_lock_impl.cc', diff --git a/cmake/cef_variables.cmake.in b/cmake/cef_variables.cmake.in index 6ce498210..9fc6ab4b1 100644 --- a/cmake/cef_variables.cmake.in +++ b/cmake/cef_variables.cmake.in @@ -311,7 +311,7 @@ if(OS_MAC) # Find the newest available base SDK. execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) - foreach(OS_VERSION 10.15 10.14 10.13 10.12 10.11 10.10) + foreach(OS_VERSION 10.15 10.14 10.13 10.12 10.11) set(SDK "${XCODE_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OS_VERSION}.sdk") if(NOT "${CMAKE_OSX_SYSROOT}" AND EXISTS "${SDK}" AND IS_DIRECTORY "${SDK}") set(CMAKE_OSX_SYSROOT ${SDK}) @@ -319,7 +319,7 @@ if(OS_MAC) endforeach() # Target SDK. - set(CEF_TARGET_SDK "10.10") + set(CEF_TARGET_SDK "10.11") list(APPEND CEF_COMPILER_FLAGS -mmacosx-version-min=${CEF_TARGET_SDK} ) diff --git a/include/base/cef_callback_helpers.h b/include/base/cef_callback_helpers.h deleted file mode 100644 index ebe074a1f..000000000 --- a/include/base/cef_callback_helpers.h +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This defines helpful methods for dealing with Callbacks. Because Callbacks -// are implemented using templates, with a class per callback signature, adding -// methods to Callback<> itself is unattractive (lots of extra code gets -// generated). Instead, consider adding methods here. -// -// ResetAndReturn(&cb) is like cb.Reset() but allows executing a callback (via a -// copy) after the original callback is Reset(). This can be handy if Run() -// reads/writes the variable holding the Callback. - -#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_ -#define CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_ -#pragma once - -#if defined(BASE_CALLBACK_HELPERS_H_) -// Do nothing if the Chromium header has already been included. -// This can happen in cases where Chromium code is used directly by the -// client application. When using Chromium code directly always include -// the Chromium header first to avoid type conflicts. -#elif defined(USING_CHROMIUM_INCLUDES) -// When building CEF include the Chromium header directly. -#include "base/callback_helpers.h" -#else // !USING_CHROMIUM_INCLUDES -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/cef_basictypes.h" -#include "include/base/cef_build.h" -#include "include/base/cef_callback.h" -#include "include/base/cef_macros.h" - -namespace base { - -template -base::Callback ResetAndReturn(base::Callback* cb) { - base::Callback ret(*cb); - cb->Reset(); - return ret; -} - -// ScopedClosureRunner is akin to scoped_ptr for Closures. It ensures that the -// Closure is executed and deleted no matter how the current scope exits. -class ScopedClosureRunner { - public: - ScopedClosureRunner(); - explicit ScopedClosureRunner(const Closure& closure); - ~ScopedClosureRunner(); - - void Reset(); - void Reset(const Closure& closure); - Closure Release() WARN_UNUSED_RESULT; - - private: - Closure closure_; - - DISALLOW_COPY_AND_ASSIGN(ScopedClosureRunner); -}; - -} // namespace base - -#endif // !USING_CHROMIUM_INCLUDES - -#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_ diff --git a/include/base/cef_logging.h b/include/base/cef_logging.h index 58da121fe..0a8006bc5 100644 --- a/include/base/cef_logging.h +++ b/include/base/cef_logging.h @@ -554,12 +554,7 @@ const LogSeverity LOG_DCHECK = LOG_INFO; #define DCHECK_GE(val1, val2) DCHECK_OP(GE, >=, val1, val2) #define DCHECK_GT(val1, val2) DCHECK_OP(GT, >, val1, val2) -#if defined(NDEBUG) && defined(OS_CHROMEOS) -#define NOTREACHED() \ - LOG(ERROR) << "NOTREACHED() hit in " << __FUNCTION__ << ". " -#else #define NOTREACHED() DCHECK(false) -#endif // Redefine the standard assert to use our nice log files #undef assert diff --git a/include/capi/cef_web_plugin_capi.h b/include/capi/cef_web_plugin_capi.h index 6cef95737..5006b4ebe 100644 --- a/include/capi/cef_web_plugin_capi.h +++ b/include/capi/cef_web_plugin_capi.h @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=f1b2b6203d45fdf76d72ea1e79fcef0bb2a26138$ +// $hash=864f1dc749e0c3f80b7f50250b21beaad37f3ef4$ // #ifndef CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_ @@ -58,7 +58,7 @@ typedef struct _cef_web_plugin_info_t { cef_base_ref_counted_t base; /// - // Returns the plugin name (i.e. Flash). + // Returns the plugin name. /// // The resulting string must be freed by calling cef_string_userfree_free(). cef_string_userfree_t(CEF_CALLBACK* get_name)( diff --git a/include/cef_web_plugin.h b/include/cef_web_plugin.h index 118788bc5..1e6bc032d 100644 --- a/include/cef_web_plugin.h +++ b/include/cef_web_plugin.h @@ -48,7 +48,7 @@ class CefBrowser; class CefWebPluginInfo : public virtual CefBaseRefCounted { public: /// - // Returns the plugin name (i.e. Flash). + // Returns the plugin name. /// /*--cef()--*/ virtual CefString GetName() = 0; diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index 94a6cf736..f00b9b5ca 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -1670,7 +1670,7 @@ typedef enum { MENU_ID_ADD_TO_DICTIONARY = 206, // Custom menu items originating from the renderer process. For example, - // plugin placeholder menu items or Flash menu items. + // plugin placeholder menu items. MENU_ID_CUSTOM_FIRST = 220, MENU_ID_CUSTOM_LAST = 250, diff --git a/libcef/browser/alloy/alloy_browser_host_impl.cc b/libcef/browser/alloy/alloy_browser_host_impl.cc index cb841596a..98e1a2ce9 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.cc +++ b/libcef/browser/alloy/alloy_browser_host_impl.cc @@ -29,12 +29,11 @@ #include "libcef/features/runtime_checks.h" #include "base/bind.h" -#include "base/bind_helpers.h" +#include "base/callback_helpers.h" #include "base/command_line.h" #include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h" #include "content/browser/gpu/compositor_util.h" #include "content/browser/renderer_host/render_widget_host_impl.h" -#include "content/common/widget_messages.h" #include "content/public/browser/desktop_media_id.h" #include "content/public/browser/file_select_listener.h" #include "content/public/browser/host_zoom_map.h" @@ -945,12 +944,6 @@ void AlloyBrowserHostImpl::RunFileChooser( file_dialog_manager_->RunFileChooser(params, std::move(callback)); } -bool AlloyBrowserHostImpl::EmbedsFullscreenWidget() { - // When using windowless rendering do not allow Flash to create its own - // full- screen widget. - return IsWindowless(); -} - void AlloyBrowserHostImpl::EnterFullscreenModeForTab( content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) { @@ -1548,8 +1541,7 @@ bool AlloyBrowserHostImpl::CheckMediaAccessPermission( content::RenderFrameHost* render_frame_host, const GURL& security_origin, blink::mojom::MediaStreamType type) { - // Check media access permission without prompting the user. This is called - // when loading the Pepper Flash plugin. + // Check media access permission without prompting the user. const base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); return command_line->HasSwitch(switches::kEnableMediaStream); diff --git a/libcef/browser/alloy/alloy_browser_host_impl.h b/libcef/browser/alloy/alloy_browser_host_impl.h index ece734c67..0cac707cc 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.h +++ b/libcef/browser/alloy/alloy_browser_host_impl.h @@ -286,7 +286,6 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, void RunFileChooser(content::RenderFrameHost* render_frame_host, scoped_refptr listener, const blink::mojom::FileChooserParams& params) override; - bool EmbedsFullscreenWidget() override; void EnterFullscreenModeForTab( content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) override; diff --git a/libcef/browser/alloy/alloy_content_browser_client.cc b/libcef/browser/alloy/alloy_content_browser_client.cc index 8a62885a5..b124f7b92 100644 --- a/libcef/browser/alloy/alloy_content_browser_client.cc +++ b/libcef/browser/alloy/alloy_content_browser_client.cc @@ -716,10 +716,6 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches( switches::kDisableScrollBounce, switches::kDisableSpellChecking, switches::kEnableSpeechInput, - switches::kEnableSystemFlash, - switches::kPpapiFlashArgs, - switches::kPpapiFlashPath, - switches::kPpapiFlashVersion, switches::kUncaughtExceptionStackSize, network::switches::kUnsafelyTreatInsecureOriginAsSecure, }; @@ -758,15 +754,6 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches( #if defined(OS_LINUX) if (process_type == switches::kZygoteProcess) { - // Propagate the following switches to the zygote command line (along with - // any associated values) if present in the browser command line. - static const char* const kSwitchNames[] = { - switches::kPpapiFlashPath, - switches::kPpapiFlashVersion, - }; - command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - base::size(kSwitchNames)); - #if BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) if (!browser_cmd->HasSwitch(sandbox::policy::switches::kNoSandbox)) { // Pass the Widevine CDM path to the Zygote process. See comments in @@ -1098,8 +1085,7 @@ AlloyContentBrowserClient::CreateLoginDelegate( void AlloyContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories( int frame_tree_node_id, - base::UkmSourceId ukm_source_id, - NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories, + ukm::SourceIdObj ukm_source_id, NonNetworkURLLoaderFactoryMap* factories) { if (!extensions::ExtensionsEnabled()) return; @@ -1116,7 +1102,6 @@ void AlloyContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories( void AlloyContentBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories( int render_process_id, int render_frame_id, - NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories, NonNetworkURLLoaderFactoryMap* factories) { if (!extensions::ExtensionsEnabled()) return; @@ -1172,7 +1157,7 @@ bool AlloyContentBrowserClient::WillCreateURLLoaderFactory( URLLoaderFactoryType type, const url::Origin& request_initiator, base::Optional navigation_id, - base::UkmSourceId ukm_source_id, + ukm::SourceIdObj ukm_source_id, mojo::PendingReceiver* factory_receiver, mojo::PendingRemote* header_client, diff --git a/libcef/browser/alloy/alloy_content_browser_client.h b/libcef/browser/alloy/alloy_content_browser_client.h index 3ac8a034b..6b42f42e8 100644 --- a/libcef/browser/alloy/alloy_content_browser_client.h +++ b/libcef/browser/alloy/alloy_content_browser_client.h @@ -150,13 +150,11 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient { LoginAuthRequiredCallback auth_required_callback) override; void RegisterNonNetworkNavigationURLLoaderFactories( int frame_tree_node_id, - base::UkmSourceId ukm_source_id, - NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories, + ukm::SourceIdObj ukm_source_id, NonNetworkURLLoaderFactoryMap* factories) override; void RegisterNonNetworkSubresourceURLLoaderFactories( int render_process_id, int render_frame_id, - NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories, NonNetworkURLLoaderFactoryMap* factories) override; bool WillCreateURLLoaderFactory( content::BrowserContext* browser_context, @@ -165,7 +163,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient { URLLoaderFactoryType type, const url::Origin& request_initiator, base::Optional navigation_id, - base::UkmSourceId ukm_source_id, + ukm::SourceIdObj ukm_source_id, mojo::PendingReceiver* factory_receiver, mojo::PendingRemote* header_client, diff --git a/libcef/browser/alloy/browser_platform_delegate_alloy.cc b/libcef/browser/alloy/browser_platform_delegate_alloy.cc index 2d0235c5a..0fa1c1b0e 100644 --- a/libcef/browser/alloy/browser_platform_delegate_alloy.cc +++ b/libcef/browser/alloy/browser_platform_delegate_alloy.cc @@ -252,13 +252,14 @@ void CefBrowserPlatformDelegateAlloy::SendCaptureLostEvent() { #if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MAC)) void CefBrowserPlatformDelegateAlloy::NotifyMoveOrResizeStarted() { - if (!web_contents_) + if (!browser_) return; // Dismiss any existing popups. - content::RenderViewHost* host = web_contents_->GetRenderViewHost(); - if (host) - host->NotifyMoveOrResizeStarted(); + auto frame = browser_->GetMainFrame(); + if (frame && frame->IsValid()) { + static_cast(frame.get())->NotifyMoveOrResizeStarted(); + } } #endif diff --git a/libcef/browser/alloy/chrome_browser_process_alloy.cc b/libcef/browser/alloy/chrome_browser_process_alloy.cc index fbe0b79a1..e2f2f6d9b 100644 --- a/libcef/browser/alloy/chrome_browser_process_alloy.cc +++ b/libcef/browser/alloy/chrome_browser_process_alloy.cc @@ -319,12 +319,6 @@ ChromeBrowserProcessAlloy::subresource_filter_ruleset_service() { return nullptr; } -federated_learning::FlocBlocklistService* -ChromeBrowserProcessAlloy::floc_blocklist_service() { - NOTREACHED(); - return nullptr; -} - federated_learning::FlocSortingLshClustersService* ChromeBrowserProcessAlloy::floc_sorting_lsh_clusters_service() { NOTREACHED(); @@ -342,7 +336,7 @@ StartupData* ChromeBrowserProcessAlloy::startup_data() { return nullptr; } -#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) +#if defined(OS_WIN) || defined(OS_LINUX) void ChromeBrowserProcessAlloy::StartAutoupdateTimer() {} #endif diff --git a/libcef/browser/alloy/chrome_browser_process_alloy.h b/libcef/browser/alloy/chrome_browser_process_alloy.h index b29a90087..ef3c2adc3 100644 --- a/libcef/browser/alloy/chrome_browser_process_alloy.h +++ b/libcef/browser/alloy/chrome_browser_process_alloy.h @@ -82,14 +82,13 @@ class ChromeBrowserProcessAlloy : public BrowserProcess { safe_browsing::SafeBrowsingService* safe_browsing_service() override; subresource_filter::RulesetService* subresource_filter_ruleset_service() override; - federated_learning::FlocBlocklistService* floc_blocklist_service() override; federated_learning::FlocSortingLshClustersService* floc_sorting_lsh_clusters_service() override; optimization_guide::OptimizationGuideService* optimization_guide_service() override; StartupData* startup_data() override; -#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) +#if defined(OS_WIN) || defined(OS_LINUX) void StartAutoupdateTimer() override; #endif diff --git a/libcef/browser/audio_capturer.cc b/libcef/browser/audio_capturer.cc index a12a90940..c3eec900e 100644 --- a/libcef/browser/audio_capturer.cc +++ b/libcef/browser/audio_capturer.cc @@ -4,10 +4,11 @@ // found in the LICENSE file. #include "libcef/browser/audio_capturer.h" + #include "libcef/browser/alloy/alloy_browser_host_impl.h" +#include "libcef/browser/audio_loopback_stream_creator.h" #include "components/mirroring/service/captured_audio_input.h" -#include "content/public/browser/audio_loopback_stream_creator.h" #include "media/audio/audio_input_device.h" namespace { @@ -26,7 +27,7 @@ media::ChannelLayout TranslateChannelLayout( void StreamCreatorHelper( content::WebContents* source_web_contents, - content::AudioLoopbackStreamCreator* audio_stream_creator, + CefAudioLoopbackStreamCreator* audio_stream_creator, mojo::PendingRemote client, const media::AudioParameters& params, uint32_t total_segments) { @@ -56,8 +57,7 @@ CefAudioCapturer::CefAudioCapturer(const CefAudioParameters& params, : params_(params), browser_(browser), audio_handler_(audio_handler), - audio_stream_creator_(content::AudioLoopbackStreamCreator:: - CreateInProcessAudioLoopbackStreamCreator()) { + audio_stream_creator_(std::make_unique()) { media::AudioParameters audio_params( media::AudioParameters::AUDIO_PCM_LINEAR, TranslateChannelLayout(params.channel_layout), params.sample_rate, diff --git a/libcef/browser/audio_capturer.h b/libcef/browser/audio_capturer.h index 0ee206dd5..34c9d47ca 100644 --- a/libcef/browser/audio_capturer.h +++ b/libcef/browser/audio_capturer.h @@ -12,15 +12,12 @@ #include "media/base/audio_capturer_source.h" -namespace content { -class AudioLoopbackStreamCreator; -} // namespace content - namespace media { class AudioInputDevice; } // namespace media class CefAudioHandler; +class CefAudioLoopbackStreamCreator; class AlloyBrowserHostImpl; class CefAudioCapturer : public media::AudioCapturerSource::CaptureCallback { @@ -44,7 +41,7 @@ class CefAudioCapturer : public media::AudioCapturerSource::CaptureCallback { CefAudioParameters params_; CefRefPtr browser_; CefRefPtr audio_handler_; - std::unique_ptr audio_stream_creator_; + std::unique_ptr audio_stream_creator_; scoped_refptr audio_input_device_; bool capturing_ = false; int channels_ = 0; diff --git a/libcef/browser/audio_loopback_stream_creator.cc b/libcef/browser/audio_loopback_stream_creator.cc new file mode 100644 index 000000000..1ecbee44d --- /dev/null +++ b/libcef/browser/audio_loopback_stream_creator.cc @@ -0,0 +1,132 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/browser/audio_loopback_stream_creator.h" + +#include +#include + +#include "base/bind.h" +#include "base/check_op.h" +#include "base/location.h" +#include "content/browser/browser_main_loop.h" +#include "content/browser/web_contents/web_contents_impl.h" +#include "content/public/browser/browser_task_traits.h" +#include "content/public/browser/browser_thread.h" +#include "content/public/browser/render_frame_host.h" +#include "media/audio/audio_device_description.h" +#include "media/base/user_input_monitor.h" +#include "mojo/public/cpp/bindings/pending_remote.h" +#include "mojo/public/cpp/bindings/self_owned_receiver.h" +#include "third_party/blink/public/mojom/media/renderer_audio_input_stream_factory.mojom.h" + +namespace { + +// A blink::mojom::RendererAudioInputStreamFactoryClient that holds a +// CefAudioLoopbackStreamCreator::StreamCreatedCallback. The callback runs when +// the requested audio stream is created. +class StreamCreatedCallbackAdapter final + : public blink::mojom::RendererAudioInputStreamFactoryClient { + public: + explicit StreamCreatedCallbackAdapter( + const CefAudioLoopbackStreamCreator::StreamCreatedCallback& callback) + : callback_(callback) { + DCHECK(callback_); + } + + ~StreamCreatedCallbackAdapter() override {} + + // blink::mojom::RendererAudioInputStreamFactoryClient implementation. + void StreamCreated( + mojo::PendingRemote stream, + mojo::PendingReceiver + client_receiver, + media::mojom::ReadOnlyAudioDataPipePtr data_pipe, + bool initially_muted, + const base::Optional& stream_id) override { + DCHECK(!initially_muted); // Loopback streams shouldn't be started muted. + callback_.Run(std::move(stream), std::move(client_receiver), + std::move(data_pipe)); + } + + private: + const CefAudioLoopbackStreamCreator::StreamCreatedCallback callback_; + + DISALLOW_COPY_AND_ASSIGN(StreamCreatedCallbackAdapter); +}; + +void CreateLoopbackStreamHelper( + content::ForwardingAudioStreamFactory::Core* factory, + content::AudioStreamBroker::LoopbackSource* loopback_source, + const media::AudioParameters& params, + uint32_t total_segments, + mojo::PendingRemote + client_remote) { + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + + const bool mute_source = true; + factory->CreateLoopbackStream(-1, -1, loopback_source, params, total_segments, + mute_source, std::move(client_remote)); +} + +void CreateSystemWideLoopbackStreamHelper( + content::ForwardingAudioStreamFactory::Core* factory, + const media::AudioParameters& params, + uint32_t total_segments, + mojo::PendingRemote + client_remote) { + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + + const bool enable_agc = false; + factory->CreateInputStream( + -1, -1, media::AudioDeviceDescription::kLoopbackWithMuteDeviceId, params, + total_segments, enable_agc, std::move(client_remote)); +} + +} // namespace + +CefAudioLoopbackStreamCreator::CefAudioLoopbackStreamCreator() + : factory_(nullptr, + content::BrowserMainLoop::GetInstance() + ? static_cast( + content::BrowserMainLoop::GetInstance() + ->user_input_monitor()) + : nullptr, + content::AudioStreamBrokerFactory::CreateImpl()) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); +} + +CefAudioLoopbackStreamCreator::~CefAudioLoopbackStreamCreator() { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); +} + +void CefAudioLoopbackStreamCreator::CreateLoopbackStream( + content::WebContents* loopback_source, + const media::AudioParameters& params, + uint32_t total_segments, + const StreamCreatedCallback& callback) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + mojo::PendingRemote + client; + mojo::MakeSelfOwnedReceiver( + std::make_unique(callback), + client.InitWithNewPipeAndPassReceiver()); + // Deletion of factory_.core() is posted to the IO thread when |factory_| is + // destroyed, so Unretained is safe below. + if (loopback_source) { + content::GetIOThreadTaskRunner({})->PostTask( + FROM_HERE, + base::BindOnce(&CreateLoopbackStreamHelper, factory_.core(), + static_cast(loopback_source) + ->GetAudioStreamFactory() + ->core(), + params, total_segments, std::move(client))); + return; + } + // A null |frame_of_source_web_contents| requests system-wide loopback. + content::GetIOThreadTaskRunner({})->PostTask( + FROM_HERE, + base::BindOnce(&CreateSystemWideLoopbackStreamHelper, factory_.core(), + params, total_segments, std::move(client))); +} diff --git a/libcef/browser/audio_loopback_stream_creator.h b/libcef/browser/audio_loopback_stream_creator.h new file mode 100644 index 000000000..629cc887c --- /dev/null +++ b/libcef/browser/audio_loopback_stream_creator.h @@ -0,0 +1,51 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_ +#define CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_ + +#include "base/callback.h" +#include "base/macros.h" +#include "content/browser/media/forwarding_audio_stream_factory.h" +#include "content/common/content_export.h" +#include "media/mojo/mojom/audio_data_pipe.mojom.h" +#include "media/mojo/mojom/audio_input_stream.mojom.h" +#include "mojo/public/cpp/bindings/pending_remote.h" + +namespace media { +class AudioParameters; +} + +// This class handles creating a loopback stream that either captures audio from +// a WebContents or the system-wide loopback through the Audio Service. +// This class is operated on the UI thread. +// Based on InProcessAudioLoopbackStreamCreator which was deleted in +// https://crrev.com/a5af2468cf. +class CefAudioLoopbackStreamCreator final { + public: + CefAudioLoopbackStreamCreator(); + ~CefAudioLoopbackStreamCreator(); + + // The callback that is called when the requested stream is created. + using StreamCreatedCallback = base::RepeatingCallback stream, + mojo::PendingReceiver + client_receiver, + media::mojom::ReadOnlyAudioDataPipePtr data_pipe)>; + + // Creates a loopback stream that captures the audio from |loopback_source|, + // or the default system playback if |loopback_source| is null. Local output + // of the source/system audio is muted during capturing. + void CreateLoopbackStream(content::WebContents* loopback_source, + const media::AudioParameters& params, + uint32_t total_segments, + const StreamCreatedCallback& callback); + + private: + content::ForwardingAudioStreamFactory factory_; + + DISALLOW_COPY_AND_ASSIGN(CefAudioLoopbackStreamCreator); +}; + +#endif // CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_ diff --git a/libcef/browser/browser_host_base.cc b/libcef/browser/browser_host_base.cc index 38e0ac124..4033dd706 100644 --- a/libcef/browser/browser_host_base.cc +++ b/libcef/browser/browser_host_base.cc @@ -8,7 +8,6 @@ #include "libcef/browser/browser_platform_delegate.h" #include "libcef/browser/image_impl.h" #include "libcef/browser/navigation_entry_impl.h" -#include "libcef/browser/net/scheme_handler.h" #include "libcef/browser/thread_util.h" #include "base/logging.h" @@ -16,6 +15,7 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #include "components/favicon/core/favicon_url.h" #include "components/spellcheck/common/spellcheck_features.h" +#include "components/url_formatter/url_fixer.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/download_manager.h" #include "content/public/browser/download_request_utils.h" @@ -454,6 +454,7 @@ void CefBrowserHostBase::GoBack() { auto callback = base::BindOnce(&CefBrowserHostBase::GoBack, this); if (!CEF_CURRENTLY_ON_UIT()) { CEF_POST_TASK(CEF_UIT, std::move(callback)); + return; } if (browser_info_->IsNavigationLocked(std::move(callback))) { @@ -475,6 +476,7 @@ void CefBrowserHostBase::GoForward() { auto callback = base::BindOnce(&CefBrowserHostBase::GoForward, this); if (!CEF_CURRENTLY_ON_UIT()) { CEF_POST_TASK(CEF_UIT, std::move(callback)); + return; } if (browser_info_->IsNavigationLocked(std::move(callback))) { @@ -496,6 +498,7 @@ void CefBrowserHostBase::Reload() { auto callback = base::BindOnce(&CefBrowserHostBase::Reload, this); if (!CEF_CURRENTLY_ON_UIT()) { CEF_POST_TASK(CEF_UIT, std::move(callback)); + return; } if (browser_info_->IsNavigationLocked(std::move(callback))) { @@ -512,6 +515,7 @@ void CefBrowserHostBase::ReloadIgnoreCache() { auto callback = base::BindOnce(&CefBrowserHostBase::ReloadIgnoreCache, this); if (!CEF_CURRENTLY_ON_UIT()) { CEF_POST_TASK(CEF_UIT, std::move(callback)); + return; } if (browser_info_->IsNavigationLocked(std::move(callback))) { @@ -528,6 +532,7 @@ void CefBrowserHostBase::StopLoad() { auto callback = base::BindOnce(&CefBrowserHostBase::StopLoad, this); if (!CEF_CURRENTLY_ON_UIT()) { CEF_POST_TASK(CEF_UIT, std::move(callback)); + return; } if (browser_info_->IsNavigationLocked(std::move(callback))) { @@ -681,11 +686,6 @@ bool CefBrowserHostBase::HasObserver(Observer* observer) const { void CefBrowserHostBase::LoadMainFrameURL( const content::OpenURLParams& params) { - if (!params.url.is_valid()) { - LOG(ERROR) << "Invalid URL: " << params.url.spec(); - return; - } - auto callback = base::BindOnce(&CefBrowserHostBase::LoadMainFrameURL, this, params); if (!CEF_CURRENTLY_ON_UIT()) { @@ -706,8 +706,19 @@ bool CefBrowserHostBase::Navigate(const content::OpenURLParams& params) { CEF_REQUIRE_UIT(); auto web_contents = GetWebContents(); if (web_contents) { + // Fix common problems with user-typed text. Among other things, this: + // - Converts absolute file paths to "file://" URLs. + // - Normalizes "about:" and "chrome:" to "chrome://" URLs. + // - Adds the "http://" scheme if none was specified. + GURL gurl = url_formatter::FixupURL(params.url.possibly_invalid_spec(), + std::string()); + if (!gurl.is_valid()) { + LOG(ERROR) << "Invalid URL: " << params.url.possibly_invalid_spec(); + return false; + } + web_contents->GetController().LoadURL( - params.url, params.referrer, params.transition, params.extra_headers); + gurl, params.referrer, params.transition, params.extra_headers); return true; } return false; @@ -718,9 +729,6 @@ void CefBrowserHostBase::OnDidFinishLoad(CefRefPtr frame, int http_status_code) { frame->RefreshAttributes(); - // Give internal scheme handlers an opportunity to update content. - scheme::DidFinishLoad(frame, validated_url); - contents_delegate_->OnLoadEnd(frame, validated_url, http_status_code); } diff --git a/libcef/browser/browser_info_manager.cc b/libcef/browser/browser_info_manager.cc index 04e9f80bf..e445671e2 100644 --- a/libcef/browser/browser_info_manager.cc +++ b/libcef/browser/browser_info_manager.cc @@ -18,7 +18,6 @@ #include "base/command_line.h" #include "base/logging.h" -#include "content/common/view_messages.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents.h" diff --git a/libcef/browser/chrome/chrome_browser_host_impl.cc b/libcef/browser/chrome/chrome_browser_host_impl.cc index 4d9884214..ca782cd51 100644 --- a/libcef/browser/chrome/chrome_browser_host_impl.cc +++ b/libcef/browser/chrome/chrome_browser_host_impl.cc @@ -43,7 +43,7 @@ CefRefPtr ChromeBrowserHostImpl::Create( // Create the Browser. This will indirectly create the ChomeBrowserDelegate. // The same params will be used to create a new Browser if the tab is dragged // out of the existing Browser. - auto browser = new Browser(chrome_params); + auto browser = Browser::Create(chrome_params); GURL url = params.url; if (url.is_empty()) { diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.cc b/libcef/browser/chrome/chrome_content_browser_client_cef.cc index 174671291..98ce0dbc1 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.cc +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.cc @@ -48,9 +48,7 @@ void HandleExternalProtocolHelper( } // namespace -ChromeContentBrowserClientCef::ChromeContentBrowserClientCef( - StartupData* startup_data) - : ChromeContentBrowserClient(startup_data) {} +ChromeContentBrowserClientCef::ChromeContentBrowserClientCef() = default; ChromeContentBrowserClientCef::~ChromeContentBrowserClientCef() = default; std::unique_ptr @@ -154,7 +152,7 @@ bool ChromeContentBrowserClientCef::WillCreateURLLoaderFactory( URLLoaderFactoryType type, const url::Origin& request_initiator, base::Optional navigation_id, - base::UkmSourceId ukm_source_id, + ukm::SourceIdObj ukm_source_id, mojo::PendingReceiver* factory_receiver, mojo::PendingRemote* header_client, diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.h b/libcef/browser/chrome/chrome_content_browser_client_cef.h index d1d178760..20b66da2b 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.h +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.h @@ -18,7 +18,7 @@ class ChromeBrowserMainExtraPartsCef; // CEF override of ChromeContentBrowserClient. class ChromeContentBrowserClientCef : public ChromeContentBrowserClient { public: - explicit ChromeContentBrowserClientCef(StartupData* startup_data = nullptr); + ChromeContentBrowserClientCef(); ~ChromeContentBrowserClientCef() override; // ChromeContentBrowserClient overrides. @@ -47,7 +47,7 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient { URLLoaderFactoryType type, const url::Origin& request_initiator, base::Optional navigation_id, - base::UkmSourceId ukm_source_id, + ukm::SourceIdObj ukm_source_id, mojo::PendingReceiver* factory_receiver, mojo::PendingRemote* header_client, diff --git a/libcef/browser/extensions/api/tabs/tabs_api.cc b/libcef/browser/extensions/api/tabs/tabs_api.cc index 6c397dfc8..a9b3c6003 100644 --- a/libcef/browser/extensions/api/tabs/tabs_api.cc +++ b/libcef/browser/extensions/api/tabs/tabs_api.cc @@ -91,8 +91,10 @@ ExtensionFunction::ResponseAction TabsCreateFunction::Run() { return RespondNow(Error(error)); // Return data about the newly created tab. - return RespondNow(has_callback() ? OneArgument(std::move(result)) - : NoArguments()); + return RespondNow( + has_callback() + ? OneArgument(base::Value::FromUniquePtrValue(std::move(result))) + : NoArguments()); } ExecuteCodeInTabFunction::ExecuteCodeInTabFunction() diff --git a/libcef/browser/extensions/chrome_api_registration.cc b/libcef/browser/extensions/chrome_api_registration.cc index 8631b75df..bf2e3006f 100644 --- a/libcef/browser/extensions/chrome_api_registration.cc +++ b/libcef/browser/extensions/chrome_api_registration.cc @@ -23,7 +23,7 @@ namespace cef { namespace cefimpl = extensions::cef; -#define EXTENSION_FUNCTION_NAME(classname) classname::function_name() +#define EXTENSION_FUNCTION_NAME(classname) classname::static_function_name() // Maintain the same order as https://developer.chrome.com/extensions/api_index // so chrome://extensions-support looks nice. diff --git a/libcef/browser/frame_host_impl.cc b/libcef/browser/frame_host_impl.cc index a3cda706e..ccfff5605 100644 --- a/libcef/browser/frame_host_impl.cc +++ b/libcef/browser/frame_host_impl.cc @@ -17,6 +17,7 @@ #include "libcef/common/request_impl.h" #include "libcef/common/task_runner_impl.h" +#include "components/url_formatter/url_fixer.h" #include "content/browser/renderer_host/frame_tree_node.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" @@ -302,11 +303,21 @@ void CefFrameHostImpl::RefreshAttributes() { parent_frame_id_ = MakeFrameId(render_frame_host_->GetParent()); } +void CefFrameHostImpl::NotifyMoveOrResizeStarted() { + Send(new CefMsg_MoveOrResizeStarted(MSG_ROUTING_NONE)); +} + void CefFrameHostImpl::Navigate(const CefNavigateParams& params) { CefMsg_LoadRequest_Params request; - request.url = params.url; + + // Fix common problems with user-typed text. Among other things, this: + // - Converts absolute file paths to "file://" URLs. + // - Normalizes "about:" and "chrome:" to "chrome://" URLs. + // - Adds the "http://" scheme if none was specified. + request.url = url_formatter::FixupURL(params.url.possibly_invalid_spec(), + std::string()); if (!request.url.is_valid()) { - LOG(ERROR) << "Invalid URL: " << params.url; + LOG(ERROR) << "Invalid URL: " << params.url.possibly_invalid_spec(); return; } @@ -336,16 +347,9 @@ void CefFrameHostImpl::LoadURLWithExtras(const std::string& url, if (frame_id < CefFrameHostImpl::kMainFrameId) return; + // Any necessary fixup of the URL will occur in + // [CefBrowserHostBase|CefFrameHostImpl]::Navigate(). GURL gurl(url); - if (!gurl.is_valid() && !gurl.has_scheme()) { - // Try to add "http://" at the beginning. - std::string new_url = std::string("http://") + url; - gurl = GURL(new_url); - } - if (!gurl.is_valid()) { - LOG(ERROR) << "Invalid URL: " << url; - return; - } if (frame_id == CefFrameHostImpl::kMainFrameId) { // Load via the browser using NavigationController. diff --git a/libcef/browser/frame_host_impl.h b/libcef/browser/frame_host_impl.h index a7411c529..4d5167b40 100644 --- a/libcef/browser/frame_host_impl.h +++ b/libcef/browser/frame_host_impl.h @@ -87,6 +87,10 @@ class CefFrameHostImpl : public CefFrame { void SetFocused(bool focused); void RefreshAttributes(); + // Notification that a move or resize of the renderer's containing window has + // started. Used on Windows and Linux with the Alloy runtime. + void NotifyMoveOrResizeStarted(); + // Navigate as specified by the |params| argument. void Navigate(const CefNavigateParams& params); diff --git a/libcef/browser/menu_manager.cc b/libcef/browser/menu_manager.cc index db4fe2de8..3501841f3 100644 --- a/libcef/browser/menu_manager.cc +++ b/libcef/browser/menu_manager.cc @@ -286,7 +286,7 @@ void CefMenuManager::ExecuteCommandCallback(int command_id, void CefMenuManager::CreateDefaultModel() { if (!params_.custom_items.empty()) { // Custom menu items originating from the renderer process. For example, - // plugin placeholder menu items or Flash menu items. + // plugin placeholder menu items. for (size_t i = 0; i < params_.custom_items.size(); ++i) { content::MenuItem menu_item = params_.custom_items[i]; menu_item.action += MENU_ID_CUSTOM_FIRST; diff --git a/libcef/browser/native/browser_platform_delegate_native_linux.cc b/libcef/browser/native/browser_platform_delegate_native_linux.cc index e9eedbc65..6ce1d848b 100644 --- a/libcef/browser/native/browser_platform_delegate_native_linux.cc +++ b/libcef/browser/native/browser_platform_delegate_native_linux.cc @@ -106,8 +106,7 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() { // As an additional requirement on Linux, we must set the colors for the // render widgets in webkit. - blink::mojom::RendererPreferences* prefs = - web_contents_->GetMutableRendererPrefs(); + auto prefs = web_contents_->GetMutableRendererPrefs(); prefs->focus_ring_color = SkColorSetARGB(255, 229, 151, 0); prefs->active_selection_bg_color = SkColorSetRGB(30, 144, 255); diff --git a/libcef/browser/native/window_x11.cc b/libcef/browser/native/window_x11.cc index 538847c83..2858bbce1 100644 --- a/libcef/browser/native/window_x11.cc +++ b/libcef/browser/native/window_x11.cc @@ -63,7 +63,7 @@ x11::Window FindToplevelParent(x11::Window window) { CEF_EXPORT XDisplay* cef_get_xdisplay() { if (!CEF_CURRENTLY_ON(CEF_UIT)) return nullptr; - return gfx::GetXDisplay(); + return x11::Connection::Get()->GetXlibDisplay(); } CefWindowX11::CefWindowX11(CefRefPtr browser, diff --git a/libcef/browser/native/window_x11.h b/libcef/browser/native/window_x11.h index d9d89652a..946efae0b 100644 --- a/libcef/browser/native/window_x11.h +++ b/libcef/browser/native/window_x11.h @@ -16,7 +16,6 @@ #include "ui/events/platform/x11/x11_event_source.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/x/x11_atom_cache.h" -#include "ui/gfx/x/x11_types.h" namespace ui { class XScopedEventSelector; diff --git a/libcef/browser/net/chrome_scheme_handler.cc b/libcef/browser/net/chrome_scheme_handler.cc index e4889c383..d6984c968 100644 --- a/libcef/browser/net/chrome_scheme_handler.cc +++ b/libcef/browser/net/chrome_scheme_handler.cc @@ -196,18 +196,8 @@ std::string GetOSType() { return "Windows"; #elif defined(OS_MAC) return "Mac OS X"; -#elif defined(OS_CHROMEOS) - return "Chromium OS"; -#elif defined(OS_ANDROID) - return "Android"; #elif defined(OS_LINUX) return "Linux"; -#elif defined(OS_FREEBSD) - return "FreeBSD"; -#elif defined(OS_OPENBSD) - return "OpenBSD"; -#elif defined(OS_SOLARIS) - return "Solaris"; #else return "Unknown"; #endif @@ -384,7 +374,6 @@ bool OnVersionUI(Profile* profile, parser.Add("OS", GetOSType()); parser.Add("WEBKIT", content::GetWebKitVersion()); parser.Add("JAVASCRIPT", v8::V8::GetVersion()); - parser.Add("FLASH", std::string()); // Value populated asynchronously. parser.Add( "USERAGENT", CefAppManager::Get()->GetContentClient()->browser()->GetUserAgent()); @@ -625,7 +614,6 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory { const auto host_id = GetChromeHostId(url.host()); if (host_id != CHROME_UNKNOWN) { - // TODO(network): Use WebUI bindings to implement DidFinishChromeLoad. return false; } @@ -640,11 +628,8 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory { } static void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) { - // about: handler. Must come before chrome: handler, since it will - // rewrite about: urls to chrome: URLs and then expect chrome: to - // actually handle them. Also relies on a preliminary fixup phase. - handler->SetFixupHandler(&FixupBrowserAboutURL); - handler->AddHandlerPair(&WillHandleBrowserAboutURL, + // Handler to rewrite chrome://about and chrome://sync URLs. + handler->AddHandlerPair(&HandleChromeAboutAndChromeSyncRewrite, content::BrowserURLHandler::null_handler()); // chrome: & friends. @@ -688,38 +673,6 @@ CefWebUIControllerFactory* CefWebUIControllerFactory::GetInstance() { return &g_web_ui_controller_factory.Get(); } -void DidFinishChromeVersionLoad(CefRefPtr frame) { - // Retieve Flash version information and update asynchronously. - class Visitor : public CefWebPluginInfoVisitor { - public: - Visitor(CefRefPtr frame) : frame_(frame) {} - - bool Visit(CefRefPtr info, - int count, - int total) override { - std::string name = info->GetName(); - if (name == "Shockwave Flash") { - if (frame_->IsValid()) { - std::string version = info->GetVersion(); - frame_->ExecuteJavaScript( - "document.getElementById('flash').innerText = '" + version + "';", - std::string(), 0); - } - return false; - } - - return true; - } - - private: - CefRefPtr frame_; - - IMPLEMENT_REFCOUNTING(Visitor); - }; - - CefVisitWebPluginInfo(new Visitor(frame)); -} - } // namespace void RegisterWebUIControllerFactory() { @@ -735,17 +688,6 @@ void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) { CefWebUIControllerFactory::BrowserURLHandlerCreated(handler); } -void DidFinishChromeLoad(CefRefPtr frame, const GURL& validated_url) { - ChromeHostId host_id = GetChromeHostId(validated_url.host()); - switch (host_id) { - case CHROME_VERSION: - DidFinishChromeVersionLoad(frame); - break; - default: - break; - } -} - bool IsWebUIAllowedToMakeNetworkRequests(const url::Origin& origin) { return CefWebUIControllerFactory::IsWebUIAllowedToMakeNetworkRequests(origin); } diff --git a/libcef/browser/net/chrome_scheme_handler.h b/libcef/browser/net/chrome_scheme_handler.h index f65cf34cc..6d28be54c 100644 --- a/libcef/browser/net/chrome_scheme_handler.h +++ b/libcef/browser/net/chrome_scheme_handler.h @@ -36,9 +36,6 @@ void RegisterWebUIControllerFactory(); // Register the WebUI handler. void BrowserURLHandlerCreated(content::BrowserURLHandler* handler); -// Used to fire any asynchronous content updates. -void DidFinishChromeLoad(CefRefPtr frame, const GURL& validated_url); - // Returns true if WebUI is allowed to make network requests. bool IsWebUIAllowedToMakeNetworkRequests(const url::Origin& origin); diff --git a/libcef/browser/net/scheme_handler.cc b/libcef/browser/net/scheme_handler.cc index ae742d17d..9686e53fa 100644 --- a/libcef/browser/net/scheme_handler.cc +++ b/libcef/browser/net/scheme_handler.cc @@ -22,9 +22,4 @@ void RegisterInternalHandlers(CefIOThreadState* iothread_state) { scheme::RegisterChromeDevToolsHandler(iothread_state); } -void DidFinishLoad(CefRefPtr frame, const GURL& validated_url) { - if (validated_url.scheme() == content::kChromeUIScheme) - scheme::DidFinishChromeLoad(frame, validated_url); -} - } // namespace scheme diff --git a/libcef/browser/net/scheme_handler.h b/libcef/browser/net/scheme_handler.h index a912ab38f..a991be382 100644 --- a/libcef/browser/net/scheme_handler.h +++ b/libcef/browser/net/scheme_handler.h @@ -18,9 +18,6 @@ namespace scheme { // Register the internal scheme handlers that can be overridden. void RegisterInternalHandlers(CefIOThreadState* iothread_state); -// Used to fire any asynchronous content updates. -void DidFinishLoad(CefRefPtr frame, const GURL& validated_url); - } // namespace scheme #endif // CEF_LIBCEF_BROWSER_NET_SCHEME_HANDLER_H_ diff --git a/libcef/browser/net_service/cookie_manager_impl.cc b/libcef/browser/net_service/cookie_manager_impl.cc index ad5276671..1ea753e49 100644 --- a/libcef/browser/net_service/cookie_manager_impl.cc +++ b/libcef/browser/net_service/cookie_manager_impl.cc @@ -267,7 +267,7 @@ bool CefCookieManagerImpl::SetCookie(const CefString& url, expiration_time, base::Time(), // Last access time. cookie.secure ? true : false, cookie.httponly ? true : false, same_site, - priority); + priority, /*same_party=*/false); if (!canonical_cookie) { SetCookieCallbackImpl( diff --git a/libcef/browser/net_service/proxy_url_loader_factory.h b/libcef/browser/net_service/proxy_url_loader_factory.h index 5973e9999..758e81a17 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.h +++ b/libcef/browser/net_service/proxy_url_loader_factory.h @@ -21,6 +21,10 @@ #include "services/network/public/mojom/network_context.mojom.h" #include "services/network/public/mojom/url_loader_factory.mojom.h" +namespace content { +class ResourceContext; +} + namespace net_service { class InterceptedRequest; diff --git a/libcef/browser/net_service/url_loader_factory_getter.cc b/libcef/browser/net_service/url_loader_factory_getter.cc index 5da78b784..9384d75bd 100644 --- a/libcef/browser/net_service/url_loader_factory_getter.cc +++ b/libcef/browser/net_service/url_loader_factory_getter.cc @@ -65,7 +65,7 @@ scoped_refptr URLLoaderFactoryGetter::Create( should_proxy |= browser_client->WillCreateURLLoaderFactory( browser_context, render_frame_host, render_process_id, content::ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource, - url::Origin(), base::nullopt /* navigation_id */, base::UkmSourceId(), + url::Origin(), base::nullopt /* navigation_id */, ukm::SourceIdObj(), &maybe_proxy_factory_request, nullptr /* header_client */, nullptr /* bypass_redirect_checks */, nullptr /* disable_secure_dns */, nullptr /* factory_override */); diff --git a/libcef/browser/osr/browser_platform_delegate_osr.cc b/libcef/browser/osr/browser_platform_delegate_osr.cc index aaaf180fe..59d187d3e 100644 --- a/libcef/browser/osr/browser_platform_delegate_osr.cc +++ b/libcef/browser/osr/browser_platform_delegate_osr.cc @@ -594,12 +594,6 @@ gfx::Point CefBrowserPlatformDelegateOsr::GetParentScreenPoint( CefRenderWidgetHostViewOSR* CefBrowserPlatformDelegateOsr::GetOSRHostView() const { - CefRenderWidgetHostViewOSR* fs_view = - static_cast( - web_contents_->GetFullscreenRenderWidgetHostView()); - if (fs_view) - return fs_view; - content::RenderViewHost* host = web_contents_->GetRenderViewHost(); if (host) { return static_cast( diff --git a/libcef/browser/osr/host_display_client_osr.cc b/libcef/browser/osr/host_display_client_osr.cc index 858f96dde..cf9580904 100644 --- a/libcef/browser/osr/host_display_client_osr.cc +++ b/libcef/browser/osr/host_display_client_osr.cc @@ -133,7 +133,7 @@ void CefHostDisplayClientOSR::CreateLayeredWindowUpdater( layered_window_updater_->SetActive(active_); } -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(OS_LINUX) void CefHostDisplayClientOSR::DidCompleteSwapWithNewSize( const gfx::Size& size) {} #endif diff --git a/libcef/browser/osr/host_display_client_osr.h b/libcef/browser/osr/host_display_client_osr.h index 7d724c6d8..545f5539c 100644 --- a/libcef/browser/osr/host_display_client_osr.h +++ b/libcef/browser/osr/host_display_client_osr.h @@ -33,7 +33,7 @@ class CefHostDisplayClientOSR : public viz::HostDisplayClient { mojo::PendingReceiver receiver) override; -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(OS_LINUX) void DidCompleteSwapWithNewSize(const gfx::Size& size) override; #endif diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 6ca8b4c83..3bfcd94c0 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -39,7 +39,6 @@ #include "content/browser/renderer_host/render_widget_host_input_event_router.h" #include "content/common/content_switches_internal.h" #include "content/common/input_messages.h" -#include "content/common/view_messages.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/context_factory.h" @@ -459,6 +458,16 @@ base::Optional CefRenderWidgetHostViewOSR::GetBackgroundColor() { void CefRenderWidgetHostViewOSR::UpdateBackgroundColor() {} +base::Optional +CefRenderWidgetHostViewOSR::GetDisplayFeature() { + return base::nullopt; +} + +void CefRenderWidgetHostViewOSR::SetDisplayFeatureForTesting( + const content::DisplayFeature* display_feature) { + NOTREACHED(); +} + blink::mojom::PointerLockResult CefRenderWidgetHostViewOSR::LockMouse( bool request_unadjusted_movement) { return blink::mojom::PointerLockResult::kPermissionDenied; diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 4e94a4cd7..8a0d6f0d7 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -122,6 +122,9 @@ class CefRenderWidgetHostViewOSR void SetBackgroundColor(SkColor color) override; base::Optional GetBackgroundColor() override; void UpdateBackgroundColor() override; + base::Optional GetDisplayFeature() override; + void SetDisplayFeatureForTesting( + const content::DisplayFeature* display_feature) override; blink::mojom::PointerLockResult LockMouse( bool request_unadjusted_movement) override; blink::mojom::PointerLockResult ChangeMouseLock( diff --git a/libcef/browser/osr/web_contents_view_osr.cc b/libcef/browser/osr/web_contents_view_osr.cc index 5a6e71322..c3cc090a0 100644 --- a/libcef/browser/osr/web_contents_view_osr.cc +++ b/libcef/browser/osr/web_contents_view_osr.cc @@ -130,7 +130,9 @@ CefWebContentsViewOSR::CreateViewForChildWidget( void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {} -void CefWebContentsViewOSR::RenderViewReady() {} +void CefWebContentsViewOSR::RenderViewReady() { + RenderViewCreated(); +} void CefWebContentsViewOSR::RenderViewHostChanged( content::RenderViewHost* old_host, diff --git a/libcef/browser/prefs/renderer_prefs.cc b/libcef/browser/prefs/renderer_prefs.cc index 6b18ecd7e..42ca4a725 100644 --- a/libcef/browser/prefs/renderer_prefs.cc +++ b/libcef/browser/prefs/renderer_prefs.cc @@ -133,12 +133,16 @@ void SetChromePrefs(Profile* profile, blink::web_pref::WebPreferences& web) { if (extensions::ExtensionsEnabled()) { std::string image_animation_policy = prefs->GetString(prefs::kAnimationPolicy); - if (image_animation_policy == kAnimationPolicyOnce) - web.animation_policy = blink::web_pref::kImageAnimationPolicyAnimateOnce; - else if (image_animation_policy == kAnimationPolicyNone) - web.animation_policy = blink::web_pref::kImageAnimationPolicyNoAnimation; - else - web.animation_policy = blink::web_pref::kImageAnimationPolicyAllowed; + if (image_animation_policy == kAnimationPolicyOnce) { + web.animation_policy = + blink::mojom::ImageAnimationPolicy::kImageAnimationPolicyAnimateOnce; + } else if (image_animation_policy == kAnimationPolicyNone) { + web.animation_policy = + blink::mojom::ImageAnimationPolicy::kImageAnimationPolicyNoAnimation; + } else { + web.animation_policy = + blink::mojom::ImageAnimationPolicy::kImageAnimationPolicyAllowed; + } } // Make sure we will set the default_encoding with canonical encoding name. @@ -279,22 +283,47 @@ void SetBool(CommandLinePrefStore* prefs, const std::string& key, bool value) { WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); } +blink::mojom::PreferredColorScheme ToBlinkPreferredColorScheme( + ui::NativeTheme::PreferredColorScheme native_theme_scheme) { + switch (native_theme_scheme) { + case ui::NativeTheme::PreferredColorScheme::kDark: + return blink::mojom::PreferredColorScheme::kDark; + case ui::NativeTheme::PreferredColorScheme::kLight: + return blink::mojom::PreferredColorScheme::kLight; + } + + NOTREACHED(); +} + // From chrome/browser/chrome_content_browser_client.cc -bool UpdatePreferredColorSchemesBasedOnURLIfNeeded( - blink::web_pref::WebPreferences* web_prefs, - const GURL& url) { +// Returns true if preferred color scheme is modified based on at least one of +// the following - +// |url| - Last committed url. +// |native_theme| - For other platforms based on native theme scheme. +bool UpdatePreferredColorScheme(blink::web_pref::WebPreferences* web_prefs, + const GURL& url, + const ui::NativeTheme* native_theme) { + auto old_preferred_color_scheme = web_prefs->preferred_color_scheme; + + // Update based on native theme scheme. + web_prefs->preferred_color_scheme = + ToBlinkPreferredColorScheme(native_theme->GetPreferredColorScheme()); + // Force a light preferred color scheme on certain URLs if kWebUIDarkMode is // disabled; some of the UI is not yet correctly themed. - if (base::FeatureList::IsEnabled(features::kWebUIDarkMode)) - return false; - bool force_light = url.SchemeIs(content::kChromeUIScheme); - if (!force_light && extensions::ExtensionsEnabled()) { - force_light = url.SchemeIs(extensions::kExtensionScheme) && - url.host_piece() == extension_misc::kPdfExtensionId; + if (!base::FeatureList::IsEnabled(features::kWebUIDarkMode)) { + // Update based on last committed url. + bool force_light = url.SchemeIs(content::kChromeUIScheme); + if (!force_light) { + force_light = url.SchemeIs(extensions::kExtensionScheme) && + url.host_piece() == extension_misc::kPdfExtensionId; + } + if (force_light) { + web_prefs->preferred_color_scheme = + blink::mojom::PreferredColorScheme::kLight; + } } - auto old_preferred_color_scheme = web_prefs->preferred_color_scheme; - if (force_light) - web_prefs->preferred_color_scheme = blink::PreferredColorScheme::kLight; + return old_preferred_color_scheme != web_prefs->preferred_color_scheme; } @@ -332,9 +361,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, registry->RegisterBooleanPref(prefs::kCloudPrintDeprecationWarningsSuppressed, false); - // TODO(guoweis): Remove next 2 options at M50. - registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, true); - registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, true); registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy, blink::kWebRTCIPHandlingDefault); registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string()); @@ -371,15 +397,27 @@ void PopulateWebPreferences(content::RenderViewHost* rvh, auto* native_theme = ui::NativeTheme::GetInstanceForWeb(); switch (native_theme->GetPreferredColorScheme()) { case ui::NativeTheme::PreferredColorScheme::kDark: - web.preferred_color_scheme = blink::PreferredColorScheme::kDark; + web.preferred_color_scheme = blink::mojom::PreferredColorScheme::kDark; break; case ui::NativeTheme::PreferredColorScheme::kLight: - web.preferred_color_scheme = blink::PreferredColorScheme::kLight; + web.preferred_color_scheme = blink::mojom::PreferredColorScheme::kLight; break; } - UpdatePreferredColorSchemesBasedOnURLIfNeeded( - &web, rvh->GetSiteInstance()->GetSiteURL()); + switch (native_theme->GetPreferredContrast()) { + case ui::NativeTheme::PreferredContrast::kNoPreference: + web.preferred_contrast = blink::mojom::PreferredContrast::kNoPreference; + break; + case ui::NativeTheme::PreferredContrast::kMore: + web.preferred_contrast = blink::mojom::PreferredContrast::kMore; + break; + case ui::NativeTheme::PreferredContrast::kLess: + web.preferred_contrast = blink::mojom::PreferredContrast::kLess; + break; + } + + UpdatePreferredColorScheme(&web, rvh->GetSiteInstance()->GetSiteURL(), + native_theme); // Set preferences based on the extension. SetExtensionPrefs(rvh, web); @@ -403,8 +441,9 @@ void PopulateWebPreferences(content::RenderViewHost* rvh, bool PopulateWebPreferencesAfterNavigation( content::WebContents* web_contents, blink::web_pref::WebPreferences& web) { - return UpdatePreferredColorSchemesBasedOnURLIfNeeded( - &web, web_contents->GetLastCommittedURL()); + auto* native_theme = ui::NativeTheme::GetInstanceForWeb(); + return UpdatePreferredColorScheme(&web, web_contents->GetLastCommittedURL(), + native_theme); } } // namespace renderer_prefs diff --git a/libcef/browser/printing/printing_message_filter.cc b/libcef/browser/printing/printing_message_filter.cc index a9dda3250..ffefb0a64 100644 --- a/libcef/browser/printing/printing_message_filter.cc +++ b/libcef/browser/printing/printing_message_filter.cc @@ -64,25 +64,6 @@ CefPrintingMessageFilterShutdownNotifierFactory::GetInstance() { return g_printing_message_filter_shutdown_notifier_factory.Pointer(); } -#if defined(OS_WIN) -content::WebContents* GetWebContentsForRenderFrame(int render_process_id, - int render_frame_id) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - content::RenderFrameHost* frame = - content::RenderFrameHost::FromID(render_process_id, render_frame_id); - return frame ? content::WebContents::FromRenderFrameHost(frame) : nullptr; -} - -CefPrintViewManager* GetPrintViewManager(int render_process_id, - int render_frame_id) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - content::WebContents* web_contents = - GetWebContentsForRenderFrame(render_process_id, render_frame_id); - return web_contents ? CefPrintViewManager::FromWebContents(web_contents) - : nullptr; -} -#endif // defined(OS_WIN) - } // namespace CefPrintingMessageFilter::CefPrintingMessageFilter(int render_process_id, @@ -123,8 +104,6 @@ bool CefPrintingMessageFilter::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(CefPrintingMessageFilter, message) IPC_MESSAGE_HANDLER_DELAY_REPLY(PrintHostMsg_ScriptedPrint, OnScriptedPrint) - IPC_MESSAGE_HANDLER_DELAY_REPLY(PrintHostMsg_UpdatePrintSettings, - OnUpdatePrintSettings) IPC_MESSAGE_HANDLER(PrintHostMsg_CheckForCancel, OnCheckForCancel) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() @@ -169,72 +148,9 @@ void CefPrintingMessageFilter::OnScriptedPrintReply( } } -void CefPrintingMessageFilter::OnUpdatePrintSettings(int document_cookie, - base::Value job_settings, - IPC::Message* reply_msg) { - std::unique_ptr printer_query; - if (!is_printing_enabled_.GetValue()) { - // Reply with NULL query. - OnUpdatePrintSettingsReply(std::move(printer_query), reply_msg); - return; - } - printer_query = queue_->PopPrinterQuery(document_cookie); - if (!printer_query.get()) { - printer_query = queue_->CreatePrinterQuery( - content::ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE); - } - printer_query->SetSettings( - std::move(job_settings), - base::BindOnce(&CefPrintingMessageFilter::OnUpdatePrintSettingsReply, - this, std::move(printer_query), reply_msg)); -} - -void CefPrintingMessageFilter::OnUpdatePrintSettingsReply( - std::unique_ptr printer_query, - IPC::Message* reply_msg) { - mojom::PrintPagesParams params; - params.params = mojom::PrintParams::New(); - if (printer_query && printer_query->last_status() == PrintingContext::OK) { - RenderParamsFromPrintSettings(printer_query->settings(), - params.params.get()); - params.params->document_cookie = printer_query->cookie(); - params.pages = PageRange::GetPages(printer_query->settings().ranges()); - } - bool canceled = printer_query.get() && - (printer_query->last_status() == PrintingContext::CANCEL); -#if defined(OS_WIN) - if (canceled) { - int routing_id = reply_msg->routing_id(); - content::GetUIThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce(&CefPrintingMessageFilter::NotifySystemDialogCancelled, - this, routing_id)); - } -#endif - - PrintHostMsg_UpdatePrintSettings::WriteReplyParams(reply_msg, params, - canceled); - Send(reply_msg); - // If user hasn't cancelled. - if (printer_query.get()) { - if (printer_query->cookie() && printer_query->settings().dpi()) { - queue_->QueuePrinterQuery(std::move(printer_query)); - } else { - printer_query->StopWorker(); - } - } -} - void CefPrintingMessageFilter::OnCheckForCancel(const mojom::PreviewIds& ids, bool* cancel) { *cancel = false; } -#if defined(OS_WIN) -void CefPrintingMessageFilter::NotifySystemDialogCancelled(int routing_id) { - auto manager = GetPrintViewManager(render_process_id_, routing_id); - manager->SystemDialogCancelled(); -} -#endif - } // namespace printing diff --git a/libcef/browser/printing/printing_message_filter.h b/libcef/browser/printing/printing_message_filter.h index 5689483e2..bd32a69d4 100644 --- a/libcef/browser/printing/printing_message_filter.h +++ b/libcef/browser/printing/printing_message_filter.h @@ -54,20 +54,8 @@ class CefPrintingMessageFilter : public content::BrowserMessageFilter { void OnScriptedPrintReply(std::unique_ptr printer_query, IPC::Message* reply_msg); - // Modify the current print settings based on |job_settings|. The task is - // handled by the print worker thread and the UI thread. The reply occurs on - // the IO thread. - void OnUpdatePrintSettings(int document_cookie, - base::Value job_settings, - IPC::Message* reply_msg); - void OnUpdatePrintSettingsReply(std::unique_ptr printer_query, - IPC::Message* reply_msg); - // Check to see if print preview has been cancelled. void OnCheckForCancel(const mojom::PreviewIds& ids, bool* cancel); -#if defined(OS_WIN) - void NotifySystemDialogCancelled(int routing_id); -#endif std::unique_ptr printing_shutdown_notifier_; diff --git a/libcef/browser/request_context_impl.cc b/libcef/browser/request_context_impl.cc index becb3fef4..dfabb99e9 100644 --- a/libcef/browser/request_context_impl.cc +++ b/libcef/browser/request_context_impl.cc @@ -407,13 +407,16 @@ CefRefPtr CefRequestContextImpl::GetAllPreferences( PrefService* pref_service = browser_context()->AsProfile()->GetPrefs(); - std::unique_ptr values = - pref_service->GetPreferenceValues(include_defaults - ? PrefService::INCLUDE_DEFAULTS - : PrefService::EXCLUDE_DEFAULTS); + base::Value values = pref_service->GetPreferenceValues( + include_defaults ? PrefService::INCLUDE_DEFAULTS + : PrefService::EXCLUDE_DEFAULTS); // CefDictionaryValueImpl takes ownership of |values|. - return new CefDictionaryValueImpl(values.release(), true, false); + return new CefDictionaryValueImpl( + base::DictionaryValue::From( + base::Value::ToUniquePtrValue(std::move(values))) + .release(), + true, false); } bool CefRequestContextImpl::CanSetPreference(const CefString& name) { diff --git a/libcef/browser/views/basic_label_button_view.h b/libcef/browser/views/basic_label_button_view.h index e6fda326e..9f615b290 100644 --- a/libcef/browser/views/basic_label_button_view.h +++ b/libcef/browser/views/basic_label_button_view.h @@ -15,9 +15,17 @@ // Extend views::LabelButton with a no-argument constructor as required by the // CefViewView template and extend views::ButtonListener as required by the // CefButtonView template. -class LabelButtonEx : public views::LabelButton, public views::ButtonListener { +class LabelButtonEx : public views::LabelButton { public: - LabelButtonEx() : views::LabelButton(this, base::string16()) {} + LabelButtonEx() + : views::LabelButton(base::BindRepeating( + [](LabelButtonEx* self, const ui::Event& event) { + self->ButtonPressed(event); + }, + base::Unretained(this)), + base::string16()) {} + + virtual void ButtonPressed(const ui::Event& event) = 0; }; class CefBasicLabelButtonView diff --git a/libcef/browser/views/button_view.h b/libcef/browser/views/button_view.h index 869e379ea..d297aa86b 100644 --- a/libcef/browser/views/button_view.h +++ b/libcef/browser/views/button_view.h @@ -42,8 +42,8 @@ CEF_BUTTON_VIEW_T class CefButtonView : public CEF_VIEW_VIEW_D { // views::Button methods: void StateChanged(views::Button::ButtonState old_state) override; - // views::ButtonListener methods: - void ButtonPressed(views::Button* sender, const ui::Event& event) override; + // LabelButtonEx methods: + void ButtonPressed(const ui::Event& event) override; }; CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::StateChanged( @@ -54,7 +54,6 @@ CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::StateChanged( } CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::ButtonPressed( - views::Button* sender, const ui::Event& event) { // Callback may trigger new animation state. if (ParentClass::cef_delegate()) diff --git a/libcef/browser/views/menu_button_view.cc b/libcef/browser/views/menu_button_view.cc index aac7ab62b..fb03fa4a5 100644 --- a/libcef/browser/views/menu_button_view.cc +++ b/libcef/browser/views/menu_button_view.cc @@ -51,10 +51,9 @@ void CefMenuButtonView::SetDrawStringsFlags(int flags) { label()->SetDrawStringsFlags(flags); } -void CefMenuButtonView::ButtonPressed(views::Button* source, - const ui::Event& event) { - auto position = source->GetMenuPosition(); - cef_delegate()->OnMenuButtonPressed( - GetCefMenuButton(), CefPoint(position.x(), position.y()), - new ButtonPressedLock(static_cast(source))); +void CefMenuButtonView::ButtonPressed(const ui::Event& event) { + auto position = GetMenuPosition(); + cef_delegate()->OnMenuButtonPressed(GetCefMenuButton(), + CefPoint(position.x(), position.y()), + new ButtonPressedLock(this)); } diff --git a/libcef/browser/views/menu_button_view.h b/libcef/browser/views/menu_button_view.h index bb83f6826..27ca24e4a 100644 --- a/libcef/browser/views/menu_button_view.h +++ b/libcef/browser/views/menu_button_view.h @@ -16,9 +16,16 @@ // Extend views::LabelButton with a no-argument constructor as required by the // CefViewView template and extend views::ButtonListener as required by the // CefButtonView template. -class MenuButtonEx : public views::MenuButton, public views::ButtonListener { +class MenuButtonEx : public views::MenuButton { public: - MenuButtonEx() : views::MenuButton(this) {} + MenuButtonEx() + : views::MenuButton(base::BindRepeating( + [](MenuButtonEx* self, const ui::Event& event) { + self->ButtonPressed(event); + }, + base::Unretained(this))) {} + + virtual void ButtonPressed(const ui::Event& event) = 0; }; class CefMenuButtonView @@ -38,8 +45,8 @@ class CefMenuButtonView // Set the flags that control display of accelerator characters. void SetDrawStringsFlags(int flags); - // views::ButtonListener methods: - void ButtonPressed(views::Button* source, const ui::Event& event) override; + // MenuButtonEx methods: + void ButtonPressed(const ui::Event& event) override; private: DISALLOW_COPY_AND_ASSIGN(CefMenuButtonView); diff --git a/libcef/browser/views/window_view.cc b/libcef/browser/views/window_view.cc index 54b805b83..b650ed497 100644 --- a/libcef/browser/views/window_view.cc +++ b/libcef/browser/views/window_view.cc @@ -15,7 +15,6 @@ #if defined(OS_LINUX) && defined(USE_X11) #include "ui/base/x/x11_util.h" -#include "ui/gfx/x/x11_types.h" #endif #if defined(OS_WIN) diff --git a/libcef/common/alloy/alloy_content_client.cc b/libcef/common/alloy/alloy_content_client.cc index 8cbe490c2..095b1040b 100644 --- a/libcef/common/alloy/alloy_content_client.cc +++ b/libcef/common/alloy/alloy_content_client.cc @@ -27,7 +27,6 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/pepper_flash.h" #include "content/public/common/content_constants.h" #include "content/public/common/content_switches.h" #include "content/public/common/pepper_plugin_info.h" @@ -81,103 +80,6 @@ void ComputeBuiltInPlugins(std::vector* plugins) { } } -content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path, - const std::string& version) { - content::PepperPluginInfo plugin; - - plugin.is_out_of_process = true; - plugin.name = content::kFlashPluginName; - plugin.path = path; - plugin.permissions = kPepperFlashPermissions; - - std::vector flash_version_numbers = base::SplitString( - version, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); - if (flash_version_numbers.size() < 1) - flash_version_numbers.push_back("11"); - if (flash_version_numbers.size() < 2) - flash_version_numbers.push_back("2"); - if (flash_version_numbers.size() < 3) - flash_version_numbers.push_back("999"); - if (flash_version_numbers.size() < 4) - flash_version_numbers.push_back("999"); - // E.g., "Shockwave Flash 10.2 r154": - plugin.description = plugin.name + " " + flash_version_numbers[0] + "." + - flash_version_numbers[1] + " r" + - flash_version_numbers[2]; - plugin.version = base::JoinString(flash_version_numbers, "."); - content::WebPluginMimeType swf_mime_type(content::kFlashPluginSwfMimeType, - content::kFlashPluginSwfExtension, - content::kFlashPluginSwfDescription); - plugin.mime_types.push_back(swf_mime_type); - content::WebPluginMimeType spl_mime_type(content::kFlashPluginSplMimeType, - content::kFlashPluginSplExtension, - content::kFlashPluginSplDescription); - plugin.mime_types.push_back(spl_mime_type); - - return plugin; -} - -void AddPepperFlashFromCommandLine( - std::vector* plugins) { - const base::CommandLine::StringType flash_path = - base::CommandLine::ForCurrentProcess()->GetSwitchValueNative( - switches::kPpapiFlashPath); - if (flash_path.empty()) - return; - - // Also get the version from the command-line. Should be something like 11.2 - // or 11.2.123.45. - std::string flash_version = - base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kPpapiFlashVersion); - - plugins->push_back( - CreatePepperFlashInfo(base::FilePath(flash_path), flash_version)); -} - -bool GetSystemPepperFlash(content::PepperPluginInfo* plugin) { - base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - - if (!command_line->HasSwitch(switches::kEnableSystemFlash)) - return false; - - // Do not try and find System Pepper Flash if there is a specific path on - // the commmand-line. - if (command_line->HasSwitch(switches::kPpapiFlashPath)) - return false; - - base::FilePath flash_filename; - if (!base::PathService::Get(chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN, - &flash_filename)) { - return false; - } - - base::FilePath manifest_path( - flash_filename.DirName().AppendASCII("manifest.json")); - - std::string manifest_data; - if (!base::ReadFileToString(manifest_path, &manifest_data)) - return false; - auto json_manifest_value = - base::JSONReader::Read(manifest_data, base::JSON_ALLOW_TRAILING_COMMAS); - if (!json_manifest_value.has_value()) - return false; - std::unique_ptr manifest_value( - base::Value::ToUniquePtrValue(std::move(json_manifest_value.value()))); - if (!manifest_value.get()) - return false; - base::DictionaryValue* manifest = nullptr; - if (!manifest_value->GetAsDictionary(&manifest)) - return false; - - base::Version version; - if (!CheckPepperFlashManifest(*manifest, &version)) - return false; - - *plugin = CreatePepperFlashInfo(flash_filename, version.GetString()); - return true; -} - } // namespace const char AlloyContentClient::kPDFPluginPath[] = "internal-pdf-viewer"; @@ -188,11 +90,6 @@ AlloyContentClient::~AlloyContentClient() = default; void AlloyContentClient::AddPepperPlugins( std::vector* plugins) { ComputeBuiltInPlugins(plugins); - AddPepperFlashFromCommandLine(plugins); - - content::PepperPluginInfo plugin; - if (GetSystemPepperFlash(&plugin)) - plugins->push_back(plugin); } void AlloyContentClient::AddContentDecryptionModules( diff --git a/libcef/common/alloy/alloy_main_delegate.cc b/libcef/common/alloy/alloy_main_delegate.cc index 6e41edc47..0b8cf33a2 100644 --- a/libcef/common/alloy/alloy_main_delegate.cc +++ b/libcef/common/alloy/alloy_main_delegate.cc @@ -374,7 +374,6 @@ void AlloyMainDelegate::PreSandboxStartup() { util_mac::PreSandboxStartup(); #endif - resource_util::OverridePepperFlashSystemPluginPath(); resource_util::OverrideDefaultDownloadDir(); resource_util::OverrideUserDataDir(settings_, command_line); } diff --git a/libcef/common/cef_messages.h b/libcef/common/cef_messages.h index be8698591..82f161dd6 100644 --- a/libcef/common/cef_messages.h +++ b/libcef/common/cef_messages.h @@ -143,9 +143,11 @@ IPC_MESSAGE_ROUTED1(CefMsg_ResponseAck, int /* request_id */) // Tells the renderer that loading has stopped. IPC_MESSAGE_ROUTED0(CefMsg_DidStopLoading) -// Tells the render frame to load all blocked plugins with the given identifier. -// Based on ChromeViewMsg_LoadBlockedPlugins. -IPC_MESSAGE_ROUTED1(CefViewMsg_LoadBlockedPlugins, std::string /* identifier */) +// Notification that a move or resize of the renderer's containing window has +// started. Used on Windows and Linux with the Alloy runtime, and was +// previously handled by RenderViewHost::NotifyMoveOrResizeStarted() prior to +// that method's removal in https://crbug.com/1051648. +IPC_MESSAGE_ROUTED0(CefMsg_MoveOrResizeStarted) // Sent to child processes to add or remove a cross-origin whitelist entry. IPC_MESSAGE_CONTROL2(CefProcessMsg_ModifyCrossOriginWhitelistEntry, diff --git a/libcef/common/cef_switches.cc b/libcef/common/cef_switches.cc index 2b7507e5b..0572f6583 100644 --- a/libcef/common/cef_switches.cc +++ b/libcef/common/cef_switches.cc @@ -88,9 +88,6 @@ const char kEnableSpellingService[] = "enable-spelling-service"; // Override the default spellchecking language which comes from locales.pak. const char kOverrideSpellCheckLang[] = "override-spell-check-lang"; -// Enable detection and use of a system-wide Pepper Flash install. -const char kEnableSystemFlash[] = "enable-system-flash"; - // Disable scroll bounce (rubber-banding) on OS X Lion and newer. const char kDisableScrollBounce[] = "disable-scroll-bounce"; diff --git a/libcef/common/cef_switches.h b/libcef/common/cef_switches.h index b5f0e1bd0..a8ca0f34a 100644 --- a/libcef/common/cef_switches.h +++ b/libcef/common/cef_switches.h @@ -42,7 +42,6 @@ extern const char kEnableProfanityFilter[]; extern const char kDisableSpellChecking[]; extern const char kEnableSpellingService[]; extern const char kOverrideSpellCheckLang[]; -extern const char kEnableSystemFlash[]; extern const char kDisableScrollBounce[]; extern const char kDisablePdfExtension[]; extern const char kWidevineCdmPath[]; diff --git a/libcef/common/chrome/chrome_main_delegate_cef.cc b/libcef/common/chrome/chrome_main_delegate_cef.cc index 354871159..90ec92471 100644 --- a/libcef/common/chrome/chrome_main_delegate_cef.cc +++ b/libcef/common/chrome/chrome_main_delegate_cef.cc @@ -176,13 +176,8 @@ content::ContentBrowserClient* ChromeMainDelegateCef::CreateContentBrowserClient() { // Match the logic in the parent ChromeMainDelegate implementation, but create // our own object type. - if (chrome_content_browser_client_ == nullptr) { - DCHECK(!startup_data_); - startup_data_ = std::make_unique(); - - chrome_content_browser_client_ = - std::make_unique(startup_data_.get()); - } + chrome_content_browser_client_ = + std::make_unique(); return chrome_content_browser_client_.get(); } diff --git a/libcef/common/resource_bundle_delegate.cc b/libcef/common/resource_bundle_delegate.cc index 5ef31146d..64dce6620 100644 --- a/libcef/common/resource_bundle_delegate.cc +++ b/libcef/common/resource_bundle_delegate.cc @@ -34,6 +34,11 @@ base::RefCountedStaticMemory* CefResourceBundleDelegate::LoadDataResourceBytes( return nullptr; } +base::Optional CefResourceBundleDelegate::LoadDataResourceString( + int resource_id) { + return base::nullopt; +} + bool CefResourceBundleDelegate::GetRawDataResource( int resource_id, ui::ScaleFactor scale_factor, diff --git a/libcef/common/resource_bundle_delegate.h b/libcef/common/resource_bundle_delegate.h index 9447967b5..a96f846da 100644 --- a/libcef/common/resource_bundle_delegate.h +++ b/libcef/common/resource_bundle_delegate.h @@ -31,6 +31,7 @@ class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate { base::RefCountedStaticMemory* LoadDataResourceBytes( int resource_id, ui::ScaleFactor scale_factor) override; + base::Optional LoadDataResourceString(int resource_id) override; bool GetRawDataResource(int resource_id, ui::ScaleFactor scale_factor, base::StringPiece* value) const override; diff --git a/libcef/common/resource_util.cc b/libcef/common/resource_util.cc index 22fa2f026..77936b344 100644 --- a/libcef/common/resource_util.cc +++ b/libcef/common/resource_util.cc @@ -37,31 +37,6 @@ namespace resource_util { namespace { -#if defined(OS_WIN) - -// Gets the Flash path if installed on the system. -bool GetSystemFlashFilename(base::FilePath* out_path) { - const wchar_t kPepperFlashRegistryRoot[] = - L"SOFTWARE\\Macromedia\\FlashPlayerPepper"; - const wchar_t kFlashPlayerPathValueName[] = L"PlayerPath"; - - base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kPepperFlashRegistryRoot, - KEY_READ); - base::string16 path_str; - if (FAILED(path_key.ReadValue(kFlashPlayerPathValueName, &path_str))) - return false; - - *out_path = base::FilePath(path_str); - return true; -} - -#elif defined(OS_MAC) - -const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] = - FILE_PATH_LITERAL("Internet Plug-Ins/PepperFlashPlayer"); - -#endif - #if defined(OS_LINUX) // Based on chrome/common/chrome_paths_linux.cc. @@ -200,29 +175,6 @@ base::FilePath GetDefaultLogFilePath() { #endif // !defined(OS_MAC) -void OverridePepperFlashSystemPluginPath() { -#if defined(OS_WIN) || defined(OS_MAC) - base::FilePath plugin_filename; -#if defined(OS_WIN) - if (!GetSystemFlashFilename(&plugin_filename)) - return; -#elif defined(OS_MAC) - if (!util_mac::GetLocalLibraryDirectory(&plugin_filename)) - return; - plugin_filename = plugin_filename.Append(kPepperFlashSystemBaseDirectory) - .Append(chrome::kPepperFlashPluginFilename); -#endif // defined(OS_MAC) - - if (!plugin_filename.empty()) { - base::PathService::Override(chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN, - plugin_filename); - } -#else // !(defined(OS_WIN) || defined(OS_MAC)) - // A system plugin is not available on other platforms. - return; -#endif -} - void OverrideDefaultDownloadDir() { base::FilePath dir_default_download; base::FilePath dir_default_download_safe; diff --git a/libcef/common/resource_util.h b/libcef/common/resource_util.h index d3b269442..1275f18a5 100644 --- a/libcef/common/resource_util.h +++ b/libcef/common/resource_util.h @@ -25,7 +25,6 @@ base::FilePath GetResourcesDir(); base::FilePath GetDefaultLogFilePath(); // Called from MainDelegate::PreSandboxStartup. -void OverridePepperFlashSystemPluginPath(); void OverrideDefaultDownloadDir(); void OverrideUserDataDir(CefSettings* settings, const base::CommandLine* command_line); diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.cc b/libcef/renderer/alloy/alloy_content_renderer_client.cc index 5e50d08a1..87c6d8230 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.cc +++ b/libcef/renderer/alloy/alloy_content_renderer_client.cc @@ -74,7 +74,6 @@ #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" #include "content/public/common/url_constants.h" -#include "content/public/renderer/plugin_instance_throttler.h" #include "content/public/renderer/render_view.h" #include "content/public/renderer/render_view_visitor.h" #include "content/renderer/render_widget.h" @@ -499,11 +498,8 @@ AlloyContentRendererClient::CreateURLLoaderThrottleProvider( return std::make_unique(provider_type); } -bool AlloyContentRendererClient::RequiresWebComponentsV0(const GURL& url) { - // TODO(1025782): For now, file:// URLs are allowed to access Web Components - // v0 features. This will be removed once origin trials support file:// URLs - // for this purpose. - return url.SchemeIs(content::kChromeUIScheme) || url.SchemeIs("file"); +bool AlloyContentRendererClient::RequiresHtmlImports(const GURL& url) { + return url.SchemeIs(content::kChromeUIScheme); } void AlloyContentRendererClient::GetInterface( diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.h b/libcef/renderer/alloy/alloy_content_renderer_client.h index ad22d8f72..4b272af1e 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.h +++ b/libcef/renderer/alloy/alloy_content_renderer_client.h @@ -108,7 +108,7 @@ class AlloyContentRendererClient std::unique_ptr CreateURLLoaderThrottleProvider( content::URLLoaderThrottleProviderType provider_type) override; - bool RequiresWebComponentsV0(const GURL& url) override; + bool RequiresHtmlImports(const GURL& url) override; // service_manager::LocalInterfaceProvider implementation. void GetInterface(const std::string& name, diff --git a/libcef/renderer/blink_glue.cc b/libcef/renderer/blink_glue.cc index 29812101d..6d7b8faa7 100644 --- a/libcef/renderer/blink_glue.cc +++ b/libcef/renderer/blink_glue.cc @@ -6,6 +6,7 @@ #include "libcef/renderer/blink_glue.h" #include "third_party/blink/public/mojom/v8_cache_options.mojom-blink.h" +#include "third_party/blink/public/platform/scheduler/web_resource_loading_task_runner_handle.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_url_response.h" #include "third_party/blink/public/web/web_document.h" @@ -32,6 +33,7 @@ #include "third_party/blink/renderer/platform/bindings/v8_binding.h" #include "third_party/blink/renderer/platform/loader/fetch/resource_response.h" #include "third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h" +#include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h" #include "third_party/blink/renderer/platform/weborigin/scheme_registry.h" #undef LOG @@ -245,4 +247,23 @@ bool HasPluginFrameOwner(blink::WebLocalFrame* frame) { return core_frame->Owner() && core_frame->Owner()->IsPlugin(); } +BLINK_EXPORT +std::unique_ptr +CreateResourceLoadingTaskRunnerHandle(blink::WebLocalFrame* frame) { + blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*frame); + return blink::To(core_frame) + ->GetFrameScheduler() + ->CreateResourceLoadingTaskRunnerHandle(); +} + +BLINK_EXPORT +std::unique_ptr +CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle( + blink::WebLocalFrame* frame) { + blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*frame); + return blink::To(core_frame) + ->GetFrameScheduler() + ->CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle(); +} + } // namespace blink_glue diff --git a/libcef/renderer/blink_glue.h b/libcef/renderer/blink_glue.h index dd15d7a0d..14fa54a37 100644 --- a/libcef/renderer/blink_glue.h +++ b/libcef/renderer/blink_glue.h @@ -24,6 +24,10 @@ class WebNode; class WebString; class WebURLResponse; class WebView; + +namespace scheduler { +class WebResourceLoadingTaskRunnerHandle; +} } // namespace blink namespace blink_glue { @@ -89,6 +93,15 @@ BLINK_EXPORT bool ResponseWasCached(const blink::WebURLResponse& response); // Returns true if the frame owner is a plugin. BLINK_EXPORT bool HasPluginFrameOwner(blink::WebLocalFrame* frame); +// Used by CefFrameImpl::CreateURLLoader. +BLINK_EXPORT +std::unique_ptr +CreateResourceLoadingTaskRunnerHandle(blink::WebLocalFrame* frame); +BLINK_EXPORT +std::unique_ptr +CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle( + blink::WebLocalFrame* frame); + } // namespace blink_glue #endif // CEF_LIBCEF_RENDERER_BLINK_GLUE_H_ diff --git a/libcef/renderer/browser_impl.h b/libcef/renderer/browser_impl.h index 99d343c77..23d9fb327 100644 --- a/libcef/renderer/browser_impl.h +++ b/libcef/renderer/browser_impl.h @@ -77,9 +77,6 @@ class CefBrowserImpl : public CefBrowser, public content::RenderViewObserver { int browser_id() const { return browser_id_; } bool is_popup() const { return is_popup_; } bool is_windowless() const { return is_windowless_; } - content::RenderView* render_view() const { - return content::RenderViewObserver::render_view(); - } // RenderViewObserver methods. void OnDestruct() override; diff --git a/libcef/renderer/frame_impl.cc b/libcef/renderer/frame_impl.cc index e382786cd..c5b87f75b 100644 --- a/libcef/renderer/frame_impl.cc +++ b/libcef/renderer/frame_impl.cc @@ -286,15 +286,36 @@ void CefFrameImpl::SendProcessMessage(CefProcessId target_process, } } -blink::WebURLLoaderFactory* CefFrameImpl::GetURLLoaderFactory() { +std::unique_ptr CefFrameImpl::CreateURLLoader() { CEF_REQUIRE_RT(); - if (!url_loader_factory_ && frame_) { + if (!frame_) + return nullptr; + + if (!url_loader_factory_) { auto render_frame = content::RenderFrameImpl::FromWebFrame(frame_); if (render_frame) { url_loader_factory_ = render_frame->CreateURLLoaderFactory(); } } - return url_loader_factory_.get(); + if (!url_loader_factory_) + return nullptr; + + return url_loader_factory_->CreateURLLoader( + blink::WebURLRequest(), + blink_glue::CreateResourceLoadingTaskRunnerHandle(frame_), + blink_glue::CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle( + frame_)); +} + +std::unique_ptr +CefFrameImpl::CreateResourceLoadInfoNotifierWrapper() { + CEF_REQUIRE_RT(); + if (frame_) { + auto render_frame = content::RenderFrameImpl::FromWebFrame(frame_); + if (render_frame) + return render_frame->CreateResourceLoadInfoNotifierWrapper(); + } + return nullptr; } void CefFrameImpl::OnAttached() { @@ -309,6 +330,7 @@ bool CefFrameImpl::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(CefMsg_ResponseAck, OnResponseAck) IPC_MESSAGE_HANDLER(CefMsg_LoadRequest, OnLoadRequest) IPC_MESSAGE_HANDLER(CefMsg_DidStopLoading, OnDidStopLoading) + IPC_MESSAGE_HANDLER(CefMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -507,6 +529,14 @@ void CefFrameImpl::OnDidStopLoading() { browser_->OnLoadingStateChange(false); } +void CefFrameImpl::OnMoveOrResizeStarted() { + if (frame_) { + auto web_view = frame_->View(); + if (web_view) + web_view->CancelPagePopup(); + } +} + void CefFrameImpl::OnLoadRequest(const CefMsg_LoadRequest_Params& params) { DCHECK(frame_); diff --git a/libcef/renderer/frame_impl.h b/libcef/renderer/frame_impl.h index 3859beb6e..f587e0340 100644 --- a/libcef/renderer/frame_impl.h +++ b/libcef/renderer/frame_impl.h @@ -15,7 +15,9 @@ class ListValue; } namespace blink { +class ResourceLoadInfoNotifierWrapper; class WebLocalFrame; +class WebURLLoader; class WebURLLoaderFactory; } // namespace blink @@ -74,7 +76,9 @@ class CefFrameImpl : public CefFrame { CefRefPtr message) override; // Used by CefRenderURLRequest. - blink::WebURLLoaderFactory* GetURLLoaderFactory(); + std::unique_ptr CreateURLLoader(); + std::unique_ptr + CreateResourceLoadInfoNotifierWrapper(); // Forwarded from CefRenderFrameObserver. void OnAttached(); @@ -102,6 +106,7 @@ class CefFrameImpl : public CefFrame { void OnResponse(const Cef_Response_Params& params); void OnResponseAck(int request_id); void OnDidStopLoading(); + void OnMoveOrResizeStarted(); void OnLoadRequest(const CefMsg_LoadRequest_Params& params); CefBrowserImpl* browser_; diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index 364a68097..9c79e83be 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -8,22 +8,23 @@ #include "libcef/common/request_impl.h" #include "libcef/common/response_impl.h" -#include "libcef/common/task_runner_impl.h" #include "libcef/renderer/blink_glue.h" #include "libcef/renderer/frame_impl.h" +#include "libcef/renderer/thread_util.h" #include "base/logging.h" #include "net/base/request_priority.h" #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h" #include "third_party/blink/public/mojom/loader/resource_load_info.mojom.h" +#include "third_party/blink/public/platform/resource_load_info_notifier_wrapper.h" #include "third_party/blink/public/platform/web_security_origin.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_url.h" #include "third_party/blink/public/platform/web_url_error.h" #include "third_party/blink/public/platform/web_url_loader.h" #include "third_party/blink/public/platform/web_url_loader_client.h" -#include "third_party/blink/public/platform/web_url_loader_factory.h" #include "third_party/blink/public/platform/web_url_request.h" +#include "third_party/blink/public/platform/web_url_request_extra_data.h" #include "third_party/blink/public/platform/web_url_response.h" using blink::WebString; @@ -87,7 +88,6 @@ class CefRenderURLRequest::Context frame_(frame), request_(request), client_(client), - task_runner_(CefTaskRunnerImpl::GetCurrentTaskRunner()), status_(UR_IO_PENDING), error_code_(ERR_NONE), body_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL), @@ -100,13 +100,7 @@ class CefRenderURLRequest::Context static_cast(request_.get())->SetReadOnly(true); } - inline bool CalledOnValidThread() { - return task_runner_->RunsTasksInCurrentSequence(); - } - bool Start() { - DCHECK(CalledOnValidThread()); - GURL url = GURL(request_->GetURL().ToString()); if (!url.is_valid()) return false; @@ -148,30 +142,17 @@ class CefRenderURLRequest::Context } } - blink::WebURLLoaderFactory* factory = nullptr; - if (frame_) { - // This factory supports all requests. - factory = static_cast(frame_.get())->GetURLLoaderFactory(); - } - if (!factory) { - // Global requests are not supported. - return false; - } - - loader_ = factory->CreateURLLoader( - blink::WebURLRequest(), - blink::scheduler::WebResourceLoadingTaskRunnerHandle:: - CreateUnprioritized(task_runner_.get())); + auto frame_impl = static_cast(frame_.get()); + loader_ = frame_impl->CreateURLLoader(); loader_->LoadAsynchronously( - std::move(resource_request), nullptr /* extra_data */, - 0 /* requestor_id */, false /* download_to_network_cache_only */, - false /* no_mime_sniffing */, url_client_.get()); + std::move(resource_request), /*extra_data=*/nullptr, + /*requestor_id=*/0, + /*no_mime_sniffing=*/false, + frame_impl->CreateResourceLoadInfoNotifierWrapper(), url_client_.get()); return true; } void Cancel() { - DCHECK(CalledOnValidThread()); - // The request may already be complete. if (!loader_.get() || status_ != UR_IO_PENDING) return; @@ -185,8 +166,6 @@ class CefRenderURLRequest::Context void OnStopRedirect(const WebURL& redirect_url, const WebURLResponse& response) { - DCHECK(CalledOnValidThread()); - response_was_cached_ = blink_glue::ResponseWasCached(response); response_ = CefResponse::Create(); CefResponseImpl* responseImpl = @@ -206,8 +185,6 @@ class CefRenderURLRequest::Context } void OnResponse(const WebURLResponse& response) { - DCHECK(CalledOnValidThread()); - response_was_cached_ = blink_glue::ResponseWasCached(response); response_ = CefResponse::Create(); CefResponseImpl* responseImpl = @@ -219,8 +196,6 @@ class CefRenderURLRequest::Context } void OnError(const WebURLError& error) { - DCHECK(CalledOnValidThread()); - if (status_ == UR_IO_PENDING) { status_ = UR_FAILED; error_code_ = static_cast(error.reason()); @@ -230,8 +205,6 @@ class CefRenderURLRequest::Context } void OnComplete() { - DCHECK(CalledOnValidThread()); - if (body_handle_.is_valid()) { return; } @@ -292,7 +265,6 @@ class CefRenderURLRequest::Context void OnStartLoadingResponseBody( mojo::ScopedDataPipeConsumerHandle response_body) { - DCHECK(CalledOnValidThread()); DCHECK(response_body); DCHECK(!body_handle_); body_handle_ = std::move(response_body); @@ -307,7 +279,6 @@ class CefRenderURLRequest::Context } void OnDownloadProgress(int64_t current) { - DCHECK(CalledOnValidThread()); DCHECK(url_request_.get()); NotifyUploadProgressIfNecessary(); @@ -318,13 +289,11 @@ class CefRenderURLRequest::Context } void OnDownloadData(const char* data, int dataLength) { - DCHECK(CalledOnValidThread()); DCHECK(url_request_.get()); client_->OnDownloadData(url_request_.get(), data, dataLength); } void OnUploadProgress(int64_t current, int64_t total) { - DCHECK(CalledOnValidThread()); DCHECK(url_request_.get()); if (current == total) got_upload_progress_complete_ = true; @@ -358,7 +327,6 @@ class CefRenderURLRequest::Context CefRefPtr frame_; CefRefPtr request_; CefRefPtr client_; - scoped_refptr task_runner_; CefURLRequest::Status status_; CefURLRequest::ErrorCode error_code_; CefRefPtr response_; @@ -503,7 +471,7 @@ void CefRenderURLRequest::Cancel() { bool CefRenderURLRequest::VerifyContext() { DCHECK(context_.get()); - if (!context_->CalledOnValidThread()) { + if (!CEF_CURRENTLY_ON_RT()) { NOTREACHED() << "called on invalid thread"; return false; } diff --git a/libcef/resources/about_version.html b/libcef/resources/about_version.html index 873957512..024755f31 100644 --- a/libcef/resources/about_version.html +++ b/libcef/resources/about_version.html @@ -95,9 +95,6 @@ body { JavaScript $$JAVASCRIPT$$ - - Flash - $$FLASH$$ User Agent diff --git a/libcef_dll/base/cef_callback_helpers.cc b/libcef_dll/base/cef_callback_helpers.cc deleted file mode 100644 index 624e50933..000000000 --- a/libcef_dll/base/cef_callback_helpers.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/cef_callback_helpers.h" - -#include "include/base/cef_callback.h" - -namespace base { - -ScopedClosureRunner::ScopedClosureRunner() {} - -ScopedClosureRunner::ScopedClosureRunner(const Closure& closure) - : closure_(closure) {} - -ScopedClosureRunner::~ScopedClosureRunner() { - if (!closure_.is_null()) - closure_.Run(); -} - -void ScopedClosureRunner::Reset() { - Closure old_closure = Release(); - if (!old_closure.is_null()) - old_closure.Run(); -} - -void ScopedClosureRunner::Reset(const Closure& closure) { - Closure old_closure = Release(); - closure_ = closure; - if (!old_closure.is_null()) - old_closure.Run(); -} - -Closure ScopedClosureRunner::Release() { - Closure result = closure_; - closure_.Reset(); - return result; -} - -} // namespace base diff --git a/patch/patch.cfg b/patch/patch.cfg index 6fa9cf0b6..fc048aa7e 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -130,11 +130,6 @@ patches = [ # https://codereview.chromium.org/208313009 'name': 'ui_dragdrop_355390', }, - { - # Remove NOTREACHED() that is hit when loading Flash in incognito mode. - # https://bitbucket.org/chromiumembedded/cef/issue/1586 - 'name': 'content_pepper_flash_1586', - }, { # Fix placement of IME window on Windows. # https://bitbucket.org/chromiumembedded/cef/issue/1610 @@ -520,14 +515,14 @@ patches = [ # https://bugs.chromium.org/p/chromium/issues/detail?id=1123388 'name': 'chrome_browser_sharesheet_1123388', }, - { - # Windows/Linux: Fix scrolling in popup lists with high-dpi. - # https://crrev.com/97514ca869 - 'name': 'webkit_widget_base_2444320', - }, { # Linux: Fix ATK assertion error when generating ARM build config. # https://bugs.chromium.org/p/chromium/issues/detail?id=1123214 'name': 'linux_atk_1123214', + }, + { + # Fix crash in MimeHandlerViewEmbedder::DidFinishNavigation. + # https://bugs.chromium.org/p/chromium/issues/detail?id=1133115#c11 + 'name': 'mime_handler_view_embedder_1133115', } ] diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index e0ae53623..1f8f6fb0e 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,5 +1,5 @@ diff --git base/BUILD.gn base/BUILD.gn -index 1d449b35bf40..0b859084ba1c 100644 +index 9d0250c77571..100fc4b9d860 100644 --- base/BUILD.gn +++ base/BUILD.gn @@ -33,6 +33,7 @@ import("//build/config/ui.gni") @@ -10,7 +10,7 @@ index 1d449b35bf40..0b859084ba1c 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") import("//third_party/icu/config.gni") -@@ -1646,7 +1647,11 @@ component("base") { +@@ -1655,7 +1656,11 @@ component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -23,7 +23,7 @@ index 1d449b35bf40..0b859084ba1c 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -1841,6 +1846,12 @@ component("base") { +@@ -1858,6 +1863,12 @@ component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } diff --git a/patch/patches/browser_compositor_mac.patch b/patch/patches/browser_compositor_mac.patch index 1e5cd6930..f6ccd5993 100644 --- a/patch/patches/browser_compositor_mac.patch +++ b/patch/patches/browser_compositor_mac.patch @@ -12,7 +12,7 @@ index 202bd7aa0d57..20067b203d96 100644 // Force a new surface id to be allocated. Returns true if the // RenderWidgetHostImpl sent the resulting surface id to the renderer. diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm -index c9885b773743..dbd06e177d96 100644 +index a82ed2d5bbcd..59fabfcdfff7 100644 --- content/browser/renderer_host/browser_compositor_view_mac.mm +++ content/browser/renderer_host/browser_compositor_view_mac.mm @@ -86,6 +86,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() { diff --git a/patch/patches/browser_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index 1cdbfd884..93465c6d3 100644 --- a/patch/patches/browser_security_policy_1081397.patch +++ b/patch/patches/browser_security_policy_1081397.patch @@ -1,21 +1,21 @@ diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc -index dfa87d00c03b..d04b6dd692dd 100644 +index fed61eb62d74..af8ae804c1ff 100644 --- content/browser/child_process_security_policy_impl.cc +++ content/browser/child_process_security_policy_impl.cc -@@ -1680,6 +1680,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin( - // DeclarativeApiTest.PersistRules. - if (actual_process_lock.matches_scheme(url::kDataScheme)) - return true; +@@ -1704,6 +1704,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin( + // DeclarativeApiTest.PersistRules. + if (actual_process_lock.matches_scheme(url::kDataScheme)) + return true; + -+ // Allow other schemes that are non-standard, non-local and WebSafe. -+ if (lock_url.is_valid() && -+ !lock_url.IsStandard() && -+ !base::Contains(url::GetLocalSchemes(), -+ lock_url.scheme_piece()) && -+ base::Contains(schemes_okay_to_request_in_any_process_, -+ lock_url.scheme_piece())) { -+ return true; -+ } - } ++ // Allow other schemes that are non-standard, non-local and WebSafe. ++ if (lock_url.is_valid() && ++ !lock_url.IsStandard() && ++ !base::Contains(url::GetLocalSchemes(), ++ lock_url.scheme_piece()) && ++ base::Contains(schemes_okay_to_request_in_any_process_, ++ lock_url.scheme_piece())) { ++ return true; ++ } + } - // TODO(wjmaclean): We should update the ProcessLock comparison API to + // TODO(wjmaclean): We should update the ProcessLock comparison API diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 712b31fe0..8019fc114 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,8 +1,8 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index 4f6461b6b5f5..58bb48800898 100644 +index 9d66490cdb55..1e4a14311524 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -1766,8 +1766,6 @@ config("thin_archive") { +@@ -1765,8 +1765,6 @@ config("thin_archive") { # archive names to 16 characters, which is not what we want). if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) { arflags = [ "-T" ] diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index ace1aff32..b6987c8f9 100644 --- a/patch/patches/chrome_browser.patch +++ b/patch/patches/chrome_browser.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn -index e462f7d8bef1..6c1c686f161c 100644 +index 16bd4c2717ee..65e309d23866 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -12,6 +12,7 @@ import("//build/config/crypto.gni") @@ -10,15 +10,15 @@ index e462f7d8bef1..6c1c686f161c 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/common/features.gni") -@@ -1876,6 +1877,7 @@ static_library("browser") { - "//build:branding_buildflags", +@@ -1912,6 +1913,7 @@ static_library("browser") { "//build:chromeos_buildflags", + "//build/config/compiler:compiler_buildflags", "//cc", + "//cef/libcef/features", "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2354,6 +2356,10 @@ static_library("browser") { +@@ -2424,6 +2426,10 @@ static_library("browser") { ] } @@ -29,7 +29,7 @@ index e462f7d8bef1..6c1c686f161c 100644 if (is_android) { sources += [ "after_startup_task_utils_android.cc", -@@ -4821,7 +4827,7 @@ static_library("browser") { +@@ -4975,7 +4981,7 @@ static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_background_mode_1100085.patch b/patch/patches/chrome_browser_background_mode_1100085.patch index 908a1cf52..6df983453 100644 --- a/patch/patches/chrome_browser_background_mode_1100085.patch +++ b/patch/patches/chrome_browser_background_mode_1100085.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/app_controller_mac.mm chrome/browser/app_controller_mac.mm -index ce66d73e0fa4..cc62e05ba3ba 100644 +index 189055ae0abb..f12df6cab7a8 100644 --- chrome/browser/app_controller_mac.mm +++ chrome/browser/app_controller_mac.mm -@@ -1141,6 +1141,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; +@@ -1144,6 +1144,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; // Run a (background) application in a new tab. - (void)executeApplication:(id)sender { @@ -10,7 +10,7 @@ index ce66d73e0fa4..cc62e05ba3ba 100644 NSInteger tag = [sender tag]; Profile* profile = [self lastProfile]; DCHECK(profile); -@@ -1149,6 +1150,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; +@@ -1152,6 +1153,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; tag < static_cast(applications.size())); const extensions::Extension* extension = applications.GetExtension(tag); BackgroundModeManager::LaunchBackgroundApplication(profile, extension); @@ -18,7 +18,7 @@ index ce66d73e0fa4..cc62e05ba3ba 100644 } // Same as |-commandDispatch:|, but executes commands using a disposition -@@ -1530,6 +1532,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; +@@ -1549,6 +1551,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; // TODO(rickcam): Mock out BackgroundApplicationListModel, then add unit // tests which use the mock in place of the profile-initialized model. @@ -26,7 +26,7 @@ index ce66d73e0fa4..cc62e05ba3ba 100644 // Avoid breaking unit tests which have no profile. if (profile) { BackgroundApplicationListModel applications(profile); -@@ -1556,6 +1559,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; +@@ -1575,6 +1578,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; } } } @@ -35,10 +35,10 @@ index ce66d73e0fa4..cc62e05ba3ba 100644 return dockMenu; } diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h -index b6fe1fee2cbb..84a75c6070d6 100644 +index ee9693ce0bf9..29c6bfa6baa1 100644 --- chrome/browser/browser_process.h +++ chrome/browser/browser_process.h -@@ -202,10 +202,12 @@ class BrowserProcess { +@@ -206,10 +206,12 @@ class BrowserProcess { virtual DownloadStatusUpdater* download_status_updater() = 0; virtual DownloadRequestLimiter* download_request_limiter() = 0; @@ -52,10 +52,10 @@ index b6fe1fee2cbb..84a75c6070d6 100644 // Returns the StatusTray, which provides an API for displaying status icons // in the system status tray. Returns NULL if status icons are not supported diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index 443348c2de00..7486628a9912 100644 +index cfa6979b9fb5..e4f584d1e549 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc -@@ -951,24 +951,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { +@@ -959,24 +959,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { return download_request_limiter_.get(); } @@ -83,10 +83,10 @@ index 443348c2de00..7486628a9912 100644 StatusTray* BrowserProcessImpl::status_tray() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h -index 8a8d8a820690..c06d97c65ec2 100644 +index e63afefc769d..afa0e2e59326 100644 --- chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h -@@ -163,9 +163,11 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -165,9 +165,11 @@ class BrowserProcessImpl : public BrowserProcess, void SetApplicationLocale(const std::string& actual_locale) override; DownloadStatusUpdater* download_status_updater() override; DownloadRequestLimiter* download_request_limiter() override; @@ -118,7 +118,7 @@ index 845abd9ea9ab..29a5cfb36448 100644 // Make a copy of the BrowserList to simplify the case where we need to // destroy a Browser during the loop. diff --git chrome/browser/sessions/session_service.cc chrome/browser/sessions/session_service.cc -index 1ed498e97be4..56e56b4d765a 100644 +index 3ccad0af51e7..370475e9f5ff 100644 --- chrome/browser/sessions/session_service.cc +++ chrome/browser/sessions/session_service.cc @@ -954,12 +954,19 @@ void SessionService::MaybeDeleteSessionOnlyData() { diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index 4cee4c2d6..9bf2c0af1 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/browser_about_handler.cc chrome/browser/browser_about_handler.cc -index af2282034336..c49d920f73b5 100644 +index ba0c5c3fc044..b4df9af95ecd 100644 --- chrome/browser/browser_about_handler.cc +++ chrome/browser/browser_about_handler.cc -@@ -95,6 +95,9 @@ bool HandleNonNavigationAboutURL(const GURL& url) { +@@ -70,6 +70,9 @@ bool HandleNonNavigationAboutURL(const GURL& url) { FROM_HERE, base::BindOnce(&chrome::AttemptExit)); return true; } @@ -13,10 +13,10 @@ index af2282034336..c49d920f73b5 100644 return false; } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index 24954ee7e0e8..2b883c5316c6 100644 +index 2c9d816e1aff..a07928ddc18c 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc -@@ -257,6 +257,20 @@ +@@ -255,6 +255,20 @@ #include "components/captive_portal/content/captive_portal_tab_helper.h" #endif @@ -37,9 +37,9 @@ index 24954ee7e0e8..2b883c5316c6 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_browser_window_helper.h" #endif -@@ -474,6 +488,13 @@ Browser::Browser(const CreateParams& params) - - CHECK(CanCreateBrowserForProfile(profile_)); +@@ -477,6 +491,13 @@ Browser::Browser(const CreateParams& params) + { + tab_strip_model_->AddObserver(this); +#if BUILDFLAG(ENABLE_CEF) + if (cef::IsChromeRuntimeEnabled()) { @@ -48,10 +48,10 @@ index 24954ee7e0e8..2b883c5316c6 100644 + } +#endif + - tab_strip_model_->AddObserver(this); - location_bar_model_ = std::make_unique( -@@ -1346,6 +1367,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( + location_bar_model_delegate_.get(), content::kMaxURLDisplayChars); + +@@ -1335,6 +1356,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( if (exclusive_access_manager_->HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -66,7 +66,7 @@ index 24954ee7e0e8..2b883c5316c6 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1353,8 +1382,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1342,8 +1371,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -87,7 +87,7 @@ index 24954ee7e0e8..2b883c5316c6 100644 } bool Browser::TabsNeedBeforeUnloadFired() { -@@ -1609,6 +1648,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, +@@ -1572,6 +1611,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, return window->OpenURLFromTab(source, params); } @@ -102,7 +102,7 @@ index 24954ee7e0e8..2b883c5316c6 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -1721,6 +1768,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -1684,6 +1731,8 @@ void Browser::LoadingStateChanged(WebContents* source, bool to_different_document) { ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); UpdateWindowForLoadingStateChanged(source, to_different_document); @@ -111,7 +111,7 @@ index 24954ee7e0e8..2b883c5316c6 100644 } void Browser::CloseContents(WebContents* source) { -@@ -1748,6 +1797,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -1711,6 +1760,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -120,7 +120,7 @@ index 24954ee7e0e8..2b883c5316c6 100644 if (!GetStatusBubble()) return; -@@ -1755,6 +1806,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -1718,6 +1769,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { GetStatusBubble()->SetURL(url); } @@ -138,7 +138,7 @@ index 24954ee7e0e8..2b883c5316c6 100644 void Browser::ContentsMouseEvent(WebContents* source, bool motion, bool exited) { -@@ -1871,6 +1933,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, +@@ -1834,6 +1896,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, // Make the tab show up in the task manager. task_manager::WebContentsTags::CreateForTabContents(new_contents); @@ -149,7 +149,7 @@ index 24954ee7e0e8..2b883c5316c6 100644 } void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) { -@@ -1907,6 +1973,8 @@ void Browser::RendererResponsive( +@@ -1870,6 +1936,8 @@ void Browser::RendererResponsive( void Browser::DidNavigateMainFramePostCommit(WebContents* web_contents) { if (web_contents == tab_strip_model_->GetActiveWebContents()) UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); @@ -158,7 +158,7 @@ index 24954ee7e0e8..2b883c5316c6 100644 } content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager( -@@ -1957,11 +2025,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -1916,11 +1984,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -174,7 +174,7 @@ index 24954ee7e0e8..2b883c5316c6 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2822,6 +2894,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { +@@ -2814,6 +2886,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { content_translate_driver->RemoveObserver(this); BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); } @@ -184,7 +184,7 @@ index 24954ee7e0e8..2b883c5316c6 100644 void Browser::CloseFrame() { diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h -index c67b79ec647a..532bb064b080 100644 +index afd852999cd7..a2d2df4838f7 100644 --- chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h @@ -21,6 +21,7 @@ @@ -206,7 +206,7 @@ index c67b79ec647a..532bb064b080 100644 #if defined(OS_ANDROID) #error This file should only be included on desktop. #endif -@@ -247,6 +252,11 @@ class Browser : public TabStripModelObserver, +@@ -259,6 +264,11 @@ class Browser : public TabStripModelObserver, // User-set title of this browser window, if there is one. std::string user_title; @@ -218,7 +218,7 @@ index c67b79ec647a..532bb064b080 100644 private: friend class Browser; friend class WindowSizerChromeOSTest; -@@ -365,6 +375,12 @@ class Browser : public TabStripModelObserver, +@@ -377,6 +387,12 @@ class Browser : public TabStripModelObserver, return &signin_view_controller_; } @@ -231,7 +231,7 @@ index c67b79ec647a..532bb064b080 100644 // Get the FindBarController for this browser, creating it if it does not // yet exist. FindBarController* GetFindBarController(); -@@ -755,6 +771,11 @@ class Browser : public TabStripModelObserver, +@@ -762,6 +778,11 @@ class Browser : public TabStripModelObserver, void SetContentsBounds(content::WebContents* source, const gfx::Rect& bounds) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override; @@ -243,7 +243,7 @@ index c67b79ec647a..532bb064b080 100644 void ContentsMouseEvent(content::WebContents* source, bool motion, bool exited) override; -@@ -1221,6 +1242,10 @@ class Browser : public TabStripModelObserver, +@@ -1229,6 +1250,10 @@ class Browser : public TabStripModelObserver, extension_browser_window_helper_; #endif @@ -255,7 +255,7 @@ index c67b79ec647a..532bb064b080 100644 // Stores the list of browser windows showing via a menu. diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc -index 675dae9023fe..770a85a45f8f 100644 +index 9e3369185322..95abb6f37561 100644 --- chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc @@ -435,6 +435,13 @@ std::unique_ptr CreateTargetContents( @@ -273,7 +273,7 @@ index 675dae9023fe..770a85a45f8f 100644 // tab helpers, so the entire set of tab helpers needs to be set up // immediately. diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc -index f5134591c3dd..8d0211b43791 100644 +index 6f917199c655..bf7802b8d707 100644 --- chrome/browser/ui/browser_tabstrip.cc +++ chrome/browser/ui/browser_tabstrip.cc @@ -30,9 +30,13 @@ void AddTabAt(Browser* browser, diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index 7ab135220..8b6209760 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc -index f3b51e20cb9c..b479022f1d3b 100644 +index cf62b79358e1..4fe90fde38ff 100644 --- chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc @@ -8,6 +8,7 @@ @@ -7,10 +7,10 @@ index f3b51e20cb9c..b479022f1d3b 100644 #include "base/feature_list.h" #include "build/buildflag.h" +#include "cef/libcef/features/runtime.h" + #include "chrome/browser/content_settings/one_time_geolocation_permission_provider.h" #include "chrome/browser/profiles/off_the_record_profile_impl.h" #include "chrome/browser/profiles/profile.h" - #include "chrome/browser/search_engines/template_url_service_factory.h" -@@ -20,6 +21,10 @@ +@@ -21,6 +22,10 @@ #include "extensions/buildflags/buildflags.h" #include "ui/webui/webui_allowlist_provider.h" @@ -21,7 +21,7 @@ index f3b51e20cb9c..b479022f1d3b 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_service.h" #include "extensions/browser/extension_system.h" -@@ -48,8 +53,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() +@@ -49,8 +54,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() DependsOn(SupervisedUserSettingsServiceFactory::GetInstance()); #endif #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -36,8 +36,8 @@ index f3b51e20cb9c..b479022f1d3b 100644 #endif } -@@ -97,10 +108,16 @@ scoped_refptr - std::move(allowlist_provider)); +@@ -108,10 +119,16 @@ scoped_refptr + } #if BUILDFLAG(ENABLE_EXTENSIONS) +#if BUILDFLAG(ENABLE_CEF) @@ -54,7 +54,7 @@ index f3b51e20cb9c..b479022f1d3b 100644 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) SupervisedUserSettingsService* supervised_service = diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc -index 20ae512af806..e03946e7ce80 100644 +index c932b27c6ab2..862c2205d12c 100644 --- components/content_settings/renderer/content_settings_agent_impl.cc +++ components/content_settings/renderer/content_settings_agent_impl.cc @@ -176,7 +176,7 @@ ContentSetting GetContentSettingFromRulesImpl( diff --git a/patch/patches/chrome_browser_net_export.patch b/patch/patches/chrome_browser_net_export.patch index d29155f91..dd4899ce2 100644 --- a/patch/patches/chrome_browser_net_export.patch +++ b/patch/patches/chrome_browser_net_export.patch @@ -1,16 +1,16 @@ diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index bf4ca6cdccc4..1b9607765313 100644 +index d4de7dc10b2a..f5b030de54f0 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn -@@ -10,6 +10,7 @@ import("//build/config/crypto.gni") - import("//build/config/features.gni") +@@ -11,6 +11,7 @@ import("//build/config/features.gni") import("//build/config/linux/gtk/gtk.gni") + import("//build/config/ozone.gni") import("//build/config/ui.gni") +import("//cef/libcef/features/features.gni") import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/assistant/assistant.gni") -@@ -330,6 +331,10 @@ static_library("ui") { +@@ -323,6 +324,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -21,7 +21,7 @@ index bf4ca6cdccc4..1b9607765313 100644 # Since browser and browser_ui actually depend on each other, # we must omit the dependency from browser_ui to browser. # However, this means browser_ui and browser should more or less -@@ -351,6 +356,7 @@ static_library("ui") { +@@ -344,6 +349,7 @@ static_library("ui") { "//base/allocator:buildflags", "//build:branding_buildflags", "//cc/paint", @@ -29,15 +29,15 @@ index bf4ca6cdccc4..1b9607765313 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -1525,6 +1531,7 @@ static_library("ui") { +@@ -1531,6 +1537,7 @@ static_library("ui") { "//components/page_load_metrics/browser", "//components/performance_manager:site_data_proto", "//components/printing/browser", + "//components/printing/common:mojo_interfaces", "//components/profile_metrics", - "//components/safety_check", - "//components/search_provider_logos", -@@ -3243,7 +3250,9 @@ static_library("ui") { + "//components/reading_list/features:flags", + "//components/safe_browsing/core/common:safe_browsing_policy_handler", +@@ -3299,7 +3306,9 @@ static_library("ui") { "views/frame/browser_desktop_window_tree_host_platform.h", ] } @@ -46,7 +46,7 @@ index bf4ca6cdccc4..1b9607765313 100644 + sources += [ "views/frame/native_browser_frame_factory_ozone.cc" ] + } } - if (is_desktop_linux) { + if (is_linux) { sources += [ diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc index f27414c41891..5ff3bfa8f724 100644 diff --git a/patch/patches/chrome_browser_product_override.patch b/patch/patches/chrome_browser_product_override.patch index c0de47a8c..ae604cfb5 100644 --- a/patch/patches/chrome_browser_product_override.patch +++ b/patch/patches/chrome_browser_product_override.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index c5c7a662232d..c1d9e8c5434d 100644 +index 957a3e09113f..1d8a5bdac349 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc -@@ -1035,10 +1035,6 @@ void LaunchURL(const GURL& url, +@@ -1052,10 +1052,6 @@ void LaunchURL(const GURL& url, } } @@ -13,7 +13,7 @@ index c5c7a662232d..c1d9e8c5434d 100644 void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) { // |allowlist| combines pref/policy + cmdline switch in the browser process. // For renderer and utility (e.g. NetworkService) processes the switch is the -@@ -1217,6 +1213,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() { +@@ -1234,6 +1230,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() { return *greased_brand_version_list; } @@ -29,10 +29,10 @@ index c5c7a662232d..c1d9e8c5434d 100644 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kUserAgent)) { diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h -index ef7da4343581..93ad5e8b1d9b 100644 +index c6f87c148d16..bdc93db224d0 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -98,7 +98,8 @@ class ChromeXrIntegrationClient; +@@ -101,7 +101,8 @@ class ChromeXrIntegrationClient; } #endif diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 9d42be252..f0a0c2ce6 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index 670a33244287..9c13775f385d 100644 +index 8af99f57cd5e..3801b8dc79af 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -373,7 +373,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -368,7 +368,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, content::NotificationService::AllSources()); @@ -12,10 +12,10 @@ index 670a33244287..9c13775f385d 100644 } diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h -index 8d0793739a72..8f5097889fcb 100644 +index ccbe94c5b66b..834a01d6be84 100644 --- chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h -@@ -99,7 +99,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -103,7 +103,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. @@ -24,7 +24,7 @@ index 8d0793739a72..8f5097889fcb 100644 // Returns regular or off-the-record profile given its profile key. static Profile* GetProfileFromProfileKey(ProfileKey* profile_key); -@@ -132,7 +132,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -136,7 +136,7 @@ class ProfileManager : public content::NotificationObserver, // Returns true if the profile pointer is known to point to an existing // profile. @@ -33,7 +33,7 @@ index 8d0793739a72..8f5097889fcb 100644 // Returns the directory where the first created profile is stored, // relative to the user data directory currently in use. -@@ -141,7 +141,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -145,7 +145,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_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index b0b6ad66d..5b916b658 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 8d48495d450e..eea8b9c41e54 100644 +index 1cab7756e96f..77a8bdde7d62 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn -@@ -260,6 +260,7 @@ static_library("safe_browsing") { +@@ -256,6 +256,7 @@ static_library("safe_browsing") { "//chrome/common/safe_browsing:download_type_util", "//chrome/services/file_util/public/cpp", "//components/content_settings/core/browser", diff --git a/patch/patches/chrome_browser_sharesheet_1123388.patch b/patch/patches/chrome_browser_sharesheet_1123388.patch index 863326e95..2a95b3c4d 100644 --- a/patch/patches/chrome_browser_sharesheet_1123388.patch +++ b/patch/patches/chrome_browser_sharesheet_1123388.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/sharesheet/sharesheet_service_delegate.cc chrome/browser/sharesheet/sharesheet_service_delegate.cc -index ceea6a38ca79..6e8e335222bc 100644 +index 1ddf613c138f..00c497b67533 100644 --- chrome/browser/sharesheet/sharesheet_service_delegate.cc +++ chrome/browser/sharesheet/sharesheet_service_delegate.cc @@ -21,8 +21,10 @@ SharesheetServiceDelegate::SharesheetServiceDelegate( @@ -53,12 +53,12 @@ index ceea6a38ca79..6e8e335222bc 100644 +#endif } - } // namespace sharesheet + const gfx::VectorIcon* SharesheetServiceDelegate::GetVectorIcon( diff --git chrome/browser/sharesheet/sharesheet_service_delegate.h chrome/browser/sharesheet/sharesheet_service_delegate.h -index 47f15a6b4093..71189bfee8b9 100644 +index e957b2c39772..80d9dc7b6c76 100644 --- chrome/browser/sharesheet/sharesheet_service_delegate.h +++ chrome/browser/sharesheet/sharesheet_service_delegate.h -@@ -59,7 +59,9 @@ class SharesheetServiceDelegate : public SharesheetController { +@@ -64,7 +64,9 @@ class SharesheetServiceDelegate : public SharesheetController { private: const uint32_t id_; base::string16 active_action_; diff --git a/patch/patches/chrome_browser_themes.patch b/patch/patches/chrome_browser_themes.patch index 8f5cb1483..641a7df7c 100644 --- a/patch/patches/chrome_browser_themes.patch +++ b/patch/patches/chrome_browser_themes.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc -index a63433f6a77c..ad603df13e79 100644 +index 08cafea4eb1c..e21eff668695 100644 --- chrome/browser/themes/theme_service.cc +++ chrome/browser/themes/theme_service.cc @@ -26,6 +26,7 @@ @@ -35,8 +35,8 @@ index a63433f6a77c..ad603df13e79 100644 theme_observer_ = std::make_unique(this); extensions::ExtensionSystem::Get(profile_)->ready().Post( - FROM_HERE, base::Bind(&ThemeService::OnExtensionServiceReady, - weak_ptr_factory_.GetWeakPtr())); + FROM_HERE, base::BindOnce(&ThemeService::OnExtensionServiceReady, + weak_ptr_factory_.GetWeakPtr())); + } #endif theme_syncable_service_.reset(new ThemeSyncableService(profile_, this)); diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 7bfe59b31..7e7a8dd73 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc -index d789ee040ac5..19e5a5daa343 100644 +index 1d19e684d0c2..382423f3f2ce 100644 --- chrome/browser/plugins/plugin_info_host_impl.cc +++ chrome/browser/plugins/plugin_info_host_impl.cc @@ -18,6 +18,7 @@ @@ -10,7 +10,7 @@ index d789ee040ac5..19e5a5daa343 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/plugins/chrome_plugin_service_filter.h" -@@ -54,6 +55,11 @@ +@@ -53,6 +54,11 @@ #include "url/gurl.h" #include "url/origin.h" @@ -22,7 +22,7 @@ index d789ee040ac5..19e5a5daa343 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "components/guest_view/browser/guest_view_base.h" #include "extensions/browser/extension_registry.h" -@@ -100,6 +106,9 @@ bool IsPluginLoadingAccessibleResourceInWebView( +@@ -99,6 +105,9 @@ bool IsPluginLoadingAccessibleResourceInWebView( extensions::ExtensionRegistry* extension_registry, int process_id, const GURL& resource) { @@ -32,7 +32,7 @@ index d789ee040ac5..19e5a5daa343 100644 extensions::WebViewRendererState* renderer_state = extensions::WebViewRendererState::GetInstance(); std::string partition_id; -@@ -128,9 +137,6 @@ bool IsPluginLoadingAccessibleResourceInWebView( +@@ -127,9 +136,6 @@ bool IsPluginLoadingAccessibleResourceInWebView( PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile) : render_process_id_(render_process_id), @@ -42,7 +42,7 @@ index d789ee040ac5..19e5a5daa343 100644 host_content_settings_map_( HostContentSettingsMapFactory::GetForProfile(profile)), plugin_prefs_(PluginPrefs::GetForProfile(profile)) { -@@ -138,6 +144,13 @@ PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile) +@@ -137,6 +143,13 @@ PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile) profile->GetPrefs()); run_all_flash_in_allow_mode_.Init(prefs::kRunAllFlashInAllowMode, profile->GetPrefs()); @@ -56,7 +56,7 @@ index d789ee040ac5..19e5a5daa343 100644 } PluginInfoHostImpl::Context::~Context() {} -@@ -208,7 +221,8 @@ void PluginInfoHostImpl::PluginsLoaded( +@@ -207,7 +220,8 @@ void PluginInfoHostImpl::PluginsLoaded( plugin_metadata->identifier(), &output->status); } @@ -66,7 +66,7 @@ index d789ee040ac5..19e5a5daa343 100644 // Check to see if the component updater can fetch an implementation. std::unique_ptr cus_plugin_info = g_browser_process->component_updater()->GetComponentForMimeType( -@@ -229,6 +243,15 @@ void PluginInfoHostImpl::Context::DecidePluginStatus( +@@ -228,6 +242,15 @@ void PluginInfoHostImpl::Context::DecidePluginStatus( PluginMetadata::SecurityStatus security_status, const std::string& plugin_identifier, chrome::mojom::PluginStatus* status) const { @@ -82,7 +82,7 @@ index d789ee040ac5..19e5a5daa343 100644 if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) { *status = chrome::mojom::PluginStatus::kAllowed; return; -@@ -337,17 +360,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin( +@@ -345,17 +368,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin( return false; } @@ -127,7 +127,7 @@ index d789ee040ac5..19e5a5daa343 100644 bool enabled = i < matching_plugins.size(); if (!enabled) { diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc -index 1471b8f2a414..a856ce635719 100644 +index c78907c1d4ea..8297fa6a0162 100644 --- chrome/browser/plugins/plugin_utils.cc +++ chrome/browser/plugins/plugin_utils.cc @@ -5,6 +5,7 @@ @@ -138,7 +138,7 @@ index 1471b8f2a414..a856ce635719 100644 #include "chrome/browser/profiles/profile_io_data.h" #include "chrome/common/plugin_utils.h" #include "components/content_settings/core/browser/host_content_settings_map.h" -@@ -14,6 +15,10 @@ +@@ -15,6 +16,10 @@ #include "url/gurl.h" #include "url/origin.h" @@ -149,7 +149,7 @@ index 1471b8f2a414..a856ce635719 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/common/pref_names.h" #include "components/prefs/pref_service.h" -@@ -181,6 +186,12 @@ base::flat_map +@@ -168,6 +173,12 @@ base::flat_map PluginUtils::GetMimeTypeToExtensionIdMap( content::BrowserContext* browser_context) { base::flat_map mime_type_to_extension_id_map; @@ -197,10 +197,10 @@ index c1870b0f56ef..d32b8d54fb3f 100644 GURL webstore_url(extension_urls::GetWebstoreLaunchURL()); if (response_url.SchemeIsHTTPOrHTTPS() && diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index c9852764a59c..ffe26ef879b9 100644 +index 7dbbe8742ca4..01a8b2e3eb24 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -825,6 +825,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -831,6 +831,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -208,7 +208,7 @@ index c9852764a59c..ffe26ef879b9 100644 content_settings_agent_delegate->IsPluginTemporarilyAllowed( identifier)) { status = chrome::mojom::PluginStatus::kAllowed; -@@ -1028,7 +1029,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1029,7 +1030,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -218,7 +218,7 @@ index c9852764a59c..ffe26ef879b9 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -1037,7 +1039,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1038,7 +1040,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -228,7 +228,7 @@ index c9852764a59c..ffe26ef879b9 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -1047,7 +1050,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1048,7 +1051,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -238,7 +238,7 @@ index c9852764a59c..ffe26ef879b9 100644 break; } case chrome::mojom::PluginStatus::kBlockedNoLoading: { -@@ -1055,7 +1059,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1056,7 +1060,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( IDR_BLOCKED_PLUGIN_HTML, l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, group_name)); @@ -249,10 +249,10 @@ index c9852764a59c..ffe26ef879b9 100644 } case chrome::mojom::PluginStatus::kComponentUpdateRequired: { diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc -index 4e883820f752..267c6af2af6b 100644 +index f1370e70cc04..2109770d03e7 100644 --- chrome/renderer/plugins/chrome_plugin_placeholder.cc +++ chrome/renderer/plugins/chrome_plugin_placeholder.cc -@@ -364,8 +364,11 @@ void ChromePluginPlaceholder::OnBlockedContent( +@@ -356,8 +356,11 @@ void ChromePluginPlaceholder::OnBlockedContent( if (status == content::RenderFrame::PeripheralContentStatus::CONTENT_STATUS_TINY) { @@ -267,7 +267,7 @@ index 4e883820f752..267c6af2af6b 100644 std::string message = base::StringPrintf( diff --git content/browser/browser_plugin/browser_plugin_guest.h content/browser/browser_plugin/browser_plugin_guest.h -index 4e1cf0118cb7..af941abfe235 100644 +index 347c1f83b873..9d77ef57274d 100644 --- content/browser/browser_plugin/browser_plugin_guest.h +++ content/browser/browser_plugin/browser_plugin_guest.h @@ -127,6 +127,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost, diff --git a/patch/patches/chrome_pref_watcher.patch b/patch/patches/chrome_pref_watcher.patch index 743c1d9e2..3a6e261fd 100644 --- a/patch/patches/chrome_pref_watcher.patch +++ b/patch/patches/chrome_pref_watcher.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/ui/prefs/pref_watcher.h chrome/browser/ui/prefs/pref_watcher.h -index a439b2ce1b32..21c7b97639f4 100644 +index 78d5b763970c..de98bd0b325b 100644 --- chrome/browser/ui/prefs/pref_watcher.h +++ chrome/browser/ui/prefs/pref_watcher.h @@ -29,10 +29,10 @@ class PrefWatcher : public KeyedService { diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index ad7f716a2..44977d218 100644 --- a/patch/patches/chrome_renderer.patch +++ b/patch/patches/chrome_renderer.patch @@ -1,5 +1,5 @@ diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn -index ce49b5924986..596069095d86 100644 +index fb7fa9ff4ed2..cf7be804968e 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -4,6 +4,7 @@ @@ -10,15 +10,15 @@ index ce49b5924986..596069095d86 100644 import("//chrome/common/features.gni") import("//components/nacl/features.gni") import("//components/offline_pages/buildflags/features.gni") -@@ -141,6 +142,7 @@ static_library("renderer") { - public_deps = [ "//components/contextual_search:buildflags" ] +@@ -137,6 +138,7 @@ static_library("renderer") { deps = [ + "//base/allocator:buildflags", + "//cef/libcef/features", "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -206,6 +208,10 @@ static_library("renderer") { +@@ -218,6 +220,10 @@ static_library("renderer") { configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/patch/patches/chrome_runtime.patch b/patch/patches/chrome_runtime.patch index fe355f0a0..40303ffe9 100644 --- a/patch/patches/chrome_runtime.patch +++ b/patch/patches/chrome_runtime.patch @@ -1,5 +1,5 @@ diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc -index 8b7b6f492b3e..1085e4b1e23d 100644 +index d9a02faddd91..09a349fcf2b8 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc @@ -27,6 +27,7 @@ @@ -10,7 +10,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644 #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" #include "chrome/browser/defaults.h" -@@ -379,6 +380,8 @@ struct MainFunction { +@@ -378,6 +379,8 @@ struct MainFunction { // Initializes the user data dir. Must be called before InitializeLocalState(). void InitializeUserDataDir(base::CommandLine* command_line) { @@ -19,7 +19,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644 #if defined(OS_WIN) // Reach out to chrome_elf for the truth on the user data directory. // Note that in tests, this links to chrome_elf_test_stubs. -@@ -640,7 +643,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() { +@@ -644,7 +647,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() { } #if defined(OS_WIN) @@ -29,7 +29,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644 base::sequence_manager::internal::ThreadControllerPowerMonitor:: InitializeOnMainThread(); #endif -@@ -922,6 +927,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -926,6 +931,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); @@ -37,7 +37,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644 crash_reporter::InitializeCrashKeys(); #if defined(OS_POSIX) -@@ -932,6 +938,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -936,6 +942,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitMacCrashReporter(command_line, process_type); SetUpInstallerPreferences(command_line); #endif @@ -45,7 +45,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644 #if defined(OS_WIN) child_process_logging::Init(); -@@ -1056,6 +1063,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1058,6 +1065,7 @@ void ChromeMainDelegate::PreSandboxStartup() { locale; } @@ -53,7 +53,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644 #if defined(OS_POSIX) && !defined(OS_MAC) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { -@@ -1088,6 +1096,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1090,6 +1098,7 @@ void ChromeMainDelegate::PreSandboxStartup() { // After all the platform Breakpads have been initialized, store the command // line for crash reporting. crash_keys::SetCrashKeysFromCommandLine(command_line); @@ -61,7 +61,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644 #if BUILDFLAG(ENABLE_PDF) MaybeInitializeGDI(); -@@ -1186,6 +1195,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1188,6 +1197,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -69,7 +69,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets // this up for the browser process in a different manner. const base::CommandLine* command_line = -@@ -1202,6 +1212,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1204,6 +1214,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -78,7 +78,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644 #endif // defined(OS_LINUX) || defined(OS_CHROMEOS) diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index c9bf19474a2a..3c1d5eec82fa 100644 +index 195da4bea79f..5f2c60e63623 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc @@ -49,6 +49,7 @@ @@ -101,7 +101,7 @@ index c9bf19474a2a..3c1d5eec82fa 100644 // These members must be initialized before returning from this function. // Android doesn't use StartupBrowserCreator. -@@ -1613,11 +1616,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1615,11 +1618,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // This step is costly and is already measured in // Startup.StartupBrowserCreator_Start. // See the comment above for an explanation of |process_command_line|. @@ -117,10 +117,10 @@ index c9bf19474a2a..3c1d5eec82fa 100644 // Initialize autoupdate timer. Timer callback costs basically nothing // when browser is not in persistent mode, so it's OK to let it ride on diff --git chrome/browser/notifications/notification_platform_bridge_mac.mm chrome/browser/notifications/notification_platform_bridge_mac.mm -index c2905bfd0df7..09bfcf942a7c 100644 +index 9e8fcb9f9f91..2a9eaca0fb0d 100644 --- chrome/browser/notifications/notification_platform_bridge_mac.mm +++ chrome/browser/notifications/notification_platform_bridge_mac.mm -@@ -25,6 +25,7 @@ +@@ -24,6 +24,7 @@ #include "base/strings/sys_string_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/system/sys_info.h" @@ -128,7 +128,7 @@ index c2905bfd0df7..09bfcf942a7c 100644 #include "chrome/browser/browser_features.h" #include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_display_service_impl.h" -@@ -449,6 +450,12 @@ getDisplayedAlertsForProfileId:(NSString*)profileId +@@ -451,6 +452,12 @@ getDisplayedAlertsForProfileId:(NSString*)profileId - (id)serviceProxy { id proxy = [_xpcConnection remoteObjectProxy]; diff --git a/patch/patches/chrome_widevine.patch b/patch/patches/chrome_widevine.patch index 5f1376d94..0886b6328 100644 --- a/patch/patches/chrome_widevine.patch +++ b/patch/patches/chrome_widevine.patch @@ -1,10 +1,10 @@ diff --git third_party/widevine/cdm/BUILD.gn third_party/widevine/cdm/BUILD.gn -index 4a6b5bb81c17..de8c4e03a9c9 100644 +index fa726c5a60fa..b84dd523542b 100644 --- third_party/widevine/cdm/BUILD.gn +++ third_party/widevine/cdm/BUILD.gn -@@ -5,6 +5,7 @@ - import("//build/buildflag_header.gni") +@@ -6,6 +6,7 @@ import("//build/buildflag_header.gni") import("//build/config/chrome_build.gni") + import("//build/config/chromeos/ui_mode.gni") import("//build/config/features.gni") +import("//cef/libcef/features/features.gni") import("//media/cdm/library_cdm/cdm_paths.gni") diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 2ccf6f81e..ab879c00f 100644 --- a/patch/patches/component_build.patch +++ b/patch/patches/component_build.patch @@ -1,5 +1,5 @@ diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h -index a8ad8c8220c8..91ca3ff02fbe 100644 +index 1d6121a4ba08..8e6735eca670 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h @@ -12,6 +12,7 @@ @@ -10,7 +10,7 @@ index a8ad8c8220c8..91ca3ff02fbe 100644 #include "content/common/navigation_params.mojom.h" #include "content/public/browser/certificate_request_result_type.h" #include "mojo/public/cpp/bindings/pending_receiver.h" -@@ -74,7 +75,7 @@ bool ApplyUserAgentMetadataOverrides( +@@ -76,7 +77,7 @@ bool ApplyUserAgentMetadataOverrides( FrameTreeNode* frame_tree_node, base::Optional* override_out); @@ -55,18 +55,18 @@ index 57072bf1263a..0a93446e4d21 100644 blink::mojom::V8CacheOptions GetV8CacheOptions(); diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn -index 87c15e50b7f0..8f42ae4da8de 100644 +index c5647d2dc509..1314c30b60c7 100644 --- third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn -@@ -25,6 +25,7 @@ component("controller") { - +@@ -26,6 +26,7 @@ component("controller") { configs += [ + "//build/config/compiler:noshadowing", "//build/config/compiler:wexit_time_destructors", + "//cef/libcef/features:config", "//third_party/blink/renderer:config", "//third_party/blink/renderer:inside_blink", "//third_party/blink/renderer:non_test_config", -@@ -49,6 +50,8 @@ component("controller") { +@@ -50,6 +51,8 @@ component("controller") { "performance_manager/v8_detailed_memory_reporter_impl.h", "performance_manager/v8_worker_memory_reporter.cc", "performance_manager/v8_worker_memory_reporter.h", @@ -76,7 +76,7 @@ index 87c15e50b7f0..8f42ae4da8de 100644 if (is_linux || is_chromeos) { diff --git ui/events/keycodes/BUILD.gn ui/events/keycodes/BUILD.gn -index 4aae406b9ace..40ca74281b78 100644 +index 4a2d0348caeb..42742d24ebed 100644 --- ui/events/keycodes/BUILD.gn +++ ui/events/keycodes/BUILD.gn @@ -19,6 +19,8 @@ source_set("xkb") { diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 91b80652a..1643fc3e8 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -12,10 +12,10 @@ index cdeecb35a998..1615185f2a65 100644 if (is_stale && stale_plugin_action == RETRY_IF_STALE_PLUGIN_LIST) { // The GetPlugins call causes the plugin list to be refreshed. Once that's diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc -index e46003ea5e4a..503876cf7725 100644 +index e0437a2c3479..82896ca9e261 100644 --- chrome/browser/plugins/chrome_plugin_service_filter.cc +++ chrome/browser/plugins/chrome_plugin_service_filter.cc -@@ -163,6 +163,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable( +@@ -132,6 +132,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable( int render_process_id, int render_frame_id, const GURL& plugin_content_url, @@ -49,10 +49,10 @@ index 5b780f8bf34c..a75d0da983b4 100644 false /* allow_wildcard */, is_stale, &plugin_info, nullptr /* actual_mime_type */); diff --git chrome/browser/ui/views/frame/browser_root_view.cc chrome/browser/ui/views/frame/browser_root_view.cc -index f64e2a94062e..b1bf9689321c 100644 +index 88fa7da1411e..98d0ea7650ed 100644 --- chrome/browser/ui/views/frame/browser_root_view.cc +++ chrome/browser/ui/views/frame/browser_root_view.cc -@@ -76,7 +76,7 @@ void OnFindURLMimeType(const GURL& url, +@@ -77,7 +77,7 @@ void OnFindURLMimeType(const GURL& url, #if BUILDFLAG(ENABLE_PLUGINS) content::WebPluginInfo plugin; result = result || content::PluginService::GetInstance()->GetPluginInfo( @@ -75,10 +75,10 @@ index f66e6bca5e2b..c99998449b6b 100644 GetContentClient()->browser()->GetUserAgent()); version.SetString("V8-Version", V8_VERSION_STRING); diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index 3a0f7d0a3a26..fd32c77e58cb 100644 +index 69c7f35e8b6e..0a549792040b 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -638,6 +638,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( +@@ -633,6 +633,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( resource_request_->has_user_gesture, resource_request_->request_initiator, &loader_factory); @@ -92,7 +92,7 @@ index 3a0f7d0a3a26..fd32c77e58cb 100644 if (loader_factory) { factory = base::MakeRefCounted( std::move(loader_factory)); -@@ -839,7 +846,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse( +@@ -834,7 +841,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse( frame_tree_node->current_frame_host()->GetProcess()->GetID(); int routing_id = frame_tree_node->current_frame_host()->GetRoutingID(); bool has_plugin = PluginService::GetInstance()->GetPluginInfo( @@ -102,10 +102,10 @@ index 3a0f7d0a3a26..fd32c77e58cb 100644 if (stale) { diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc -index e9cb48e03f17..47996036362c 100644 +index 7caf00713119..3a4058a247be 100644 --- content/browser/plugin_service_impl.cc +++ content/browser/plugin_service_impl.cc -@@ -341,6 +341,7 @@ bool PluginServiceImpl::GetPluginInfoArray( +@@ -276,6 +276,7 @@ bool PluginServiceImpl::GetPluginInfoArray( bool PluginServiceImpl::GetPluginInfo(int render_process_id, int render_frame_id, const GURL& url, @@ -113,7 +113,7 @@ index e9cb48e03f17..47996036362c 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool allow_wildcard, -@@ -358,7 +359,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, +@@ -293,7 +294,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, for (size_t i = 0; i < plugins.size(); ++i) { if (!filter_ || filter_->IsPluginAvailable(render_process_id, render_frame_id, url, @@ -124,7 +124,7 @@ index e9cb48e03f17..47996036362c 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 79ac3b705511..71d73d3da158 100644 +index c1d358b1e977..a40d09446c24 100644 --- content/browser/plugin_service_impl.h +++ content/browser/plugin_service_impl.h @@ -54,6 +54,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService { @@ -188,10 +188,10 @@ index 632ae86c6fd6..55b749ec1242 100644 const std::vector& all_plugins); diff --git content/browser/renderer_host/render_frame_message_filter.cc content/browser/renderer_host/render_frame_message_filter.cc -index 17729c56fa29..84a14a89306f 100644 +index ad253601284f..13c689ff7e5e 100644 --- content/browser/renderer_host/render_frame_message_filter.cc +++ content/browser/renderer_host/render_frame_message_filter.cc -@@ -300,6 +300,7 @@ void RenderFrameMessageFilter::OnCreateChildFrame( +@@ -194,6 +194,7 @@ void RenderFrameMessageFilter::OverrideThreadForMessage( void RenderFrameMessageFilter::OnGetPluginInfo( int render_frame_id, const GURL& url, @@ -199,7 +199,7 @@ index 17729c56fa29..84a14a89306f 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool* found, -@@ -307,8 +308,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo( +@@ -201,8 +202,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo( std::string* actual_mime_type) { bool allow_wildcard = true; *found = plugin_service_->GetPluginInfo( @@ -212,10 +212,10 @@ index 17729c56fa29..84a14a89306f 100644 void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin( diff --git content/browser/renderer_host/render_frame_message_filter.h content/browser/renderer_host/render_frame_message_filter.h -index 0f197c63c11c..20d046827f56 100644 +index ff2ee2302d2a..e4db2bc08b5a 100644 --- content/browser/renderer_host/render_frame_message_filter.h +++ content/browser/renderer_host/render_frame_message_filter.h -@@ -83,6 +83,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter { +@@ -75,6 +75,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter { #if BUILDFLAG(ENABLE_PLUGINS) void OnGetPluginInfo(int render_frame_id, const GURL& url, @@ -224,10 +224,10 @@ index 0f197c63c11c..20d046827f56 100644 const std::string& mime_type, bool* found, diff --git content/common/frame_messages.h content/common/frame_messages.h -index 65116e483c65..c97f731cef9a 100644 +index 34e40d5fd8eb..aef36ad96a5a 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h -@@ -495,9 +495,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, +@@ -440,9 +440,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, // type. If there is no matching plugin, |found| is false. // |actual_mime_type| is the actual mime type supported by the // found plugin. @@ -240,23 +240,23 @@ index 65116e483c65..c97f731cef9a 100644 std::string /* mime_type */, bool /* found */, diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc -index da3aceed75b1..e88601502e28 100644 +index 3a2957836151..b3a3a2c7a649 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc @@ -9,7 +9,7 @@ // declarations instead of including more headers. If that is infeasible, adjust // the limit. For more info, see // https://chromium.googlesource.com/chromium/src/+/HEAD/docs/wmax_tokens.md --#pragma clang max_tokens_here 890000 -+// #pragma clang max_tokens_here 890000 +-#pragma clang max_tokens_here 910000 ++// #pragma clang max_tokens_here 910000 #include diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index 27b7e117b531..80c92eed565d 100644 +index ce69e43769b2..ce91333894e5 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -31,6 +31,7 @@ +@@ -30,6 +30,7 @@ #include "content/public/browser/certificate_request_result_type.h" #include "content/public/browser/generated_code_cache_settings.h" #include "content/public/browser/storage_partition_config.h" @@ -264,7 +264,7 @@ index 27b7e117b531..80c92eed565d 100644 #include "content/public/common/page_visibility_state.h" #include "content/public/common/window_container_type.mojom-forward.h" #include "device/vr/buildflags/buildflags.h" -@@ -1685,6 +1686,14 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1678,6 +1679,14 @@ class CONTENT_EXPORT ContentBrowserClient { const base::Optional& initiating_origin, mojo::PendingRemote* out_factory); @@ -279,7 +279,7 @@ index 27b7e117b531..80c92eed565d 100644 // Creates an OverlayWindow to be used for Picture-in-Picture. This window // will house the content shown when in Picture-in-Picture mode. This will // return a new OverlayWindow. -@@ -1756,6 +1765,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1749,6 +1758,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -315,10 +315,10 @@ index 98c59005599e..69752184745d 100644 WebPluginInfo* plugin) = 0; diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index 12e091c7c13d..513db858b8fa 100644 +index e9def973e93c..1fe148c4f429 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h -@@ -84,6 +84,9 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -85,6 +85,9 @@ class CONTENT_EXPORT ContentRendererClient { // binding requests from RenderProcessHost::BindReceiver(). virtual void ExposeInterfacesToBrowser(mojo::BinderMap* binders) {} @@ -328,7 +328,7 @@ index 12e091c7c13d..513db858b8fa 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -312,6 +315,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -308,6 +311,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -340,10 +340,10 @@ index 12e091c7c13d..513db858b8fa 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index 3b2626c3ef9d..c0acde278d5a 100644 +index 340642fd854c..c031facf8897 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc -@@ -3896,7 +3896,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( +@@ -3737,7 +3737,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( std::string mime_type; bool found = false; Send(new FrameHostMsg_GetPluginInfo( @@ -354,23 +354,23 @@ index 3b2626c3ef9d..c0acde278d5a 100644 if (!found) return nullptr; diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index 91daa69bf55a..40f79ddf47b9 100644 +index a4240c7c75a3..df18416ac09e 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -636,6 +636,8 @@ void RenderThreadImpl::Init() { +@@ -624,6 +624,8 @@ void RenderThreadImpl::Init() { GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( URLLoaderThrottleProviderType::kFrame); + GetContentClient()->renderer()->RenderThreadConnected(); + GetAssociatedInterfaceRegistry()->AddInterface(base::BindRepeating( - &RenderThreadImpl::OnRouteProviderReceiver, base::Unretained(this))); - GetAssociatedInterfaceRegistry()->AddInterface(base::BindRepeating( + &RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this))); + diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index ca435bda981b..274c460a151e 100644 +index 1fa872443617..758812fbb3a2 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -915,6 +915,15 @@ void RendererBlinkPlatformImpl::SetRenderingColorSpace( +@@ -974,6 +974,15 @@ void RendererBlinkPlatformImpl::SetActiveURL(const blink::WebURL& url, //------------------------------------------------------------------------------ @@ -387,12 +387,12 @@ index ca435bda981b..274c460a151e 100644 if (!code_cache_host_) { code_cache_host_ = mojo::SharedRemote( diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index 30af7f4fed5f..3bea58414d5b 100644 +index 0bbe077c86a7..723dca391001 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -211,6 +211,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { - media::GpuVideoAcceleratorFactories* GetGpuFactories() override; - void SetRenderingColorSpace(const gfx::ColorSpace& color_space) override; +@@ -213,6 +213,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { + void SetActiveURL(const blink::WebURL& url, + const blink::WebString& top_url) override; + void DevToolsAgentAttached() override; + void DevToolsAgentDetached() override; diff --git a/patch/patches/content_main_654986.patch b/patch/patches/content_main_654986.patch index 8be8500c8..371fbf7de 100644 --- a/patch/patches/content_main_654986.patch +++ b/patch/patches/content_main_654986.patch @@ -1,8 +1,8 @@ diff --git content/app/content_main.cc content/app/content_main.cc -index e463c4d677b1..5fbc0a732dee 100644 +index 2aba28d210db..5413f08af93d 100644 --- content/app/content_main.cc +++ content/app/content_main.cc -@@ -206,15 +206,10 @@ void InitializeMojo(mojo::core::Configuration* config) { +@@ -205,15 +205,10 @@ void InitializeMojo(mojo::core::Configuration* config) { } // namespace @@ -20,7 +20,7 @@ index e463c4d677b1..5fbc0a732dee 100644 // A flag to indicate whether Main() has been called before. On Android, we // may re-run Main() without restarting the browser process. This flag -@@ -300,8 +295,7 @@ int RunContentProcess(const ContentMainParams& params, +@@ -299,8 +294,7 @@ int RunContentProcess(const ContentMainParams& params, // loop, but we don't want to leave them hanging around until the app quits. // Each "main" needs to flush this pool right before it goes into its main // event loop to get rid of the cruft. @@ -30,7 +30,7 @@ index e463c4d677b1..5fbc0a732dee 100644 InitializeMac(); #endif -@@ -311,7 +305,7 @@ int RunContentProcess(const ContentMainParams& params, +@@ -310,7 +304,7 @@ int RunContentProcess(const ContentMainParams& params, ui::RegisterPathProvider(); tracker = base::debug::GlobalActivityTracker::Get(); @@ -39,7 +39,7 @@ index e463c4d677b1..5fbc0a732dee 100644 if (exit_code >= 0) { if (tracker) { -@@ -370,8 +364,16 @@ int RunContentProcess(const ContentMainParams& params, +@@ -369,8 +363,16 @@ int RunContentProcess(const ContentMainParams& params, if (IsSubprocess()) CommonSubprocessInit(); @@ -57,7 +57,7 @@ index e463c4d677b1..5fbc0a732dee 100644 if (tracker) { if (exit_code == 0) { tracker->SetProcessPhaseIfEnabled( -@@ -382,19 +384,33 @@ int RunContentProcess(const ContentMainParams& params, +@@ -381,19 +383,33 @@ int RunContentProcess(const ContentMainParams& params, tracker->process_data().SetInt("exit-code", exit_code); } } @@ -94,10 +94,10 @@ index e463c4d677b1..5fbc0a732dee 100644 return RunContentProcess(params, runner.get()); } diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index a85c25303dfc..8fdc214608fc 100644 +index 6f5d40dd324d..8fa1397f0353 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc -@@ -45,6 +45,7 @@ +@@ -46,6 +46,7 @@ #include "base/task/post_task.h" #include "base/task/thread_pool/thread_pool_instance.h" #include "base/threading/hang_watcher.h" @@ -105,7 +105,7 @@ index a85c25303dfc..8fdc214608fc 100644 #include "base/trace_event/trace_event.h" #include "components/discardable_memory/service/discardable_shared_memory_manager.h" #include "components/download/public/common/download_task_runner.h" -@@ -571,7 +572,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { +@@ -589,7 +590,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { #else // !OS_WIN #if defined(OS_MAC) @@ -114,7 +114,7 @@ index a85c25303dfc..8fdc214608fc 100644 #endif // defined(OS_MAC) #if defined(OS_ANDROID) -@@ -1010,6 +1011,11 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1039,6 +1040,11 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } @@ -127,27 +127,19 @@ index a85c25303dfc..8fdc214608fc 100644 std::unique_ptr ContentMainRunner::Create() { return ContentMainRunnerImpl::Create(); diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h -index 3eb986f3c7d4..58d1883f7948 100644 +index 30d5515b3af8..d59b4779afef 100644 --- content/app/content_main_runner_impl.h +++ content/app/content_main_runner_impl.h -@@ -13,6 +13,7 @@ - #include "base/threading/hang_watcher.h" - #include "build/build_config.h" - #include "content/browser/startup_data_impl.h" -+#include "content/common/content_export.h" - #include "content/public/app/content_main.h" - #include "content/public/app/content_main_runner.h" - #include "content/public/common/main_function_params.h" -@@ -37,7 +38,7 @@ class ContentMainDelegate; - struct ContentMainParams; +@@ -39,7 +39,7 @@ class ContentMainDelegate; class ServiceManagerEnvironment; + struct ContentMainParams; -class ContentMainRunnerImpl : public ContentMainRunner { +class CONTENT_EXPORT ContentMainRunnerImpl : public ContentMainRunner { public: static std::unique_ptr Create(); -@@ -51,6 +52,8 @@ class ContentMainRunnerImpl : public ContentMainRunner { +@@ -53,6 +53,8 @@ class ContentMainRunnerImpl : public ContentMainRunner { int Run(bool start_service_manager_only) override; void Shutdown() override; @@ -170,7 +162,7 @@ index 8b829a488773..a69a08869728 100644 if (main_argv) setproctitle_init(main_argv); diff --git content/public/app/content_main.h content/public/app/content_main.h -index 7384f3276f38..b84127a62b81 100644 +index 97aac3d0c758..4e7baa790252 100644 --- content/public/app/content_main.h +++ content/public/app/content_main.h @@ -5,6 +5,7 @@ @@ -204,7 +196,7 @@ index 7384f3276f38..b84127a62b81 100644 ContentMainRunner* content_main_runner); #if defined(OS_ANDROID) -@@ -88,7 +98,7 @@ CONTENT_EXPORT ContentMainDelegate* GetContentMainDelegateForTesting(); +@@ -91,7 +101,7 @@ ContentMainDelegate* GetContentMainDelegate(); // initial setup for every process. The embedder has a chance to customize // startup using the ContentMainDelegate interface. The embedder can also pass // in null for |delegate| if they don't want to override default startup. diff --git a/patch/patches/content_pepper_flash_1586.patch b/patch/patches/content_pepper_flash_1586.patch deleted file mode 100644 index 7e7351bf5..000000000 --- a/patch/patches/content_pepper_flash_1586.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 df1d395158a3..2ab2475b9164 100644 ---- content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc -+++ content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc -@@ -56,7 +56,7 @@ PepperFlashFileMessageFilter::PepperFlashFileMessageFilter( - // will construct a bad path and could provide access to the wrong files. - // In this case, |plugin_data_directory_| will remain unset and - // |ValidateAndConvertPepperFilePath| will fail. -- NOTREACHED(); -+ //NOTREACHED(); - } else { - plugin_data_directory_ = GetDataDirName(profile_data_directory).Append( - base::FilePath::FromUTF8Unsafe(plugin_name)); diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index 4f7c7a86a..e89b1f444 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -81,7 +81,7 @@ index 886372e11489..ad3bc2242883 100644 g_crash_helper_enabled = true; return true; diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc -index 2014df5fe810..3cf97e8d8e3c 100644 +index e71c5e51118b..1dca5b2c378f 100644 --- chrome/common/crash_keys.cc +++ chrome/common/crash_keys.cc @@ -4,6 +4,8 @@ @@ -102,7 +102,7 @@ index 2014df5fe810..3cf97e8d8e3c 100644 static const char* const kIgnoreSwitches[] = { switches::kEnableLogging, switches::kFlagSwitchesBegin, -@@ -82,7 +84,7 @@ static bool IsBoringSwitch(const std::string& flag) { +@@ -80,7 +82,7 @@ static bool IsBoringSwitch(const std::string& flag) { } void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) { @@ -363,7 +363,7 @@ index e1c66df6cecf..681dd496292e 100644 ->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled); } diff --git components/crash/core/app/crashpad_mac.mm components/crash/core/app/crashpad_mac.mm -index aa7c3302f2e3..c471132afe3f 100644 +index eb675321436a..4e74af742ed5 100644 --- components/crash/core/app/crashpad_mac.mm +++ components/crash/core/app/crashpad_mac.mm @@ -16,12 +16,15 @@ @@ -412,8 +412,8 @@ index aa7c3302f2e3..c471132afe3f 100644 #if BUILDFLAG(GOOGLE_CHROME_BRANDING) // Empty means stable. -@@ -62,12 +75,16 @@ std::map GetProcessSimpleAnnotations() { - process_annotations["channel"] = ""; +@@ -68,12 +81,16 @@ std::map GetProcessSimpleAnnotations() { + process_annotations["channel"] = base::SysNSStringToUTF8(channel); } - NSString* version = @@ -434,7 +434,7 @@ index aa7c3302f2e3..c471132afe3f 100644 } // @autoreleasepool return process_annotations; }(); -@@ -127,10 +144,10 @@ base::FilePath PlatformCrashpadInitialization( +@@ -133,10 +150,10 @@ base::FilePath PlatformCrashpadInitialization( if (initial_client) { @autoreleasepool { @@ -449,7 +449,7 @@ index aa7c3302f2e3..c471132afe3f 100644 // Is there a way to recover if this fails? CrashReporterClient* crash_reporter_client = GetCrashReporterClient(); -@@ -159,6 +176,12 @@ base::FilePath PlatformCrashpadInitialization( +@@ -165,6 +182,12 @@ base::FilePath PlatformCrashpadInitialization( "--reset-own-crash-exception-port-to-system-default"); } diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index b23942f67..14decb6aa 100644 --- a/patch/patches/crashpad_tp_1995.patch +++ b/patch/patches/crashpad_tp_1995.patch @@ -146,7 +146,7 @@ index 5761c6b965b5..aee4e6c96033 100644 struct Data; diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn -index 332117d78126..e7babc8f1764 100644 +index 623c833fed68..af28fce9edfc 100644 --- third_party/crashpad/crashpad/handler/BUILD.gn +++ third_party/crashpad/crashpad/handler/BUILD.gn @@ -12,6 +12,7 @@ @@ -156,8 +156,8 @@ index 332117d78126..e7babc8f1764 100644 +import("//cef/libcef/features/features.gni") import("../build/crashpad_buildconfig.gni") - if (crashpad_is_in_chromium) { -@@ -69,6 +70,17 @@ static_library("handler") { + static_library("handler") { +@@ -64,6 +65,17 @@ static_library("handler") { ] } @@ -175,10 +175,10 @@ index 332117d78126..e7babc8f1764 100644 public_configs = [ "..:crashpad_config" ] public_deps = [ -@@ -81,6 +93,7 @@ static_library("handler") { - "../minidump", +@@ -77,6 +89,7 @@ static_library("handler") { "../snapshot", "../tools:tool_support", + "//build:chromeos_buildflags", + "//cef/libcef/features", ] @@ -248,21 +248,18 @@ index 2ec1147d2620..8ff9a72e0bd7 100644 //! \brief Calls ProcessPendingReports() in response to ReportPending() having //! been called on any thread, as well as periodically on a timer. diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc -index 33649291e253..1bb3c8dc5ac9 100644 +index d00026605537..0fa0cacbbae2 100644 --- third_party/crashpad/crashpad/handler/handler_main.cc +++ third_party/crashpad/crashpad/handler/handler_main.cc -@@ -36,8 +36,10 @@ - #include "base/scoped_generic.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/stringprintf.h" -+#include "base/strings/string_number_conversions.h" +@@ -39,6 +39,7 @@ #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" + #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "client/crash_report_database.h" #include "client/crashpad_client.h" #include "client/crashpad_info.h" -@@ -88,6 +90,10 @@ +@@ -89,6 +90,10 @@ #include "util/win/session_end_watcher.h" #endif // OS_APPLE @@ -273,27 +270,27 @@ index 33649291e253..1bb3c8dc5ac9 100644 namespace crashpad { namespace { -@@ -212,6 +218,9 @@ struct Options { +@@ -213,6 +218,9 @@ struct Options { bool periodic_tasks; bool rate_limit; bool upload_gzip; + int max_uploads; + int max_database_size; + int max_database_age; - #if defined(OS_CHROMEOS) + #if BUILDFLAG(IS_ASH) bool use_cros_crash_reporter = false; base::FilePath minidump_dir_for_tests; -@@ -566,6 +575,9 @@ int HandlerMain(int argc, +@@ -577,6 +585,9 @@ int HandlerMain(int argc, kOptionTraceParentWithException, #endif kOptionURL, + kOptionMaxUploads, + kOptionMaxDatabaseSize, + kOptionMaxDatabaseAge, - #if defined(OS_CHROMEOS) + #if BUILDFLAG(IS_ASH) kOptionUseCrosCrashReporter, kOptionMinidumpDirForTests, -@@ -667,6 +679,9 @@ int HandlerMain(int argc, +@@ -678,6 +689,9 @@ int HandlerMain(int argc, #endif // OS_ANDROID {"help", no_argument, nullptr, kOptionHelp}, {"version", no_argument, nullptr, kOptionVersion}, @@ -303,7 +300,7 @@ index 33649291e253..1bb3c8dc5ac9 100644 {nullptr, 0, nullptr, 0}, }; -@@ -822,6 +837,27 @@ int HandlerMain(int argc, +@@ -833,6 +847,27 @@ int HandlerMain(int argc, options.url = optarg; break; } @@ -328,10 +325,10 @@ index 33649291e253..1bb3c8dc5ac9 100644 + } + break; + } - #if defined(OS_CHROMEOS) + #if BUILDFLAG(IS_ASH) case kOptionUseCrosCrashReporter: { options.use_cros_crash_reporter = true; -@@ -971,8 +1007,14 @@ int HandlerMain(int argc, +@@ -982,8 +1017,14 @@ int HandlerMain(int argc, upload_thread_options.upload_gzip = options.upload_gzip; upload_thread_options.watch_pending_reports = options.periodic_tasks; @@ -346,7 +343,7 @@ index 33649291e253..1bb3c8dc5ac9 100644 upload_thread.Get()->Start(); } -@@ -1042,7 +1084,8 @@ int HandlerMain(int argc, +@@ -1053,7 +1094,8 @@ int HandlerMain(int argc, ScopedStoppable prune_thread; if (options.periodic_tasks) { prune_thread.Reset(new PruneCrashReportThread( diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index b45101540..5981cb288 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc -index 3cc8dfd2754e..37b34413d506 100644 +index 3ce42bd3bc3c..e5bda4ae4f1f 100644 --- chrome/browser/extensions/api/streams_private/streams_private_api.cc +++ chrome/browser/extensions/api/streams_private/streams_private_api.cc @@ -6,6 +6,7 @@ @@ -8,8 +8,8 @@ index 3cc8dfd2754e..37b34413d506 100644 +#include "cef/libcef/features/features.h" #include "chrome/browser/extensions/extension_tab_util.h" - #include "chrome/browser/prerender/chrome_prerender_contents_delegate.h" - #include "components/prerender/browser/prerender_contents.h" + #include "chrome/browser/prefetch/no_state_prefetch/chrome_prerender_contents_delegate.h" + #include "components/no_state_prefetch/browser/prerender_contents.h" @@ -42,6 +43,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( if (!web_contents) return; @@ -132,10 +132,10 @@ index 11bfec21cc9f..416de61f85fa 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 1832f5e9acd6..059cb2a43578 100644 +index 1702638ab5b9..49de950d83d8 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h -@@ -62,6 +62,7 @@ class ComponentExtensionResourceManager; +@@ -63,6 +63,7 @@ class ComponentExtensionResourceManager; class Extension; class ExtensionCache; class ExtensionError; @@ -143,7 +143,7 @@ index 1832f5e9acd6..059cb2a43578 100644 class ExtensionHostDelegate; class ExtensionSet; class ExtensionSystem; -@@ -204,6 +205,14 @@ class ExtensionsBrowserClient { +@@ -205,6 +206,14 @@ class ExtensionsBrowserClient { virtual std::unique_ptr CreateExtensionHostDelegate() = 0; @@ -159,10 +159,10 @@ index 1832f5e9acd6..059cb2a43578 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 5c593b03d84e..c9588c09f23f 100644 +index f41d44299518..41e892cdf240 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc -@@ -385,9 +385,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, +@@ -411,9 +411,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, return true; // TODO(kalman): return false here? It might break things... DVLOG(1) << "CreateBackgroundHost " << extension->id(); diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index 3ce34ef80..5178d8bfd 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index c5c73f805e8f..449ad9eaaf5e 100644 +index aed1fea955bd..3c5036a04706 100644 --- .gn +++ .gn -@@ -350,6 +350,8 @@ exec_script_whitelist = +@@ -290,6 +290,8 @@ exec_script_whitelist = "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn", @@ -12,10 +12,10 @@ index c5c73f805e8f..449ad9eaaf5e 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 39b9075b1267..f25586e6cb72 100644 +index 85198646cd31..6c1dbf6921a2 100644 --- BUILD.gn +++ BUILD.gn -@@ -230,6 +230,7 @@ group("gn_all") { +@@ -232,6 +232,7 @@ group("gn_all") { if (!is_ios && !is_fuchsia) { deps += [ @@ -56,7 +56,7 @@ index 982fbe8d3f0d..e757be4688f1 100644 + "studio path") } diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index 9323a774a565..913b5cdc6be4 100644 +index 4a475a66ebdf..9fcb9853f71d 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -3,6 +3,7 @@ @@ -67,7 +67,7 @@ index 9323a774a565..913b5cdc6be4 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/components/media_app_ui/media_app_ui.gni") -@@ -325,6 +326,7 @@ template("chrome_paks") { +@@ -332,6 +333,7 @@ template("chrome_paks") { } } @@ -75,7 +75,7 @@ index 9323a774a565..913b5cdc6be4 100644 chrome_repack_locales("${target_name}_locales") { forward_variables_from(invoker, [ -@@ -347,14 +349,17 @@ template("chrome_paks") { +@@ -354,14 +356,17 @@ template("chrome_paks") { output_locales = locales } } @@ -95,18 +95,18 @@ index 9323a774a565..913b5cdc6be4 100644 public_deps += [ ":${target_name}_200_percent" ] } diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn -index 7c7af8c0d948..c7869c760b12 100644 +index a75484da690f..107e42c68592 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn -@@ -5,6 +5,7 @@ - import("//build/config/compiler/compiler.gni") +@@ -6,6 +6,7 @@ import("//build/config/compiler/compiler.gni") import("//build/config/features.gni") + import("//build/config/python.gni") import("//build/config/ui.gni") +import("//cef/libcef/features/features.gni") import("//chrome/process_version_rc_template.gni") import("//components/nacl/features.gni") import("//third_party/ffmpeg/ffmpeg_options.gni") -@@ -139,11 +140,13 @@ template("generate_mini_installer") { +@@ -144,11 +145,13 @@ 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 78c5c246f..5eba7de56 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,5 +1,5 @@ diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec -index a411c2a5788d..5001def6b476 100644 +index cb06259b198c..c5e4c54de5b8 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec @@ -685,4 +685,13 @@ diff --git a/patch/patches/linux_assets_path_1936.patch b/patch/patches/linux_assets_path_1936.patch index a23578e05..02fae26ce 100644 --- a/patch/patches/linux_assets_path_1936.patch +++ b/patch/patches/linux_assets_path_1936.patch @@ -25,10 +25,10 @@ index 0aaed76c1dda..517c3d8b5772 100644 if (base::PathExists(sandbox_candidate)) sandbox_binary = sandbox_candidate; diff --git ui/gl/init/gl_initializer_linux_x11.cc ui/gl/init/gl_initializer_linux_x11.cc -index 0c57d500c0d2..9e82845e7fce 100644 +index a5c030d5f3d3..a5a8c68d98c1 100644 --- ui/gl/init/gl_initializer_linux_x11.cc +++ ui/gl/init/gl_initializer_linux_x11.cc -@@ -87,7 +87,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { +@@ -86,7 +86,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { if (implementation == kGLImplementationSwiftShaderGL) { #if BUILDFLAG(ENABLE_SWIFTSHADER) base::FilePath module_path; @@ -37,7 +37,7 @@ index 0c57d500c0d2..9e82845e7fce 100644 return false; module_path = module_path.Append("swiftshader/"); -@@ -98,7 +98,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { +@@ -97,7 +97,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { #endif } else if (implementation == kGLImplementationEGLANGLE) { base::FilePath module_path; diff --git a/patch/patches/linux_poll_2466.patch b/patch/patches/linux_poll_2466.patch index 84f556f62..4db4f2b48 100644 --- a/patch/patches/linux_poll_2466.patch +++ b/patch/patches/linux_poll_2466.patch @@ -1,5 +1,5 @@ diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc -index 4e231b615e8f..a5100c0bf1c8 100644 +index 4e231b615e8f..ffb027ebb0a3 100644 --- base/files/file_path_watcher_linux.cc +++ base/files/file_path_watcher_linux.cc @@ -5,6 +5,7 @@ @@ -18,7 +18,7 @@ index 4e231b615e8f..a5100c0bf1c8 100644 #include #include #include -@@ -263,8 +265,10 @@ void InotifyReaderThreadDelegate::ThreadMain() { +@@ -263,19 +265,16 @@ void InotifyReaderThreadDelegate::ThreadMain() { PlatformThread::SetName("inotify_reader"); // Make sure the file descriptors are good for use with select(). @@ -30,10 +30,10 @@ index 4e231b615e8f..a5100c0bf1c8 100644 + } }; while (true) { - fd_set rfds; -@@ -272,10 +276,9 @@ void InotifyReaderThreadDelegate::ThreadMain() { - FD_SET(inotify_fd_, &rfds); - +- fd_set rfds; +- FD_ZERO(&rfds); +- FD_SET(inotify_fd_, &rfds); +- // Wait until some inotify events are available. - int select_result = - HANDLE_EINTR(select(inotify_fd_ + 1, &rfds, nullptr, nullptr, nullptr)); diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 29003f11d..0cbeeccec 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,5 +1,5 @@ diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 2ba623bd01aa..b7049ead1f69 100644 +index ef08004ce68e..8176517e8318 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -2,6 +2,7 @@ @@ -10,25 +10,25 @@ index 2ba623bd01aa..b7049ead1f69 100644 #include "base/message_loop/message_pump_win.h" #include -@@ -495,7 +496,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() { - ctx.event()->set_chrome_message_pump(); - msg_pump_data->set_sent_messages_in_queue(more_work_is_plausible); - }); -- has_msg = ::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE) != FALSE; -+ -+ // We should not process all window messages if we are in the context of an -+ // OS modal loop, i.e. in the context of a windows API call like MessageBox. -+ // This is to ensure that these messages are peeked out by the OS modal loop. -+ if (CurrentThread::Get()->os_modal_loop()) { -+ // We only peek out WM_PAINT and WM_TIMER here for reasons mentioned above. -+ has_msg = PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE) || -+ PeekMessage(&msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE); -+ } else { -+ has_msg = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE; -+ } +@@ -497,7 +498,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() { + ctx.event()->set_chrome_message_pump(); + msg_pump_data->set_sent_messages_in_queue(more_work_is_plausible); + }); +- has_msg = ::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE) != FALSE; ++ ++ // We should not process all window messages if we are in the context of an ++ // OS modal loop, i.e. in the context of a windows API call like MessageBox. ++ // This is to ensure that these messages are peeked out by the OS modal loop. ++ if (CurrentThread::Get()->os_modal_loop()) { ++ // We only peek out WM_PAINT and WM_TIMER here for reasons mentioned above. ++ has_msg = PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE) || ++ PeekMessage(&msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE); ++ } else { ++ has_msg = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE; ++ } + } } if (has_msg) - more_work_is_plausible |= ProcessMessageHelper(msg); diff --git base/task/current_thread.cc base/task/current_thread.cc index 068c4f837dab..50d1e4a0b770 100644 --- base/task/current_thread.cc diff --git a/patch/patches/mime_handler_view_embedder_1133115.patch b/patch/patches/mime_handler_view_embedder_1133115.patch new file mode 100644 index 000000000..60bf15e42 --- /dev/null +++ b/patch/patches/mime_handler_view_embedder_1133115.patch @@ -0,0 +1,13 @@ +diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_embedder.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_embedder.cc +index 045cc6e50916..205945f06910 100644 +--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_embedder.cc ++++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_embedder.cc +@@ -110,7 +110,7 @@ void MimeHandlerViewEmbedder::DidFinishNavigation( + return; + // We should've deleted the MimeHandlerViewEmbedder at this point if the frame + // is sandboxed. +- DCHECK(!render_frame_host_->IsSandboxed( ++ DCHECK(!render_frame_host_ || !render_frame_host_->IsSandboxed( + network::mojom::WebSandboxFlags::kPlugins)); + } + diff --git a/patch/patches/net_cookie_flags.patch b/patch/patches/net_cookie_flags.patch index 61d7af844..c6d18656e 100644 --- a/patch/patches/net_cookie_flags.patch +++ b/patch/patches/net_cookie_flags.patch @@ -10,24 +10,24 @@ index 96d1a51ec107..e8120a818b1f 100644 +// This load will not send any cookies. For CEF usage. +LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17) diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc -index f5e754f4ea02..5dd6fc5ca061 100644 +index dd533f15e3d0..3773c1b9cf2b 100644 --- net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc -@@ -567,7 +567,8 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() { +@@ -574,7 +574,8 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() { // Read cookies whenever allow_credentials() is true, even if the PrivacyMode // is being overridden by NetworkDelegate and will eventually block them, as // blocked cookies still need to be logged in that case. - if (cookie_store && request_->allow_credentials()) { + if (cookie_store && request_->allow_credentials() && + !(request_info_.load_flags & LOAD_DO_NOT_SEND_COOKIES)) { - CookieOptions options; - options.set_return_excluded_cookies(); - options.set_include_httponly(); + bool force_ignore_site_for_cookies = + request_->force_ignore_site_for_cookies(); + if (cookie_store->cookie_access_delegate() && diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc -index 8f1b36b6befd..979874409d23 100644 +index ee0150fbd6d0..03d167f6ccfd 100644 --- services/network/public/cpp/resource_request.cc +++ services/network/public/cpp/resource_request.cc -@@ -126,7 +126,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { +@@ -128,7 +128,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { } bool ResourceRequest::SendsCookies() const { diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index e2b643e08..587d640b3 100644 --- a/patch/patches/osr_fling_2745.patch +++ b/patch/patches/osr_fling_2745.patch @@ -41,10 +41,10 @@ index cc4b13a7b9c6..84f3b9ed7cf4 100644 } // namespace content diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc -index 529a5b71b998..dcc5eeda89d3 100644 +index 19f90228473a..46e86591c898 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -2831,6 +2831,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { +@@ -2814,6 +2814,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); } @@ -57,10 +57,10 @@ index 529a5b71b998..dcc5eeda89d3 100644 const WebInputEvent& event) { if ((base::FeatureList::IsEnabled( diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h -index 9d7d10136a68..eb989750dd5f 100644 +index aef170316a5e..2e1a0d1245c9 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h -@@ -730,6 +730,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -725,6 +725,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl void ProgressFlingIfNeeded(base::TimeTicks current_time); void StopFling(); diff --git a/patch/patches/print_preview_123.patch b/patch/patches/print_preview_123.patch index ea93591b4..35d704725 100644 --- a/patch/patches/print_preview_123.patch +++ b/patch/patches/print_preview_123.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc -index 1837e4c98e56..e6348c0e6dce 100644 +index 69a0e4c0e6fb..6751d51b8435 100644 --- chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc @@ -23,6 +23,7 @@ @@ -57,36 +57,78 @@ index 3fadaba3336f..5ef67b35883d 100644 // Add an entry to the map. preview_dialog_map_[preview_dialog] = initiator; +diff --git chrome/browser/printing/print_view_manager_base.cc chrome/browser/printing/print_view_manager_base.cc +index 277f2ca033d1..06465c4616a3 100644 +--- chrome/browser/printing/print_view_manager_base.cc ++++ chrome/browser/printing/print_view_manager_base.cc +@@ -21,6 +21,7 @@ + #include "base/threading/thread_task_runner_handle.h" + #include "base/timer/timer.h" + #include "build/build_config.h" ++#include "cef/libcef/features/runtime.h" + #include "chrome/browser/browser_process.h" + #include "chrome/browser/chrome_notification_types.h" + #include "chrome/browser/printing/print_job.h" +@@ -61,6 +62,10 @@ + #include "printing/printing_features.h" + #endif + ++#if BUILDFLAG(ENABLE_CEF) ++#include "cef/libcef/browser/printing/print_view_manager.h" ++#endif ++ + #if BUILDFLAG(ENABLE_PRINT_PREVIEW) + #include "chrome/browser/printing/print_error_dialog.h" + #endif +@@ -196,8 +201,11 @@ PrintViewManager* GetPrintViewManager(int render_process_id, + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + content::WebContents* web_contents = + GetWebContentsForRenderFrame(render_process_id, render_frame_id); +- return web_contents ? PrintViewManager::FromWebContents(web_contents) +- : nullptr; ++ if (!web_contents) ++ return nullptr; ++ if (cef::IsAlloyRuntimeEnabled()) ++ return CefPrintViewManager::FromWebContents(web_contents); ++ return PrintViewManager::FromWebContents(web_contents); + } + + void NotifySystemDialogCancelled(int render_process_id, int routing_id) { diff --git chrome/browser/printing/print_view_manager_base.h chrome/browser/printing/print_view_manager_base.h -index 1498facaafea..b5ef086b88b5 100644 +index e22cff218a56..6cff432e4f08 100644 --- chrome/browser/printing/print_view_manager_base.h +++ chrome/browser/printing/print_view_manager_base.h -@@ -115,7 +115,6 @@ class PrintViewManagerBase : public content::NotificationObserver, +@@ -118,9 +118,6 @@ class PrintViewManagerBase : public content::NotificationObserver, // Manages the low-level talk to the printer. scoped_refptr print_job_; - private: +- friend class TestPrintViewManager; +- // content::NotificationObserver implementation. void Observe(int type, const content::NotificationSource& source, -@@ -127,6 +126,7 @@ class PrintViewManagerBase : public content::NotificationObserver, +@@ -132,6 +129,9 @@ class PrintViewManagerBase : public content::NotificationObserver, // Cancels the print job. void NavigationStopped() override; + private: ++ friend class TestPrintViewManager; ++ // printing::PrintManager: void OnDidPrintDocument( content::RenderFrameHost* render_frame_host, diff --git chrome/browser/resources/print_preview/ui/destination_dialog.html chrome/browser/resources/print_preview/ui/destination_dialog.html -index bc7f30dba388..2cc53441f17d 100644 +index 01ac8b5153e1..20f5e5b9d099 100644 --- chrome/browser/resources/print_preview/ui/destination_dialog.html +++ chrome/browser/resources/print_preview/ui/destination_dialog.html -@@ -145,9 +145,7 @@ +@@ -133,10 +133,7 @@
-- +- - $i18n{manage} +- - +
@@ -108,7 +150,7 @@ index 6d3d49c902e7..4769176b9550 100644 hidden$="[[!noDestinations]]" selected$="[[noDestinations]]"> $i18n{noDestinationsMessage} diff --git chrome/browser/ui/webui/constrained_web_dialog_ui.cc chrome/browser/ui/webui/constrained_web_dialog_ui.cc -index b59728f623e3..6fd443962836 100644 +index 3d415a60d436..807ab41ee6ef 100644 --- chrome/browser/ui/webui/constrained_web_dialog_ui.cc +++ chrome/browser/ui/webui/constrained_web_dialog_ui.cc @@ -26,6 +26,8 @@ @@ -262,7 +304,7 @@ index 26954aeae08f..48afeb608f83 100644 base::FilePath GetSaveLocation() const; diff --git chrome/browser/ui/webui/print_preview/print_preview_handler.cc chrome/browser/ui/webui/print_preview/print_preview_handler.cc -index 2cea700c8279..03d086e4fa65 100644 +index adf2433423a5..6bfa66b75b93 100644 --- chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc @@ -24,6 +24,7 @@ @@ -273,16 +315,16 @@ index 2cea700c8279..03d086e4fa65 100644 #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/bad_message.h" #include "chrome/browser/browser_process.h" -@@ -1265,7 +1266,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( +@@ -1258,7 +1259,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( } return extension_printer_handler_.get(); } -#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) +#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) && !BUILDFLAG(ENABLE_CEF) - if (printer_type == PrinterType::kPrivet) { - if (!privet_printer_handler_) { - privet_printer_handler_ = -@@ -1273,6 +1274,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( + if (printer_type == PrinterType::kPrivet && + (base::FeatureList::IsEnabled(features::kForceEnablePrivetPrinting) || + GetPrefs()->GetBoolean( +@@ -1269,6 +1270,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( } return privet_printer_handler_.get(); } @@ -292,7 +334,7 @@ index 2cea700c8279..03d086e4fa65 100644 #endif if (printer_type == PrinterType::kPdf) { if (!pdf_printer_handler_) { -@@ -1345,6 +1349,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id, +@@ -1341,6 +1345,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id, } void PrintPreviewHandler::RegisterForGaiaCookieChanges() { @@ -300,7 +342,7 @@ index 2cea700c8279..03d086e4fa65 100644 DCHECK(!identity_manager_); cloud_print_enabled_ = !base::Contains(printer_type_deny_list_, PrinterType::kCloud) && -@@ -1361,6 +1366,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() { +@@ -1358,6 +1363,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() { identity_manager_ = IdentityManagerFactory::GetForProfile(profile); identity_manager_->AddObserver(this); @@ -309,7 +351,7 @@ index 2cea700c8279..03d086e4fa65 100644 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc -index 5999318f3620..d4ab6b034f73 100644 +index a1ddf703d113..b0b1f0272dd3 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -28,6 +28,7 @@ @@ -335,5 +377,5 @@ index 5999318f3620..d4ab6b034f73 100644 #endif +#endif // !BUILDFLAG(ENABLE_CEF) - #if !BUILDFLAG(OPTIMIZE_WEBUI) - constexpr char kGeneratedPath[] = + PrintPreviewUI::TestDelegate* g_test_delegate = nullptr; + diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index 37107c418..b2fe8e82f 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 89c7798d8ddf..63a1770d7b4e 100644 +index 8e648fa8d563..66a52ce51147 100644 --- chrome/browser/printing/print_job_worker.cc +++ chrome/browser/printing/print_job_worker.cc @@ -134,6 +134,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id) @@ -11,10 +11,10 @@ index 89c7798d8ddf..63a1770d7b4e 100644 PrintJobWorker::~PrintJobWorker() { diff --git printing/printing_context.h printing/printing_context.h -index 7ac9ce996ca7..7a2099349f3b 100644 +index 896d1b26f492..59d17b49f0d3 100644 --- printing/printing_context.h +++ printing/printing_context.h -@@ -133,6 +133,13 @@ class PRINTING_EXPORT PrintingContext { +@@ -134,6 +134,13 @@ class PRINTING_EXPORT PrintingContext { int job_id() const { return job_id_; } @@ -28,7 +28,7 @@ index 7ac9ce996ca7..7a2099349f3b 100644 protected: explicit PrintingContext(Delegate* delegate); -@@ -156,6 +163,10 @@ class PRINTING_EXPORT PrintingContext { +@@ -157,6 +164,10 @@ class PRINTING_EXPORT PrintingContext { // The job id for the current job. The value is 0 if no jobs are active. int job_id_; diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index bb925519a..ddc03fac4 100644 --- a/patch/patches/renderer_host_1070713.patch +++ b/patch/patches/renderer_host_1070713.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc -index 5326b36457f2..694aff3c7144 100644 +index d50a4f5c0c1b..25679e8a8948 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -584,6 +584,8 @@ bool RenderViewHostImpl::IsRenderViewLive() { +@@ -583,6 +583,8 @@ bool RenderViewHostImpl::IsRenderViewLive() { } void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { diff --git a/patch/patches/renderer_preferences_util_545103.patch b/patch/patches/renderer_preferences_util_545103.patch index e26fb84ad..b0bff6f2e 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 ddc3c1d4bdc4..8b5618a2b9b5 100644 +index ed40422ac8cf..51ca618a2f09 100644 --- chrome/browser/renderer_preferences_util.cc +++ chrome/browser/renderer_preferences_util.cc @@ -34,7 +34,8 @@ @@ -12,7 +12,7 @@ index ddc3c1d4bdc4..8b5618a2b9b5 100644 #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "ui/views/linux_ui/linux_ui.h" -@@ -164,7 +165,8 @@ void UpdateFromSystemSettings(blink::mojom::RendererPreferences* prefs, +@@ -153,7 +154,8 @@ void UpdateFromSystemSettings(blink::RendererPreferences* prefs, prefs->caret_blink_interval = interval; #endif diff --git a/patch/patches/resource_bundle_2512.patch b/patch/patches/resource_bundle_2512.patch index 5a04036a5..b7e4b7f8c 100644 --- a/patch/patches/resource_bundle_2512.patch +++ b/patch/patches/resource_bundle_2512.patch @@ -1,8 +1,8 @@ diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc -index d14bc858f566..0c9e50916bb1 100644 +index 2b24b4ce2e22..ad23c2d74f00 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc -@@ -868,6 +868,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) +@@ -875,6 +875,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) : delegate_(delegate), locale_resources_data_lock_(new base::Lock), max_scale_factor_(SCALE_FACTOR_100P) { @@ -15,7 +15,7 @@ index d14bc858f566..0c9e50916bb1 100644 mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMangleLocalizedStrings); } -@@ -877,6 +883,11 @@ ResourceBundle::~ResourceBundle() { +@@ -884,6 +890,11 @@ ResourceBundle::~ResourceBundle() { UnloadLocaleResources(); } @@ -28,10 +28,10 @@ index d14bc858f566..0c9e50916bb1 100644 void ResourceBundle::InitSharedInstance(Delegate* delegate) { DCHECK(g_shared_instance_ == nullptr) << "ResourceBundle initialized twice"; diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h -index 317ad685e414..1d3935b2ae3d 100644 +index 51dbdfab3962..a271d60679be 100644 --- ui/base/resource/resource_bundle.h +++ ui/base/resource/resource_bundle.h -@@ -161,6 +161,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle { +@@ -172,6 +172,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle { // Return the global resource loader instance. static ResourceBundle& GetSharedInstance(); diff --git a/patch/patches/runhooks.patch b/patch/patches/runhooks.patch index 1de25cae1..b5718ac18 100644 --- a/patch/patches/runhooks.patch +++ b/patch/patches/runhooks.patch @@ -1,5 +1,5 @@ diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py -index 58bf3e8caf4e..c224432e8af2 100644 +index 47309866ca79..d27ec9b50b2b 100644 --- build/toolchain/win/setup_toolchain.py +++ build/toolchain/win/setup_toolchain.py @@ -155,13 +155,17 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store): diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index d0b6a8b82..3dd52416c 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 f6cd4515bf8f..ba8da481274e 100644 +index 92e5c944d44b..f27972a4e2b7 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -678,10 +678,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { @@ -18,8 +18,8 @@ index f6cd4515bf8f..ba8da481274e 100644 + } } - void RenderWidgetHostViewAura::WindowTitleChanged() { -@@ -2046,6 +2048,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { + base::Optional RenderWidgetHostViewAura::GetDisplayFeature() { +@@ -2056,6 +2058,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { // Init(), because it needs to have the layer. if (frame_sink_id_.is_valid()) window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index 72b74274f..adeb4569d 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc -index 082cff368d80..7d7c2fe02646 100644 +index ed1b0c3bad29..5ed2c290fd2b 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc @@ -19,6 +19,7 @@ @@ -10,7 +10,7 @@ index 082cff368d80..7d7c2fe02646 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" -@@ -666,7 +667,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -661,7 +662,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( // Configure on-disk storage for non-OTR profiles. OTR profiles just use // default behavior (in memory storage, default sizes). @@ -31,7 +31,7 @@ index 082cff368d80..7d7c2fe02646 100644 PrefService* local_state = g_browser_process->local_state(); // Configure the HTTP cache path and size. base::FilePath base_cache_path; -@@ -679,7 +692,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -674,7 +687,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( base_cache_path.Append(chrome::kCacheDirname); network_context_params->http_cache_max_size = local_state->GetInteger(prefs::kDiskCacheSize); @@ -42,10 +42,10 @@ index 082cff368d80..7d7c2fe02646 100644 // change. network_context_params->http_server_properties_path = diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index 140b61a81dcd..bdad9d468e57 100644 +index 796d855211d9..5fac1444b3d5 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc -@@ -479,6 +479,25 @@ void CookieMonster::SetCookieableSchemes( +@@ -469,6 +469,25 @@ void CookieMonster::SetCookieableSchemes( MaybeRunCookieCallback(std::move(callback), true); } @@ -72,7 +72,7 @@ index 140b61a81dcd..bdad9d468e57 100644 void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) { DCHECK(thread_checker_.CalledOnValidThread()); diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h -index 57ce9d640ac0..8c4cc927cf15 100644 +index 2d45b2b113fd..fe0369aad18a 100644 --- net/cookies/cookie_monster.h +++ net/cookies/cookie_monster.h @@ -184,6 +184,8 @@ class NET_EXPORT CookieMonster : public CookieStore { @@ -101,10 +101,10 @@ index 5ffbe648343d..3d9a0f2e828f 100644 virtual void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, const std::string& parent_absolute_name) const; diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc -index 1d988375b00a..e71cbc3b612f 100644 +index 526ccf16da81..96ca62fbed3a 100644 --- services/network/cookie_manager.cc +++ services/network/cookie_manager.cc -@@ -228,14 +228,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { +@@ -231,14 +231,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { void CookieManager::AllowFileSchemeCookies( bool allow, AllowFileSchemeCookiesCallback callback) { @@ -123,32 +123,24 @@ index 1d988375b00a..e71cbc3b612f 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index 4de2f631d4d6..e9c066b50a07 100644 +index 3773583bedd0..31157bbf388a 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -1906,6 +1906,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1936,16 +1936,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( + network_service_->network_quality_estimator()); } - scoped_refptr session_cleanup_cookie_store; + std::unique_ptr cookie_store; - if (params_->cookie_path) { - scoped_refptr client_task_runner = - base::ThreadTaskRunnerHandle::Get(); -@@ -1932,18 +1933,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( - session_cleanup_cookie_store = - base::MakeRefCounted(sqlite_store); - + if (session_cleanup_cookie_store) { - std::unique_ptr cookie_store = + cookie_store = std::make_unique(session_cleanup_cookie_store.get(), net_log); if (params_->persist_session_cookies) cookie_store->SetPersistSessionCookies(true); -- + - builder.SetCookieStore(std::move(cookie_store)); - } else { - DCHECK(!params_->restore_old_session_cookies); - DCHECK(!params_->persist_session_cookies); ++ } else { + cookie_store = + std::make_unique(nullptr /* store */, net_log); + } @@ -165,7 +157,7 @@ index 4de2f631d4d6..e9c066b50a07 100644 trust_token_store_ = std::make_unique(); diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index dfeaf3c49e33..434e88d1cc0e 100644 +index 0a09398cf50e..f7452357c1f4 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom @@ -275,6 +275,9 @@ struct NetworkContextParams { diff --git a/patch/patches/services_network_2718.patch b/patch/patches/services_network_2718.patch index 5c70fd351..4d1fae4bc 100644 --- a/patch/patches/services_network_2718.patch +++ b/patch/patches/services_network_2718.patch @@ -1,8 +1,8 @@ diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc -index 9b5a44b6dd99..e90a651f6fba 100644 +index d5fa2604e741..1337e6369373 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -487,10 +487,6 @@ class LoginHandlerDelegate { +@@ -491,10 +491,6 @@ class LoginHandlerDelegate { } WebContents* web_contents = web_contents_getter_.Run(); @@ -14,10 +14,10 @@ index 9b5a44b6dd99..e90a651f6fba 100644 // WeakPtr is not strictly necessary here due to OnRequestCancelled. creating_login_delegate_ = true; @@ -547,12 +543,6 @@ void OnAuthRequiredContinuation( - web_contents_getter = - base::BindRepeating(GetWebContents, process_id, routing_id); - } -- if (!web_contents_getter.Run()) { + mojo::PendingRemote + auth_challenge_responder, + base::RepeatingCallback web_contents_getter) { +- if (!web_contents_getter || !web_contents_getter.Run()) { - mojo::Remote - auth_challenge_responder_remote(std::move(auth_challenge_responder)); - auth_challenge_responder_remote->OnAuthCredentials(base::nullopt); @@ -26,7 +26,7 @@ index 9b5a44b6dd99..e90a651f6fba 100644 new LoginHandlerDelegate(std::move(auth_challenge_responder), std::move(web_contents_getter), auth_info, is_request_for_main_frame, process_id, routing_id, -@@ -2421,8 +2411,12 @@ void StoragePartitionImpl::GetQuotaSettings( +@@ -2396,8 +2386,12 @@ void StoragePartitionImpl::GetQuotaSettings( return; } @@ -40,7 +40,7 @@ index 9b5a44b6dd99..e90a651f6fba 100644 storage::GetDefaultDeviceInfoHelper(), std::move(callback)); } -@@ -2434,6 +2428,11 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -2409,6 +2403,11 @@ void StoragePartitionImpl::InitNetworkContext() { GetContentClient()->browser()->ConfigureNetworkContextParams( browser_context_, is_in_memory_, relative_partition_path_, context_params.get(), cert_verifier_creation_params.get()); diff --git a/patch/patches/set_resize_background_color.patch b/patch/patches/set_resize_background_color.patch index 9c4b2ae3a..c2ff52981 100644 --- a/patch/patches/set_resize_background_color.patch +++ b/patch/patches/set_resize_background_color.patch @@ -1,8 +1,8 @@ diff --git ui/views/controls/native/native_view_host.cc ui/views/controls/native/native_view_host.cc -index d8e5cf4ddb62..59db8f266312 100644 +index f9e1aa1b455a..5795eca10540 100644 --- ui/views/controls/native/native_view_host.cc +++ ui/views/controls/native/native_view_host.cc -@@ -152,7 +152,7 @@ void NativeViewHost::OnPaint(gfx::Canvas* canvas) { +@@ -153,7 +153,7 @@ void NativeViewHost::OnPaint(gfx::Canvas* canvas) { // It would be nice if this used some approximation of the page's // current background color. if (native_wrapper_->HasInstalledClip()) @@ -39,10 +39,10 @@ index 71cba0d714bd..82d3d6baa909 100644 }; diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc -index 61e127ee3f2b..1efc22bfcc65 100644 +index 0168540929dd..5853796d9ef3 100644 --- ui/views/controls/webview/webview.cc +++ ui/views/controls/webview/webview.cc -@@ -139,6 +139,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, +@@ -127,6 +127,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, MaybeEnableAutoResize(); } @@ -54,10 +54,10 @@ index 61e127ee3f2b..1efc22bfcc65 100644 if (crashed_overlay_view_ == crashed_overlay_view) return; diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h -index f18eea14290b..98b60a041720 100644 +index 1d4d5cd5e5bb..d6c405d5f6ab 100644 --- ui/views/controls/webview/webview.h +++ ui/views/controls/webview/webview.h -@@ -84,6 +84,10 @@ class WEBVIEW_EXPORT WebView : public View, +@@ -78,6 +78,10 @@ class WEBVIEW_EXPORT WebView : public View, void EnableSizingFromWebContents(const gfx::Size& min_size, const gfx::Size& max_size); diff --git a/patch/patches/storage_incognito_2289.patch b/patch/patches/storage_incognito_2289.patch index 5039dcd08..e48bf759c 100644 --- a/patch/patches/storage_incognito_2289.patch +++ b/patch/patches/storage_incognito_2289.patch @@ -13,10 +13,10 @@ index 676c2cc22bac..e6f9642e1cba 100644 {base::MayBlock(), base::TaskPriority::USER_VISIBLE, base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}); diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index 13837eb391ce..e3a15a7158b2 100644 +index de0194134356..4fa70303a0df 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc -@@ -251,7 +251,7 @@ StoragePartition* BrowserContext::GetStoragePartition( +@@ -245,7 +245,7 @@ StoragePartition* BrowserContext::GetStoragePartition( GetStoragePartitionMap(browser_context); auto config_to_use = storage_partition_config; @@ -25,7 +25,7 @@ index 13837eb391ce..e3a15a7158b2 100644 config_to_use = storage_partition_config.CopyWithInMemorySet(); return partition_map->Get(config_to_use, can_create); -@@ -573,7 +573,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() { +@@ -555,7 +555,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() { kUseInMemoryDBDefault); std::unique_ptr stats_db; diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 463c8ed47..11a264fd1 100644 --- a/patch/patches/trace_event.patch +++ b/patch/patches/trace_event.patch @@ -1,5 +1,5 @@ diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h -index 97830615a4e2..63efe4c35ecb 100644 +index fe91c29db493..8f8ddb489950 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h @@ -58,6 +58,8 @@ diff --git a/patch/patches/ui_dragdrop_355390.patch b/patch/patches/ui_dragdrop_355390.patch index 7fbc5d4d1..aaa33fe71 100644 --- a/patch/patches/ui_dragdrop_355390.patch +++ b/patch/patches/ui_dragdrop_355390.patch @@ -1,8 +1,8 @@ diff --git ui/base/x/x11_os_exchange_data_provider.cc ui/base/x/x11_os_exchange_data_provider.cc -index ef6463f78c6c..fa9020caea8d 100644 +index d76cbc9d28cf..935008dc722e 100644 --- ui/base/x/x11_os_exchange_data_provider.cc +++ ui/base/x/x11_os_exchange_data_provider.cc -@@ -120,7 +120,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url, +@@ -121,7 +121,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url, format_map_.Insert(gfx::GetAtom(kMimeTypeMozillaURL), mem); // Set a string fallback as well. diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index 008946a67..13fb1ff8b 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -43,7 +43,7 @@ index c746b37d6278..b6cebc24b73e 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index 3dc9e4daf46d..f5b2eb00f36f 100644 +index bae9421235d5..09a602dad248 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc @@ -615,6 +615,14 @@ void RenderText::SetWhitespaceElision(base::Optional whitespace_elision) { @@ -61,7 +61,7 @@ index 3dc9e4daf46d..f5b2eb00f36f 100644 void RenderText::SetDisplayRect(const Rect& r) { if (r != display_rect_) { display_rect_ = r; -@@ -1966,6 +1974,19 @@ void RenderText::OnTextAttributeChanged() { +@@ -1991,6 +1999,19 @@ void RenderText::OnTextAttributeChanged() { layout_text_up_to_date_ = false; @@ -82,7 +82,7 @@ index 3dc9e4daf46d..f5b2eb00f36f 100644 } diff --git ui/gfx/render_text.h ui/gfx/render_text.h -index 4b39abb9d16c..c3b5debf995b 100644 +index 29c589ee9fe6..aa0029552322 100644 --- ui/gfx/render_text.h +++ ui/gfx/render_text.h @@ -346,6 +346,10 @@ class GFX_EXPORT RenderText { @@ -96,7 +96,7 @@ index 4b39abb9d16c..c3b5debf995b 100644 const Rect& display_rect() const { return display_rect_; } void SetDisplayRect(const Rect& r); -@@ -1049,6 +1053,8 @@ class GFX_EXPORT RenderText { +@@ -1053,6 +1057,8 @@ class GFX_EXPORT RenderText { // Tell whether or not the |layout_text_| needs an update or is up to date. mutable bool layout_text_up_to_date_ = false; @@ -106,7 +106,7 @@ index 4b39abb9d16c..c3b5debf995b 100644 }; diff --git ui/views/animation/ink_drop_host_view.h ui/views/animation/ink_drop_host_view.h -index 7a6dda99623b..7476e8966285 100644 +index ce6581cbc3c4..c935a9cd7cff 100644 --- ui/views/animation/ink_drop_host_view.h +++ ui/views/animation/ink_drop_host_view.h @@ -142,6 +142,8 @@ class VIEWS_EXPORT InkDropHostView : public View { @@ -119,10 +119,10 @@ index 7a6dda99623b..7476e8966285 100644 // Size used for the default SquareInkDropRipple. static constexpr gfx::Size kDefaultInkDropSize = gfx::Size(24, 24); diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index b8dada677222..87d790657722 100644 +index 563bc70f4961..65c7061e66c8 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc -@@ -513,6 +513,12 @@ void LabelButton::OnThemeChanged() { +@@ -503,6 +503,12 @@ void LabelButton::OnThemeChanged() { SchedulePaint(); } @@ -136,10 +136,10 @@ index b8dada677222..87d790657722 100644 Button::StateChanged(old_state); ResetLabelEnabledColor(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index 4990f7e6ee48..c111e11f5100 100644 +index 5dbf8e3e9c86..0ae8315c1b3a 100644 --- ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h -@@ -134,6 +134,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { +@@ -133,6 +133,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { ui::NativeTheme::State GetForegroundThemeState( ui::NativeTheme::ExtraParams* params) const override; @@ -150,10 +150,10 @@ index 4990f7e6ee48..c111e11f5100 100644 ImageView* image() const { return image_; } Label* label() const { return label_; } diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index 66ce6e76618b..ac584d47cea9 100644 +index 70370d27c47d..4731271438ad 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc -@@ -47,12 +47,27 @@ enum LabelPropertyKey { +@@ -49,12 +49,27 @@ enum LabelPropertyKey { kLabelLineHeight, kLabelObscured, kLabelAllowCharacterBreak, @@ -181,7 +181,7 @@ index 66ce6e76618b..ac584d47cea9 100644 } // namespace namespace views { -@@ -353,6 +368,15 @@ base::string16 Label::GetTooltipText() const { +@@ -378,6 +393,15 @@ base::string16 Label::GetTooltipText() const { return tooltip_text_; } @@ -197,7 +197,7 @@ index 66ce6e76618b..ac584d47cea9 100644 void Label::SetTooltipText(const base::string16& tooltip_text) { DCHECK(handles_tooltips_); if (tooltip_text_ == tooltip_text) -@@ -619,7 +643,19 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -652,7 +676,19 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SetFontList(font_list()); render_text->set_shadows(GetShadows()); render_text->SetCursorEnabled(false); @@ -219,10 +219,10 @@ index 66ce6e76618b..ac584d47cea9 100644 render_text->SetMultiline(multiline); render_text->SetMaxLines(multiline ? GetMaxLines() : 0); diff --git ui/views/controls/label.h ui/views/controls/label.h -index f5b59c83c526..da238ea0a4ae 100644 +index 0a6bac23a2f6..fc5becc010c1 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h -@@ -199,6 +199,10 @@ class VIEWS_EXPORT Label : public View, +@@ -211,6 +211,10 @@ class VIEWS_EXPORT Label : public View, gfx::ElideBehavior GetElideBehavior() const; void SetElideBehavior(gfx::ElideBehavior elide_behavior); @@ -233,7 +233,7 @@ index f5b59c83c526..da238ea0a4ae 100644 // Gets/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 -@@ -433,6 +437,7 @@ class VIEWS_EXPORT Label : public View, +@@ -451,6 +455,7 @@ class VIEWS_EXPORT Label : public View, bool collapse_when_hidden_ = false; int fixed_width_ = 0; int max_width_ = 0; @@ -242,10 +242,10 @@ index f5b59c83c526..da238ea0a4ae 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index e6a96689ef60..5dd54e402ce8 100644 +index 68adbe09fa85..1e489a5edd41 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -2689,8 +2689,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( +@@ -2727,8 +2727,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -260,7 +260,7 @@ index e6a96689ef60..5dd54e402ce8 100644 MenuItemView* to_select = nullptr; if (!item->GetSubmenu()->GetMenuItems().empty()) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2709,8 +2714,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2747,8 +2752,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -312,10 +312,10 @@ index 158724b4752c..c82192848584 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 aaaddc97e057..2a335d26c3f9 100644 +index 38bb7252ab75..c9f86dc25b05 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -1075,6 +1075,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1043,6 +1043,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, spilling_rect.set_y(spilling_rect.y() - corner_radius_); spilling_rect.set_height(spilling_rect.height() + corner_radius_); canvas->DrawRoundRect(spilling_rect, corner_radius_, flags); @@ -331,7 +331,7 @@ index aaaddc97e057..2a335d26c3f9 100644 } else if (render_selection) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == Type::kActionableSubMenu) { -@@ -1142,6 +1151,13 @@ void MenuItemView::PaintMinorIconAndText( +@@ -1110,6 +1119,13 @@ void MenuItemView::PaintMinorIconAndText( } SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const { @@ -453,10 +453,10 @@ index 78f832fd3acf..cb030c991614 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 979e2222ad7c..3644db9f087d 100644 +index 4771d1d6e859..ed9f1ff96928 100644 --- ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc -@@ -200,6 +200,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) +@@ -201,6 +201,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) scroll_down_button_ = AddChildView(std::make_unique(content_view, false)); @@ -469,10 +469,10 @@ index 979e2222ad7c..3644db9f087d 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 82135658e188..53674f44d5d1 100644 +index 64e09ff4359a..714e8e9ff661 100644 --- ui/views/test/ui_controls_factory_desktop_aurax11.cc +++ ui/views/test/ui_controls_factory_desktop_aurax11.cc -@@ -135,10 +135,6 @@ class UIControlsDesktopX11 : public UIControlsAura { +@@ -89,10 +89,6 @@ class UIControlsDesktopX11 : public UIControlsAura { aura::test::QueryLatestMousePositionRequestInHost(host); host->ConvertPixelsToDIP(&root_current_location); @@ -480,11 +480,11 @@ index 82135658e188..53674f44d5d1 100644 - DCHECK_EQ(screen, display::Screen::GetScreen()); - screen->set_cursor_screen_point(gfx::Point(screen_x, screen_y)); - - if (root_location != root_current_location && button_down_mask == 0) { + if (root_location != root_current_location && + x11_ui_controls_test_helper_.ButtonDownMask() == 0) { // 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 ff42e9282492..b1f65d8e2c4d 100644 +index 6fb298b16599..e2c0bdb1fcb3 100644 --- ui/views/view.h +++ ui/views/view.h @@ -24,6 +24,7 @@ @@ -495,7 +495,7 @@ index ff42e9282492..b1f65d8e2c4d 100644 #include "build/build_config.h" #include "third_party/skia/include/core/SkPath.h" #include "ui/accessibility/ax_enums.mojom-forward.h" -@@ -274,6 +275,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, +@@ -273,6 +274,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, public ui::EventTarget, public ui::EventHandler, public ui::PropertyHandler, diff --git a/patch/patches/views_widget.patch b/patch/patches/views_widget.patch index 48ff9c85d..ac53bb2d9 100644 --- a/patch/patches/views_widget.patch +++ b/patch/patches/views_widget.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 b2139c2e9ee8..555121d711bb 100644 +index 2c87779ffd03..8fcc0868208d 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc @@ -532,6 +532,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() { @@ -18,7 +18,7 @@ index b2139c2e9ee8..555121d711bb 100644 if (!GetMouseWheelPhaseHandler()) return; diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h -index 5b2aa87a53fa..302626b947c6 100644 +index 1dbaa5f457cf..4408578efa24 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h @@ -66,6 +66,7 @@ class CursorManager; @@ -29,7 +29,7 @@ index 5b2aa87a53fa..302626b947c6 100644 class SyntheticGestureTarget; class TextInputManager; class TouchSelectionControllerClientManager; -@@ -79,6 +80,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -78,6 +79,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { float current_device_scale_factor() const { return current_device_scale_factor_; } @@ -39,7 +39,7 @@ index 5b2aa87a53fa..302626b947c6 100644 // Returns the focused RenderWidgetHost inside this |view|'s RWH. RenderWidgetHostImpl* GetFocusedWidget() const; -@@ -112,6 +116,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -111,6 +115,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { const gfx::Size& max_size) override; void DisableAutoResize(const gfx::Size& new_size) override; float GetDeviceScaleFactor() final; @@ -48,7 +48,7 @@ index 5b2aa87a53fa..302626b947c6 100644 TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; void SetRecordContentToVisibleTimeRequest( -@@ -418,6 +424,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -417,6 +423,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 5b2aa87a53fa..302626b947c6 100644 // Sets the cursor for this view to the one associated with the specified // cursor_type. virtual void UpdateCursor(const WebCursor& cursor) = 0; -@@ -598,6 +610,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -596,6 +608,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { protected: ~RenderWidgetHostViewBase() override; @@ -73,7 +73,7 @@ index 5b2aa87a53fa..302626b947c6 100644 FRIEND_TEST_ALL_PREFIXES( BrowserSideFlingBrowserTest, 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 b49d2f96efec..d6308880de1b 100644 +index 9b08733085c9..419136ac2f13 100644 --- content/browser/renderer_host/render_widget_host_view_event_handler.cc +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc @@ -37,6 +37,10 @@ @@ -87,7 +87,7 @@ index b49d2f96efec..d6308880de1b 100644 #if defined(OS_WIN) #include "content/browser/renderer_host/render_frame_host_impl.h" #include "ui/aura/window_tree_host.h" -@@ -956,6 +960,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter( +@@ -957,6 +961,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter( } return; } @@ -102,7 +102,7 @@ index b49d2f96efec..d6308880de1b 100644 #endif synthetic_move_position_ = center_in_screen; } -@@ -985,6 +997,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition( +@@ -986,6 +998,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition( } void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { @@ -140,10 +140,10 @@ index beba7a3a40b8..941acdfbff8b 100644 // Set the view's active state (i.e., tint state of controls). virtual void SetActive(bool active) = 0; diff --git ui/base/x/x11_window.cc ui/base/x/x11_window.cc -index 7d151df864f4..b8f58d9294d5 100644 +index 988ffa93bf2c..a7bd217b60ac 100644 --- ui/base/x/x11_window.cc +++ ui/base/x/x11_window.cc -@@ -264,7 +264,8 @@ void XWindow::Init(const Configuration& config) { +@@ -263,7 +263,8 @@ void XWindow::Init(const Configuration& config) { req.border_pixel = 0; bounds_in_pixels_ = SanitizeBounds(config.bounds); @@ -154,7 +154,7 @@ index 7d151df864f4..b8f58d9294d5 100644 req.y = bounds_in_pixels_.y(); req.width = bounds_in_pixels_.width(); diff --git ui/base/x/x11_window.h ui/base/x/x11_window.h -index af282d4190dd..147a2cd9ac4c 100644 +index 4078ea5dc7be..25f37c487399 100644 --- ui/base/x/x11_window.h +++ ui/base/x/x11_window.h @@ -21,6 +21,7 @@ @@ -164,8 +164,8 @@ index af282d4190dd..147a2cd9ac4c 100644 +#include "ui/gfx/native_widget_types.h" #include "ui/gfx/x/event.h" #include "ui/gfx/x/sync.h" - #include "ui/gfx/x/x11.h" -@@ -93,6 +94,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XWindow { + #include "ui/gfx/x/xfixes.h" +@@ -91,6 +92,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XWindow { std::string wm_class_name; std::string wm_class_class; std::string wm_role_name; @@ -174,10 +174,10 @@ index af282d4190dd..147a2cd9ac4c 100644 XWindow(); diff --git ui/platform_window/x11/x11_window.cc ui/platform_window/x11/x11_window.cc -index 7941edf6d3cb..520af3c90e97 100644 +index 022864f249be..5cc2d7b3bf21 100644 --- ui/platform_window/x11/x11_window.cc +++ ui/platform_window/x11/x11_window.cc -@@ -93,6 +93,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig( +@@ -92,6 +92,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig( config.wm_class_class = properties.wm_class_class; config.wm_role_name = properties.wm_role_name; config.activatable = properties.activatable; @@ -314,11 +314,11 @@ index 0229c1c41502..992f89126f7f 100644 // a reference. corewm::TooltipWin* tooltip_; diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 710d52bcc34f..25608ba3d188 100644 +index c27777b9e958..ef566619e55a 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc -@@ -283,7 +283,8 @@ void Widget::Init(InitParams params) { - params.name = params.delegate->GetContentsView()->GetClassName(); +@@ -309,7 +309,8 @@ void Widget::Init(InitParams params) { + parent_ = params.parent ? GetWidgetForNativeView(params.parent) : nullptr; params.child |= (params.type == InitParams::TYPE_CONTROL); - is_top_level_ = !params.child; @@ -327,7 +327,7 @@ index 710d52bcc34f..25608ba3d188 100644 if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred && params.type != views::Widget::InitParams::TYPE_WINDOW) { -@@ -365,7 +366,12 @@ void Widget::Init(InitParams params) { +@@ -391,7 +392,12 @@ void Widget::Init(InitParams params) { } } else if (delegate) { SetContentsView(delegate->TransferOwnershipOfContentsView()); @@ -341,7 +341,7 @@ index 710d52bcc34f..25608ba3d188 100644 } observer_manager_.Add(GetNativeTheme()); -@@ -1149,10 +1155,16 @@ void Widget::OnNativeWidgetDestroyed() { +@@ -1175,10 +1181,16 @@ void Widget::OnNativeWidgetDestroyed() { } gfx::Size Widget::GetMinimumSize() const { @@ -359,10 +359,10 @@ index 710d52bcc34f..25608ba3d188 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index bb19a2cceb28..d62b6dbbecc9 100644 +index 97886b70e63a..cc43f791a466 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h -@@ -317,6 +317,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -318,6 +318,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // the concept with bubble anchoring a la BubbleDialogDelegateView. gfx::NativeView parent = nullptr; @@ -372,10 +372,10 @@ index bb19a2cceb28..d62b6dbbecc9 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 ce51f9d0f350..1121f523be23 100644 +index 211ac11173e7..132d12d636a2 100644 --- ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h -@@ -332,6 +332,10 @@ class VIEWS_EXPORT WidgetDelegate { +@@ -377,6 +377,10 @@ class VIEWS_EXPORT WidgetDelegate { // Returns true if the title text should be centered. bool ShouldCenterWindowTitleText() const; @@ -384,8 +384,8 @@ index ce51f9d0f350..1121f523be23 100644 + virtual bool MaybeGetMaximumSize(gfx::Size* size) const { return false; } + bool focus_traverses_out() const { return params_.focus_traverses_out; } - bool owned_by_widget() const { return params_.owned_by_widget; } - + bool enable_arrow_key_traversal() const { + return params_.enable_arrow_key_traversal; diff --git ui/views/widget/widget_hwnd_utils.cc ui/views/widget/widget_hwnd_utils.cc index 89f5b62f95df..8f6971929a12 100644 --- ui/views/widget/widget_hwnd_utils.cc @@ -400,10 +400,10 @@ index 89f5b62f95df..8f6971929a12 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 754528f7d280..c929712cbd0d 100644 +index 5e202cabf38c..d67d5f17827f 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -3074,10 +3074,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3107,10 +3107,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } else if (event.type() == ui::ET_MOUSEWHEEL) { ui::MouseWheelEvent mouse_wheel_event(msg); // Reroute the mouse wheel to the window under the pointer if applicable. diff --git a/patch/patches/viz_osr_2575.patch b/patch/patches/viz_osr_2575.patch index 2fb8c6b53..a78f662fd 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -80,10 +80,10 @@ index 1026b739d283..fe562ab60ce9 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index 3d3fc4f52270..a9c9c5324a62 100644 +index 92acbc3a25c6..5493e97f9160 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn -@@ -183,6 +183,8 @@ viz_component("service") { +@@ -176,6 +176,8 @@ viz_component("service") { "surfaces/surface_reference.cc", "surfaces/surface_reference.h", "viz_service_export.h", @@ -93,18 +93,18 @@ index 3d3fc4f52270..a9c9c5324a62 100644 defines = [ "VIZ_SERVICE_IMPLEMENTATION" ] diff --git components/viz/service/display_embedder/output_surface_provider_impl.cc components/viz/service/display_embedder/output_surface_provider_impl.cc -index 2da653cc9c3c..e536a34dca33 100644 +index 54686950a28c..a62178180d51 100644 --- components/viz/service/display_embedder/output_surface_provider_impl.cc +++ components/viz/service/display_embedder/output_surface_provider_impl.cc -@@ -14,6 +14,7 @@ +@@ -15,6 +15,7 @@ #include "base/threading/thread_task_runner_handle.h" #include "build/chromecast_buildflags.h" #include "cc/base/switches.h" +#include "cef/libcef/browser/osr/software_output_device_proxy.h" #include "components/viz/common/display/renderer_settings.h" #include "components/viz/common/frame_sinks/begin_frame_source.h" - #include "components/viz/service/display_embedder/gl_output_surface.h" -@@ -225,6 +226,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( + #include "components/viz/service/display/display_compositor_memory_and_task_controller.h" +@@ -244,6 +245,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( if (headless_) return std::make_unique(); @@ -142,7 +142,7 @@ index 2bb30e5318b6..535535dd6c10 100644 TRACE_EVENT_ASYNC_BEGIN0("viz", "SoftwareOutputDeviceWinProxy::Draw", this); diff --git content/browser/compositor/viz_process_transport_factory.cc content/browser/compositor/viz_process_transport_factory.cc -index 04da825a6b5d..3c63015b9b6c 100644 +index 18f8a89820e5..ac4fec9fd947 100644 --- content/browser/compositor/viz_process_transport_factory.cc +++ content/browser/compositor/viz_process_transport_factory.cc @@ -407,8 +407,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( @@ -214,7 +214,7 @@ index 6b7fbb6cf13d..e2af75168cb9 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 32cdffd116b7..d0303c7e79d9 100644 +index dc011fe48e2a..60743cbaa548 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -25,7 +25,9 @@ diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index 4fcbc2873..89118bf71 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 c3a2e5c241e3..4f746c94f316 100644 +index cef3171a9987..7819fd0cafbe 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -2763,7 +2763,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2744,7 +2744,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { // main frame - let's do the same thing here. std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -16,7 +16,7 @@ index c3a2e5c241e3..4f746c94f316 100644 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2774,6 +2780,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2755,6 +2761,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -24,7 +24,7 @@ index c3a2e5c241e3..4f746c94f316 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -3645,6 +3652,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -3576,6 +3583,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( // objects. create_params.renderer_initiated_creation = !is_new_browsing_instance; @@ -40,7 +40,7 @@ index c3a2e5c241e3..4f746c94f316 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -7586,6 +7602,10 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, +@@ -7432,6 +7448,10 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, // This is an outermost WebContents. SetAsFocusedWebContentsIfNecessary(); } @@ -64,10 +64,10 @@ index f1dcf53ea481..192f7c0ddd04 100644 WebContents::CreateParams::CreateParams(const CreateParams& other) = default; diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index 0426cc1550f1..2c56fccadd2d 100644 +index 0270206115ff..dc4ff89b5003 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h -@@ -86,8 +86,10 @@ class BrowserContext; +@@ -87,8 +87,10 @@ class BrowserContext; class BrowserPluginGuestDelegate; class RenderFrameHost; class RenderViewHost; @@ -78,7 +78,7 @@ index 0426cc1550f1..2c56fccadd2d 100644 class WebUI; struct CustomContextMenuContext; struct DropData; -@@ -221,6 +223,10 @@ class WebContents : public PageNavigator, +@@ -222,6 +224,10 @@ class WebContents : public PageNavigator, // Sandboxing flags set on the new WebContents. network::mojom::WebSandboxFlags starting_sandbox_flags; @@ -90,10 +90,10 @@ index 0426cc1550f1..2c56fccadd2d 100644 // the value that'll be returned by GetLastActiveTime(). If this is left // default initialized then the value is not passed on to the WebContents diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h -index ee6b87d40496..338064935cc4 100644 +index 775591c60fc9..341c55df8f1e 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h -@@ -62,10 +62,12 @@ class EyeDropperListener; +@@ -60,10 +60,12 @@ class EyeDropperListener; class FileSelectListener; class JavaScriptDialogManager; class RenderFrameHost; @@ -106,7 +106,7 @@ index ee6b87d40496..338064935cc4 100644 struct ContextMenuParams; struct DropData; struct MediaPlayerWatchTime; -@@ -338,6 +340,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -337,6 +339,14 @@ class CONTENT_EXPORT WebContentsDelegate { const std::string& partition_id, SessionStorageNamespace* session_storage_namespace); @@ -122,10 +122,10 @@ index ee6b87d40496..338064935cc4 100644 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h -index 301fa10bcc3e..37ec8ddd4583 100644 +index 6f9a949f9e67..4719562a34e9 100644 --- content/public/browser/web_contents_observer.h +++ content/public/browser/web_contents_observer.h -@@ -613,6 +613,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener { +@@ -605,6 +605,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener { // WebContents has gained/lost focus. virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {} diff --git a/patch/patches/web_url_loader_cancel_1617042.patch b/patch/patches/web_url_loader_cancel_1617042.patch index 43f93a805..03d89ed96 100644 --- a/patch/patches/web_url_loader_cancel_1617042.patch +++ b/patch/patches/web_url_loader_cancel_1617042.patch @@ -1,18 +1,18 @@ diff --git content/renderer/loader/web_url_loader_impl.h content/renderer/loader/web_url_loader_impl.h -index 7b00faa7376d..62345e79ebac 100644 +index 71ddc4cd98aa..714d1612e4eb 100644 --- content/renderer/loader/web_url_loader_impl.h +++ content/renderer/loader/web_url_loader_impl.h -@@ -88,6 +88,7 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { - bool download_to_network_cache_only, - bool no_mime_sniffing, +@@ -99,6 +99,7 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { + std::unique_ptr + resource_load_info_notifier_wrapper, blink::WebURLLoaderClient* client) override; + void Cancel() override; void SetDefersLoading(bool value) override; void DidChangePriority(blink::WebURLRequest::Priority new_priority, int intra_priority_value) override; -@@ -98,8 +99,6 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { +@@ -109,8 +110,6 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { + class Context; class RequestPeerImpl; - class SinkPeer; - void Cancel(); - @@ -20,11 +20,11 @@ index 7b00faa7376d..62345e79ebac 100644 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); diff --git third_party/blink/public/platform/web_url_loader.h third_party/blink/public/platform/web_url_loader.h -index 7f1b0efcdff9..24b5561d24d8 100644 +index 18f605fdf283..760e690ac3d2 100644 --- third_party/blink/public/platform/web_url_loader.h +++ third_party/blink/public/platform/web_url_loader.h -@@ -91,6 +91,10 @@ class WebURLLoader { - bool no_mime_sniffing, +@@ -94,6 +94,10 @@ class WebURLLoader { + std::unique_ptr, WebURLLoaderClient*) = 0; + // Cancels an asynchronous load. This will appear as a load error to diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index fe0a7ccf5..7336b1d82 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -10,12 +10,12 @@ index ff7a8ed89e94..77f44956ff22 100644 + GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array plugins); }; diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index 4c05fb9099e2..fadbb37d97ef 100644 +index 358f3c1d004c..43204c5d6d88 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -697,6 +697,11 @@ class BLINK_PLATFORM_EXPORT Platform { - // runs during Chromium's build step). - virtual bool IsTakingV8ContextSnapshot() { return false; } +@@ -754,6 +754,11 @@ class BLINK_PLATFORM_EXPORT Platform { + // unset pass an empty WebURL and WebString. + virtual void SetActiveURL(const WebURL& url, const WebString& top_url) {} + // DevTools ------------------------------------------------------------ + @@ -44,10 +44,10 @@ index d49dc7cb85d5..dc4af48a458d 100644 DocumentInit& DocumentInit::WithTypeFrom(const String& mime_type) { diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc -index c00d6f81db12..17c54cd0ca08 100644 +index 4315a68fb8d5..efcf6760b52e 100644 --- third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc -@@ -1698,7 +1698,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { +@@ -1795,7 +1795,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { PluginData* LocalFrame::GetPluginData() const { if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) return nullptr; @@ -85,10 +85,10 @@ index 0608c4defc6d..54eaa2197957 100644 void DevToolsSession::DispatchProtocolCommand( diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc -index c87fcbaaa194..2baae5c3bc64 100644 +index 5e42e49edcef..85932795bc65 100644 --- third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc -@@ -211,7 +211,8 @@ Page::Page(PageClients& page_clients) +@@ -220,7 +220,8 @@ Page::Page(PageClients& page_clients) MakeGarbageCollected(GetVisualViewport(), GetChromeClient())), link_highlight_(MakeGarbageCollected(*this)), @@ -98,7 +98,7 @@ index c87fcbaaa194..2baae5c3bc64 100644 // TODO(pdr): Initialize |validation_message_client_| lazily. validation_message_client_( MakeGarbageCollected(*this)), -@@ -391,21 +392,41 @@ void Page::InitialStyleChanged() { +@@ -400,21 +401,41 @@ void Page::InitialStyleChanged() { } } @@ -149,7 +149,7 @@ index c87fcbaaa194..2baae5c3bc64 100644 page->NotifyPluginsChanged(); } } -@@ -911,7 +932,8 @@ void Page::Trace(Visitor* visitor) const { +@@ -930,7 +951,8 @@ void Page::Trace(Visitor* visitor) const { visitor->Trace(link_highlight_); visitor->Trace(spatial_navigation_controller_); visitor->Trace(main_frame_); @@ -160,10 +160,10 @@ index c87fcbaaa194..2baae5c3bc64 100644 visitor->Trace(agent_metrics_collector_); visitor->Trace(plugins_changed_observers_); diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h -index 4e4e496eb088..ed2ded8a397b 100644 +index 65b72a9867bc..98569071f8b9 100644 --- third_party/blink/renderer/core/page/page.h +++ third_party/blink/renderer/core/page/page.h -@@ -149,7 +149,8 @@ class CORE_EXPORT Page final : public GarbageCollected, +@@ -153,7 +153,8 @@ class CORE_EXPORT Page final : public GarbageCollected, ViewportDescription GetViewportDescription() const; // Returns the plugin data associated with |main_frame_origin|. @@ -173,7 +173,7 @@ index 4e4e496eb088..ed2ded8a397b 100644 // Resets the plugin data for all pages in the renderer process and notifies // PluginsChangedObservers. -@@ -426,7 +427,8 @@ class CORE_EXPORT Page final : public GarbageCollected, +@@ -437,7 +438,8 @@ class CORE_EXPORT Page final : public GarbageCollected, const Member link_highlight_; Member spatial_navigation_controller_; diff --git a/patch/patches/webkit_popups_and_background.patch b/patch/patches/webkit_popups_and_background.patch index ef65f8fa8..c9a128ab3 100644 --- a/patch/patches/webkit_popups_and_background.patch +++ b/patch/patches/webkit_popups_and_background.patch @@ -1,20 +1,20 @@ diff --git third_party/blink/common/web_preferences/web_preferences.cc third_party/blink/common/web_preferences/web_preferences.cc -index 980bd49381eb..d84817bd0388 100644 +index 030a534b2fd1..934abdbc22e6 100644 --- third_party/blink/common/web_preferences/web_preferences.cc +++ third_party/blink/common/web_preferences/web_preferences.cc -@@ -145,6 +145,7 @@ WebPreferences::WebPreferences() - accelerated_video_decode_enabled(false), - animation_policy(kImageAnimationPolicyAllowed), +@@ -149,6 +149,7 @@ WebPreferences::WebPreferences() + animation_policy( + blink::mojom::ImageAnimationPolicy::kImageAnimationPolicyAllowed), user_gesture_required_for_presentation(true), + base_background_color(0xFFFFFFFF), // Color::kWhite text_tracks_enabled(false), text_track_margin_percentage(0.0f), immersive_mode_enabled(false), diff --git third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -index 4cbfb72c25d1..2e5261e4d714 100644 +index 945a58c91efa..b5bee8f615ef 100644 --- third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -@@ -465,6 +465,7 @@ bool StructTraitsuser_gesture_required_for_presentation = data.user_gesture_required_for_presentation(); @@ -23,7 +23,7 @@ index 4cbfb72c25d1..2e5261e4d714 100644 out->text_track_margin_percentage = data.text_track_margin_percentage(); out->immersive_mode_enabled = data.immersive_mode_enabled(); diff --git third_party/blink/public/common/web_preferences/web_preferences.h third_party/blink/public/common/web_preferences/web_preferences.h -index 842d902e040f..81f6f226966c 100644 +index e2fb2d1d46d3..0783c9145510 100644 --- third_party/blink/public/common/web_preferences/web_preferences.h +++ third_party/blink/public/common/web_preferences/web_preferences.h @@ -172,6 +172,8 @@ struct BLINK_COMMON_EXPORT WebPreferences { @@ -36,10 +36,10 @@ index 842d902e040f..81f6f226966c 100644 // These fields specify the foreground and background color for WebVTT text diff --git third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h -index 50c48c07228b..37c447ef1e12 100644 +index c40048e55b16..1e5843fc33d2 100644 --- third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h -@@ -522,6 +522,11 @@ struct BLINK_COMMON_EXPORT StructTraits(this)), minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)), maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)), + should_use_external_popup_menus_(g_should_use_external_popup_menus), does_composite_(does_composite), fullscreen_controller_(std::make_unique(this)), - receiver_(this, std::move(page_handle)) { -@@ -2254,6 +2260,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, - #endif + receiver_(this, +@@ -1801,6 +1807,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, - WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available); + RuntimeEnabledFeatures::SetTranslateServiceEnabled( + prefs.translate_service_available); + + web_view->SetBaseBackgroundColor(prefs.base_background_color); } void WebViewImpl::ThemeChanged() { diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index 64c52801dbfc..b57b61e609d2 100644 +index 165699ca8d92..d0db1ed1869a 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h -@@ -125,7 +125,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -126,7 +126,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, static HashSet& AllInstances(); // Returns true if popup menus should be rendered by the browser, false if // they should be rendered by WebKit (which is the default). @@ -127,7 +127,7 @@ index 64c52801dbfc..b57b61e609d2 100644 // Returns whether frames under this WebView are backed by a compositor. bool does_composite() const { return does_composite_; } -@@ -694,6 +695,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -711,6 +712,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, float fake_page_scale_animation_page_scale_factor_ = 0.f; bool fake_page_scale_animation_use_anchor_ = false; @@ -137,10 +137,10 @@ index 64c52801dbfc..b57b61e609d2 100644 TransformationMatrix device_emulation_transform_; diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc -index 46e116800e5a..1c0ff3ba815f 100644 +index 4eddfdf0921a..555fb3a95139 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -811,7 +811,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { +@@ -805,7 +805,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { NotifyPopupOpeningObservers(); diff --git a/patch/patches/webkit_widget_base_2444320.patch b/patch/patches/webkit_widget_base_2444320.patch deleted file mode 100644 index f23b4e9a0..000000000 --- a/patch/patches/webkit_widget_base_2444320.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git third_party/blink/renderer/platform/widget/widget_base.cc third_party/blink/renderer/platform/widget/widget_base.cc -index 048460f4dd81..59a70580ded0 100644 ---- third_party/blink/renderer/platform/widget/widget_base.cc -+++ third_party/blink/renderer/platform/widget/widget_base.cc -@@ -1281,8 +1281,8 @@ gfx::Point WidgetBase::BlinkSpaceToFlooredDIPs(const gfx::Point& point) { - return point; - // TODO(danakj): Should this be GetScreenInfo() so it changes under emulation? - // TODO(dtapuska): Determine if this should be a floor vs rounded. -- return gfx::ScaleToFlooredPoint( -- point, client_->GetOriginalScreenInfo().device_scale_factor); -+ float reverse = 1 / client_->GetOriginalScreenInfo().device_scale_factor; -+ return gfx::ScaleToFlooredPoint(point, reverse); - } - - gfx::Size WidgetBase::DIPsToCeiledBlinkSpace(const gfx::Size& size) { diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index c456af0de..a4b6a82a5 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 227e5b2618c1..7e7b32264b80 100644 +index 3267d8a52c8b..b01878a54539 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 @@ -10,6 +10,7 @@ @@ -24,9 +24,9 @@ index 227e5b2618c1..7e7b32264b80 100644 #include "chrome/common/channel_info.h" +#include "chrome/common/chrome_switches.h" #include "components/prefs/pref_service.h" - #include "components/sync/driver/about_sync_util.h" + #include "components/sync/driver/sync_internals_util.h" #include "components/sync/driver/sync_service.h" -@@ -335,7 +338,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) { +@@ -343,7 +346,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) { response->emplace(kOsVersionTag, os_version); #endif @@ -39,7 +39,7 @@ index 227e5b2618c1..7e7b32264b80 100644 PopulateExtensionInfoLogs(response.get()); PopulatePowerApiLogs(response.get()); PopulateDataReductionProxyLogs(response.get()); -@@ -430,6 +437,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( +@@ -418,6 +425,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( if (!profile) return; @@ -52,7 +52,7 @@ index 227e5b2618c1..7e7b32264b80 100644 extensions::ExtensionRegistry* extension_registry = extensions::ExtensionRegistry::Get(profile); std::string extensions_list; -@@ -536,6 +549,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime( +@@ -525,6 +538,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime( #if defined(OS_WIN) void ChromeInternalLogSource::PopulateUsbKeyboardDetected( SystemLogsResponse* response) { @@ -62,7 +62,7 @@ index 227e5b2618c1..7e7b32264b80 100644 bool result = base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason); diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc -index 4071c4a4947f..8346a85413fd 100644 +index 819ef924757c..986670ac9870 100644 --- chrome/browser/memory_details.cc +++ chrome/browser/memory_details.cc @@ -17,6 +17,7 @@ diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index 715baf293..79769f17f 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 54ad1ca860fa..f0981120284b 100644 +index 8adfdcf49184..4bd1f967575c 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -5081,7 +5081,7 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -5085,7 +5085,7 @@ Keep your key file in a safe place. You will need it to create new versions of y diff --git a/patch/patches/win_rt_2274.patch b/patch/patches/win_rt_2274.patch index 735843ac6..5d540ea5f 100644 --- a/patch/patches/win_rt_2274.patch +++ b/patch/patches/win_rt_2274.patch @@ -1,8 +1,8 @@ diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc -index 8c1e3aa58b6d..a51f5f10c9e9 100644 +index eef1a60d348e..eabb92072c2c 100644 --- sandbox/policy/win/sandbox_win.cc +++ sandbox/policy/win/sandbox_win.cc -@@ -1001,8 +1001,11 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1003,8 +1003,11 @@ ResultCode SandboxWin::StartSandboxedProcess( } // TODO(wfh): Relax strict handle checks for network process until root cause // for this crash can be resolved. See https://crbug.com/939590. diff --git a/tests/cefclient/resources/mac/Info.plist b/tests/cefclient/resources/mac/Info.plist index 0736db724..c1671130d 100644 --- a/tests/cefclient/resources/mac/Info.plist +++ b/tests/cefclient/resources/mac/Info.plist @@ -28,7 +28,7 @@ 0 LSMinimumSystemVersion - 10.10.0 + 10.11.0 NSMainNibFile MainMenu NSPrincipalClass diff --git a/tests/cefclient/resources/mac/helper-Info.plist b/tests/cefclient/resources/mac/helper-Info.plist index f851bac80..c6d8e9835 100644 --- a/tests/cefclient/resources/mac/helper-Info.plist +++ b/tests/cefclient/resources/mac/helper-Info.plist @@ -28,7 +28,7 @@ LSFileQuarantineEnabled LSMinimumSystemVersion - 10.10.0 + 10.11.0 LSUIElement 1 NSSupportsAutomaticGraphicsSwitching diff --git a/tests/cefsimple/mac/Info.plist b/tests/cefsimple/mac/Info.plist index 7f1bf5c91..158c7e9fe 100644 --- a/tests/cefsimple/mac/Info.plist +++ b/tests/cefsimple/mac/Info.plist @@ -26,7 +26,7 @@ 0 LSMinimumSystemVersion - 10.10.0 + 10.11.0 NSMainNibFile MainMenu NSPrincipalClass diff --git a/tests/cefsimple/mac/helper-Info.plist b/tests/cefsimple/mac/helper-Info.plist index 237bb0bd5..4cb6561fc 100644 --- a/tests/cefsimple/mac/helper-Info.plist +++ b/tests/cefsimple/mac/helper-Info.plist @@ -26,7 +26,7 @@ LSFileQuarantineEnabled LSMinimumSystemVersion - 10.10.0 + 10.11.0 LSUIElement 1 NSSupportsAutomaticGraphicsSwitching diff --git a/tests/ceftests/osr_accessibility_unittest.cc b/tests/ceftests/osr_accessibility_unittest.cc index 0586883bb..d1dd21ab4 100644 --- a/tests/ceftests/osr_accessibility_unittest.cc +++ b/tests/ceftests/osr_accessibility_unittest.cc @@ -373,59 +373,6 @@ class AccessibilityTestHandler : public TestHandler, EXPECT_TRUE(childIDs.get()); EXPECT_EQ(1U, childIDs->GetSize()); - // A parent Group div containing the child. - CefRefPtr group; - for (size_t index = 0; index < nodes->GetSize(); index++) { - CefRefPtr node = nodes->GetDictionary(index); - if (node->GetString("role").ToString() == "genericContainer") { - group = node; - break; - } - } - EXPECT_TRUE(group.get()); - // Validate Group is child of root WebArea. - EXPECT_EQ(group->GetInt("id"), childIDs->GetInt(0)); - - CefRefPtr parentdiv = group->GetList("child_ids"); - EXPECT_TRUE(parentdiv.get()); - EXPECT_EQ(3U, parentdiv->GetSize()); - - int tipId = parentdiv->GetInt(0); - int editBoxId = parentdiv->GetInt(1); - int buttonId = parentdiv->GetInt(2); - - // A parent Group div containing the child. - CefRefPtr tip, editbox, button; - for (size_t index = 0; index < nodes->GetSize(); index++) { - CefRefPtr node = nodes->GetDictionary(index); - if (node->GetInt("id") == tipId) { - tip = node; - } - if (node->GetInt("id") == editBoxId) { - editbox = node; - } - if (node->GetInt("id") == buttonId) { - button = node; - } - } - EXPECT_TRUE(tip.get()); - EXPECT_STREQ("tooltip", tip->GetString("role").ToString().c_str()); - CefRefPtr tipattr = tip->GetDictionary("attributes"); - EXPECT_TRUE(tipattr.get()); - - EXPECT_TRUE(editbox.get()); - EXPECT_STREQ("textField", editbox->GetString("role").ToString().c_str()); - CefRefPtr editattr = - editbox->GetDictionary("attributes"); - // Validate ARIA Description tags for tipIdare associated with editbox. - EXPECT_TRUE(editattr.get()); - EXPECT_EQ(tipId, editattr->GetList("describedbyIds")->GetInt(0)); - EXPECT_STREQ(kTipText, - editattr->GetString("description").ToString().c_str()); - - EXPECT_TRUE(button.get()); - EXPECT_STREQ("button", button->GetString("role").ToString().c_str()); - // Now Post a delayed task to destroy the test // giving sufficient time for any accessibility updates to come through CefPostDelayedTask( diff --git a/tests/ceftests/resources/mac/Info.plist b/tests/ceftests/resources/mac/Info.plist index ff906ed70..c28a73372 100644 --- a/tests/ceftests/resources/mac/Info.plist +++ b/tests/ceftests/resources/mac/Info.plist @@ -26,7 +26,7 @@ 0 LSMinimumSystemVersion - 10.10.0 + 10.11.0 NSMainNibFile MainMenu NSPrincipalClass diff --git a/tests/ceftests/resources/mac/helper-Info.plist b/tests/ceftests/resources/mac/helper-Info.plist index 58e41dfc8..2c39110c9 100644 --- a/tests/ceftests/resources/mac/helper-Info.plist +++ b/tests/ceftests/resources/mac/helper-Info.plist @@ -26,7 +26,7 @@ LSFileQuarantineEnabled LSMinimumSystemVersion - 10.10.0 + 10.11.0 LSUIElement 1 NSSupportsAutomaticGraphicsSwitching diff --git a/tests/ceftests/urlrequest_unittest.cc b/tests/ceftests/urlrequest_unittest.cc index a0b4bf0d9..d4c0bed0a 100644 --- a/tests/ceftests/urlrequest_unittest.cc +++ b/tests/ceftests/urlrequest_unittest.cc @@ -3187,7 +3187,7 @@ class RequestTestHandler : public TestHandler { CefPostDelayedTask( TID_FILE_USER_VISIBLE, base::Bind(&RequestTestHandler::PostTestCompleteFileTasks, this), - 100); + 200); } else { TestComplete(); }