diff --git a/BUILD.gn b/BUILD.gn index 174c794bb..c263a9569 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -785,7 +785,6 @@ static_library("libcef_static") { "//components/safe_browsing/core/db:test_database_manager", "//components/services/print_compositor/public/cpp", "//components/services/print_compositor/public/mojom", - "//components/tracing", "//components/update_client", "//components/url_formatter", "//components/user_prefs", @@ -1088,8 +1087,8 @@ static_library("libcef_static") { "//ui/aura/test/aura_test_utils.cc", "//ui/aura/test/aura_test_utils.h", # Part of //ui/events:test_support which is testingonly. - "//ui/events/test/platform_event_waiter.cc", - "//ui/events/test/platform_event_waiter.h", + "//ui/events/test/x11_event_waiter.cc", + "//ui/events/test/x11_event_waiter.h", ] if (use_x11) { @@ -1583,6 +1582,7 @@ if (is_mac) { sources = [ "$root_out_dir/egl_intermediates/libEGL.dylib", "$root_out_dir/egl_intermediates/libGLESv2.dylib", + "$root_out_dir/egl_intermediates/libvulkan.dylib", ] outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}", @@ -1597,12 +1597,15 @@ if (is_mac) { sources = [ "$root_out_dir/egl_intermediates/libswiftshader_libEGL.dylib", "$root_out_dir/egl_intermediates/libswiftshader_libGLESv2.dylib", + "$root_out_dir/vk_intermediates/libvk_swiftshader.dylib", + "$root_out_dir/vk_intermediates/vk_swiftshader_icd.json", ] outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}", ] public_deps = [ - "//ui/gl:swiftshader_library_copy", + "//ui/gl:swiftshader_egl_library_copy", + "//ui/gl:swiftshader_vk_library_copy", ] } } @@ -1692,11 +1695,6 @@ if (is_mac) { "libcef_dll/libcef_dll.rc", ] - # This is a large module that can't do incremental linking in some cases. - configs -= [ "//build/config/win:default_incremental_linking" ] - configs += - [ "//build/config/win:default_large_module_incremental_linking" ] - deps += [ # Bring in ui_unscaled_resources.rc which contains custom cursors. # TODO(cef): Remove this once custom cursors can be loaded via diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 804dbfbe7..8768febe7 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/81.0.4044.0' + 'chromium_checkout': 'refs/tags/82.0.4085.0' } diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index 40596eadb..09c262250 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -2237,7 +2237,13 @@ typedef enum { CT_ZOOMOUT, CT_GRAB, CT_GRABBING, + CT_MIDDLE_PANNING_VERTICAL, + CT_MIDDLE_PANNING_HORIZONTAL, CT_CUSTOM, + CT_DND_NONE, + CT_DND_MOVE, + CT_DND_COPY, + CT_DND_LINK, } cef_cursor_type_t; /// diff --git a/libcef/browser/browser_context.cc b/libcef/browser/browser_context.cc index e5f4ed694..96e611c18 100644 --- a/libcef/browser/browser_context.cc +++ b/libcef/browser/browser_context.cc @@ -48,7 +48,6 @@ #include "extensions/browser/process_manager.h" #include "extensions/common/constants.h" #include "net/proxy_resolution/proxy_config_service.h" -#include "net/proxy_resolution/proxy_resolution_service.h" #include "services/network/public/mojom/cors_origin_pattern.mojom.h" using content::BrowserThread; diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index b028e5d10..24bdc5b46 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -47,6 +47,8 @@ #include "chrome/browser/spellchecker/spellcheck_factory.h" #include "chrome/browser/spellchecker/spellcheck_service.h" #include "chrome/browser/ui/prefs/prefs_tab_helper.h" +#include "components/favicon/core/favicon_url.h" +#include "components/spellcheck/common/spellcheck_features.h" #include "components/zoom/zoom_controller.h" #include "content/browser/gpu/compositor_util.h" #include "content/browser/web_contents/web_contents_impl.h" @@ -69,7 +71,6 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/render_widget_host.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/favicon_url.h" #include "extensions/browser/process_manager.h" #include "net/base/net_errors.h" #include "third_party/blink/public/mojom/frame/find_in_page.mojom.h" @@ -1056,16 +1057,18 @@ void CefBrowserHostImpl::AddWordToDictionary(const CefString& word) { if (!web_contents()) return; + SpellcheckService* spellcheck = nullptr; content::BrowserContext* browser_context = web_contents()->GetBrowserContext(); if (browser_context) { - SpellcheckService* spellcheck = - SpellcheckServiceFactory::GetForContext(browser_context); + spellcheck = SpellcheckServiceFactory::GetForContext(browser_context); if (spellcheck) spellcheck->GetCustomDictionary()->AddWord(word); } #if defined(OS_MACOSX) - spellcheck_platform::AddWord(word); + if (spellcheck && spellcheck::UseBrowserSpellChecker()) { + spellcheck_platform::AddWord(spellcheck->platform_spell_checker(), word); + } #endif } @@ -2679,15 +2682,14 @@ void CefBrowserHostImpl::PluginCrashed(const base::FilePath& plugin_path, } void CefBrowserHostImpl::DidUpdateFaviconURL( - const std::vector& candidates) { + const std::vector& candidates) { if (client_.get()) { CefRefPtr handler = client_->GetDisplayHandler(); if (handler.get()) { std::vector icon_urls; - std::vector::const_iterator it = candidates.begin(); - for (; it != candidates.end(); ++it) { - if (it->icon_type == content::FaviconURL::IconType::kFavicon) - icon_urls.push_back(it->icon_url.spec()); + for (const auto& icon : candidates) { + if (icon->icon_type == blink::mojom::FaviconIconType::kFavicon) + icon_urls.push_back(icon->icon_url.spec()); } if (!icon_urls.empty()) handler->OnFaviconURLChange(this, icon_urls); diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index dbc4cfc18..2cc2e8005 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -485,7 +485,7 @@ class CefBrowserHostImpl : public CefBrowserHost, void PluginCrashed(const base::FilePath& plugin_path, base::ProcessId plugin_pid) override; void DidUpdateFaviconURL( - const std::vector& candidates) override; + const std::vector& candidates) override; bool OnMessageReceived(const IPC::Message& message) override; bool OnMessageReceived(const IPC::Message& message, content::RenderFrameHost* render_frame_host) override; diff --git a/libcef/browser/browser_main.cc b/libcef/browser/browser_main.cc index 171442aa9..7b4abfadd 100644 --- a/libcef/browser/browser_main.cc +++ b/libcef/browser/browser_main.cc @@ -36,7 +36,6 @@ #include "extensions/common/constants.h" #include "net/base/net_module.h" #include "services/service_manager/embedder/result_codes.h" -#include "ui/base/material_design/material_design_controller.h" #include "ui/base/resource/resource_bundle.h" #if defined(USE_AURA) && defined(USE_X11) @@ -161,8 +160,6 @@ void CefBrowserMainParts::PreMainMessageLoopRun() { display::Screen::SetScreenInstance(views::CreateDesktopScreen()); #endif - ui::MaterialDesignController::Initialize(); - if (extensions::ExtensionsEnabled()) { // Initialize extension global objects before creating the global // BrowserContext. diff --git a/libcef/browser/chrome_browser_process_stub.cc b/libcef/browser/chrome_browser_process_stub.cc index 8579642df..70dff68fa 100644 --- a/libcef/browser/chrome_browser_process_stub.cc +++ b/libcef/browser/chrome_browser_process_stub.cc @@ -372,3 +372,8 @@ ChromeBrowserProcessStub::resource_coordinator_parts() { NOTREACHED(); return nullptr; } + +BuildState* ChromeBrowserProcessStub::GetBuildState() { + NOTREACHED(); + return nullptr; +} diff --git a/libcef/browser/chrome_browser_process_stub.h b/libcef/browser/chrome_browser_process_stub.h index 9c41a0271..4a322ace7 100644 --- a/libcef/browser/chrome_browser_process_stub.h +++ b/libcef/browser/chrome_browser_process_stub.h @@ -98,6 +98,7 @@ class ChromeBrowserProcessStub : public BrowserProcess { resource_coordinator::TabManager* GetTabManager() override; resource_coordinator::ResourceCoordinatorParts* resource_coordinator_parts() override; + BuildState* GetBuildState() override; private: bool initialized_; diff --git a/libcef/browser/chrome_profile_stub.cc b/libcef/browser/chrome_profile_stub.cc index a21f9a60f..b52f82610 100644 --- a/libcef/browser/chrome_profile_stub.cc +++ b/libcef/browser/chrome_profile_stub.cc @@ -5,9 +5,35 @@ #include "libcef/browser/chrome_profile_stub.h" +#include "components/variations/variations_client.h" +#include "components/variations/variations_http_header_provider.h" #include "content/public/browser/resource_context.h" #include "net/url_request/url_request_context.h" +namespace { + +class CefVariationsClient : public variations::VariationsClient { + public: + explicit CefVariationsClient(content::BrowserContext* browser_context) + : browser_context_(browser_context) {} + + ~CefVariationsClient() override = default; + + bool IsIncognito() const override { + return browser_context_->IsOffTheRecord(); + } + + std::string GetVariationsHeader() const override { + return variations::VariationsHttpHeaderProvider::GetInstance() + ->GetClientDataHeader(false /* is_signed_in */); + } + + private: + content::BrowserContext* browser_context_; +}; + +} // namespace + ChromeProfileStub::ChromeProfileStub() {} ChromeProfileStub::~ChromeProfileStub() {} @@ -20,6 +46,12 @@ bool ChromeProfileStub::IsOffTheRecord() const { return false; } +variations::VariationsClient* ChromeProfileStub::GetVariationsClient() { + if (!variations_client_) + variations_client_ = std::make_unique(this); + return variations_client_.get(); +} + scoped_refptr ChromeProfileStub::GetIOTaskRunner() { NOTREACHED(); return scoped_refptr(); diff --git a/libcef/browser/chrome_profile_stub.h b/libcef/browser/chrome_profile_stub.h index 3ab782fb9..c9859da85 100644 --- a/libcef/browser/chrome_profile_stub.h +++ b/libcef/browser/chrome_profile_stub.h @@ -22,6 +22,7 @@ class ChromeProfileStub : public Profile { // Profile methods. bool IsOffTheRecord() override; bool IsOffTheRecord() const override; + variations::VariationsClient* GetVariationsClient() override; scoped_refptr GetIOTaskRunner() override; std::string GetProfileUserName() const override; ProfileType GetProfileType() const override; @@ -48,6 +49,8 @@ class ChromeProfileStub : public Profile { void SetCreationTimeForTesting(base::Time creation_time) override; private: + std::unique_ptr variations_client_; + DISALLOW_COPY_AND_ASSIGN(ChromeProfileStub); }; diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index 9b5ec3e2d..f8e50760b 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -115,6 +115,8 @@ #include "services/service_manager/public/mojom/connector.mojom.h" #include "services/service_manager/sandbox/switches.h" #include "storage/browser/quota/quota_settings.h" +#include "third_party/blink/public/mojom/insecure_input/insecure_input_service.mojom.h" +#include "third_party/blink/public/mojom/prerender/prerender.mojom.h" #include "third_party/blink/public/web/web_window_features.h" #include "third_party/widevine/cdm/buildflags.h" #include "ui/base/l10n/l10n_util.h" @@ -505,6 +507,30 @@ void BindPluginInfoHost( std::move(receiver)); } +base::FilePath GetRootCachePath() { + // The CefContext::ValidateCachePath method enforces the requirement that all + // cache_path values be either equal to or a child of root_cache_path. + return base::FilePath( + CefString(&CefContext::Get()->settings().root_cache_path)); +} + +// Register BrowserInterfaceBroker's GetInterface() handler callbacks for +// chrome-specific document-scoped interfaces. +// Stub implementations to silence "Empty binder for interface +// blink.mojom.[Name] for the frame/document scope" errors. +// Based on chrome/browser/chrome_browser_interface_binders.cc. +void PopulateChromeFrameBinders( + service_manager::BinderMapWithContext* map) { + map->Add(base::BindRepeating( + [](content::RenderFrameHost* frame_host, + mojo::PendingReceiver receiver) { + })); + + map->Add(base::BindRepeating( + [](content::RenderFrameHost* frame_host, + mojo::PendingReceiver receiver) {})); +} + } // namespace CefContentBrowserClient::CefContentBrowserClient() @@ -1088,16 +1114,13 @@ CefContentBrowserClient::CreateURLLoaderThrottles( request.resource_type, frame_tree_node_id)); Profile* profile = Profile::FromBrowserContext(browser_context); - bool is_off_the_record = profile->IsOffTheRecord(); chrome::mojom::DynamicParams dynamic_params = { profile->GetPrefs()->GetBoolean(prefs::kForceGoogleSafeSearch), profile->GetPrefs()->GetInteger(prefs::kForceYouTubeRestrict), - profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps), - variations::VariationsHttpHeaderProvider::GetInstance() - ->GetClientDataHeader(false /* is_signed_in */)}; - result.push_back(std::make_unique( - is_off_the_record, std::move(dynamic_params))); + profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps)}; + result.push_back( + std::make_unique(std::move(dynamic_params))); return result; } @@ -1300,10 +1323,7 @@ CefContentBrowserClient::GetNetworkContextsParentDirectory() { base::PathService::Get(chrome::DIR_USER_DATA, &user_data_path); DCHECK(!user_data_path.empty()); - // The CefContext::ValidateCachePath method enforces the requirement that all - // cache_path values be either equal to or a child of root_cache_path. - const base::FilePath& root_cache_path = - base::FilePath(CefString(&CefContext::Get()->settings().root_cache_path)); + const auto& root_cache_path = GetRootCachePath(); // root_cache_path may sometimes be empty or a child of user_data_path, so // only return the one path in that case. @@ -1380,6 +1400,8 @@ CefContentBrowserClient::CreateWindowForPictureInPicture( void CefContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( content::RenderFrameHost* render_frame_host, service_manager::BinderMapWithContext* map) { + PopulateChromeFrameBinders(map); + if (!extensions::ExtensionsEnabled()) return; @@ -1404,6 +1426,11 @@ void CefContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( extension); } +base::FilePath +CefContentBrowserClient::GetSandboxedStorageServiceDataDirectory() { + return GetRootCachePath(); +} + std::string CefContentBrowserClient::GetProduct() { // Match the logic in chrome_content_browser_client.cc GetProduct(). return ::GetProduct(); diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index 7b639a00d..2c23c31a0 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -197,7 +197,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient { content::RenderFrameHost* render_frame_host, service_manager::BinderMapWithContext* map) override; - + base::FilePath GetSandboxedStorageServiceDataDirectory() override; std::string GetProduct() override; std::string GetChromeProduct() override; std::string GetUserAgent() override; diff --git a/libcef/browser/context_menu_params_impl.h b/libcef/browser/context_menu_params_impl.h index dfce520a0..5d28efb7b 100644 --- a/libcef/browser/context_menu_params_impl.h +++ b/libcef/browser/context_menu_params_impl.h @@ -9,7 +9,7 @@ #include "include/cef_context_menu_handler.h" #include "libcef/common/value_base.h" -#include "content/public/common/context_menu_params.h" +#include "content/public/browser/context_menu_params.h" // CefContextMenuParams implementation. This class is not thread safe. class CefContextMenuParamsImpl diff --git a/libcef/browser/extensions/extensions_browser_client.cc b/libcef/browser/extensions/extensions_browser_client.cc index f58273d14..755f50605 100644 --- a/libcef/browser/extensions/extensions_browser_client.cc +++ b/libcef/browser/extensions/extensions_browser_client.cc @@ -167,7 +167,7 @@ void CefExtensionsBrowserClient::LoadResourceFromResourceBundle( bool CefExtensionsBrowserClient::AllowCrossRendererResourceLoad( const GURL& url, - content::ResourceType resource_type, + blink::mojom::ResourceType resource_type, ui::PageTransition page_transition, int child_id, bool is_incognito, diff --git a/libcef/browser/extensions/extensions_browser_client.h b/libcef/browser/extensions/extensions_browser_client.h index 73b3f9cd8..cd82bbb51 100644 --- a/libcef/browser/extensions/extensions_browser_client.h +++ b/libcef/browser/extensions/extensions_browser_client.h @@ -55,7 +55,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient { mojo::PendingRemote client, bool send_cors_header) override; bool AllowCrossRendererResourceLoad(const GURL& url, - content::ResourceType resource_type, + blink::mojom::ResourceType resource_type, ui::PageTransition page_transition, int child_id, bool is_incognito, diff --git a/libcef/browser/menu_manager.h b/libcef/browser/menu_manager.h index 5b7d9168e..366147930 100644 --- a/libcef/browser/menu_manager.h +++ b/libcef/browser/menu_manager.h @@ -11,8 +11,8 @@ #include "libcef/browser/menu_runner.h" #include "base/memory/weak_ptr.h" +#include "content/public/browser/context_menu_params.h" #include "content/public/browser/web_contents_observer.h" -#include "content/public/common/context_menu_params.h" namespace content { class RenderFrameHost; diff --git a/libcef/browser/native/browser_platform_delegate_native_linux.cc b/libcef/browser/native/browser_platform_delegate_native_linux.cc index 491610aa1..cd8ef7e61 100644 --- a/libcef/browser/native/browser_platform_delegate_native_linux.cc +++ b/libcef/browser/native/browser_platform_delegate_native_linux.cc @@ -258,10 +258,10 @@ void CefBrowserPlatformDelegate::HandleExternalProtocol(const GURL& url) {} CefEventHandle CefBrowserPlatformDelegateNativeLinux::GetEventHandle( const content::NativeWebKeyboardEvent& event) const { - if (!event.os_event) - return nullptr; - return const_cast( - static_cast(event.os_event->native_event())); + // TODO(cef): We need to return an XEvent* from this method, but + // |event.os_event->native_event()| now returns a ui::Event* instead. + // See https://crbug.com/965991. + return nullptr; } std::unique_ptr diff --git a/libcef/browser/native/browser_platform_delegate_native_mac.mm b/libcef/browser/native/browser_platform_delegate_native_mac.mm index 3355a97d1..7a73491b1 100644 --- a/libcef/browser/native/browser_platform_delegate_native_mac.mm +++ b/libcef/browser/native/browser_platform_delegate_native_mac.mm @@ -526,8 +526,7 @@ CefBrowserPlatformDelegateNativeMac::TranslateWebWheelEvent( result.delta_y = deltaY; result.wheel_ticks_x = deltaX / scrollbarPixelsPerCocoaTick; result.wheel_ticks_y = deltaY / scrollbarPixelsPerCocoaTick; - result.delta_units = - ui::input_types::ScrollGranularity::kScrollByPrecisePixel; + result.delta_units = ui::ScrollGranularity::kScrollByPrecisePixel; if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) result.button = blink::WebMouseEvent::Button::kLeft; diff --git a/libcef/browser/native/window_x11.cc b/libcef/browser/native/window_x11.cc index 462ce420f..7b05589ec 100644 --- a/libcef/browser/native/window_x11.cc +++ b/libcef/browser/native/window_x11.cc @@ -8,6 +8,7 @@ #include "ui/base/x/x11_util.h" #include "ui/events/platform/platform_event_source.h" +#include "ui/events/x/x11_event_translation.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h" @@ -28,13 +29,6 @@ const char kNetWMState[] = "_NET_WM_STATE"; const char kXdndProxy[] = "XdndProxy"; const char kUTF8String[] = "UTF8_STRING"; -::Window FindEventTarget(const ui::PlatformEvent& xev) { - ::Window target = xev->xany.window; - if (xev->type == GenericEvent) - target = static_cast(xev->xcookie.data)->event; - return target; -} - ::Window FindChild(::Display* display, ::Window window) { ::Window root; ::Window parent; @@ -109,8 +103,8 @@ CefWindowX11::CefWindowX11(CefRefPtr browser, CWBackPixmap | CWOverrideRedirect, &swa); CHECK(xwindow_); - if (ui::PlatformEventSource::GetInstance()) - ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); + DCHECK(ui::X11EventSource::HasInstance()); + ui::X11EventSource::GetInstance()->AddXEventDispatcher(this); long event_mask = FocusChangeMask | StructureNotifyMask | PropertyChangeMask; XSelectInput(xdisplay_, xwindow_, event_mask); @@ -148,8 +142,8 @@ CefWindowX11::CefWindowX11(CefRefPtr browser, CefWindowX11::~CefWindowX11() { DCHECK(!xwindow_); - if (ui::PlatformEventSource::GetInstance()) - ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); + DCHECK(ui::X11EventSource::HasInstance()); + ui::X11EventSource::GetInstance()->RemoveXEventDispatcher(this); } void CefWindowX11::Close() { @@ -288,12 +282,88 @@ views::DesktopWindowTreeHostX11* CefWindowX11::GetHost() { } bool CefWindowX11::CanDispatchEvent(const ui::PlatformEvent& event) { - ::Window target = FindEventTarget(event); - return target == xwindow_; + DCHECK_NE(xwindow_, x11::None); + return !!current_xevent_; } uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) { - XEvent* xev = event; + DCHECK_NE(xwindow_, x11::None); + DCHECK(event); + DCHECK(current_xevent_); + + ProcessXEvent(current_xevent_); + return ui::POST_DISPATCH_STOP_PROPAGATION; +} + +// Called by X11EventSourceLibevent to determine whether this XEventDispatcher +// implementation is able to process the next translated event sent by it. +void CefWindowX11::CheckCanDispatchNextPlatformEvent(XEvent* xev) { + current_xevent_ = IsTargetedBy(*xev) ? xev : nullptr; +} + +void CefWindowX11::PlatformEventDispatchFinished() { + current_xevent_ = nullptr; +} + +ui::PlatformEventDispatcher* CefWindowX11::GetPlatformEventDispatcher() { + return this; +} + +bool CefWindowX11::DispatchXEvent(XEvent* xev) { + if (!IsTargetedBy(*xev)) + return false; + ProcessXEvent(xev); + return true; +} + +void CefWindowX11::ContinueFocus() { + if (!focus_pending_) + return; + if (browser_.get()) + browser_->SetFocus(true); + focus_pending_ = false; +} + +bool CefWindowX11::TopLevelAlwaysOnTop() const { + ::Window toplevel_window = FindToplevelParent(xdisplay_, xwindow_); + + Atom state_atom = gfx::GetAtom("_NET_WM_STATE"); + Atom state_keep_above = gfx::GetAtom("_NET_WM_STATE_KEEP_ABOVE"); + Atom* states; + + Atom actual_type; + int actual_format; + unsigned long num_items; + unsigned long bytes_after; + + XGetWindowProperty(xdisplay_, toplevel_window, state_atom, 0, 1024, + x11::False, XA_ATOM, &actual_type, &actual_format, + &num_items, &bytes_after, + reinterpret_cast(&states)); + + bool always_on_top = false; + + for (unsigned long i = 0; i < num_items; ++i) { + if (states[i] == state_keep_above) { + always_on_top = true; + break; + } + } + + XFree(states); + + return always_on_top; +} + +bool CefWindowX11::IsTargetedBy(const XEvent& xev) const { + ::Window target_window = + (xev.type == GenericEvent) + ? static_cast(xev.xcookie.data)->event + : xev.xany.window; + return target_window == xwindow_; +} + +void CefWindowX11::ProcessXEvent(XEvent* xev) { switch (xev->type) { case ConfigureNotify: { DCHECK_EQ(xwindow_, xev->xconfigure.event); @@ -402,45 +472,4 @@ uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) { break; } } - - return ui::POST_DISPATCH_STOP_PROPAGATION; -} - -void CefWindowX11::ContinueFocus() { - if (!focus_pending_) - return; - if (browser_.get()) - browser_->SetFocus(true); - focus_pending_ = false; -} - -bool CefWindowX11::TopLevelAlwaysOnTop() const { - ::Window toplevel_window = FindToplevelParent(xdisplay_, xwindow_); - - Atom state_atom = gfx::GetAtom("_NET_WM_STATE"); - Atom state_keep_above = gfx::GetAtom("_NET_WM_STATE_KEEP_ABOVE"); - Atom* states; - - Atom actual_type; - int actual_format; - unsigned long num_items; - unsigned long bytes_after; - - XGetWindowProperty(xdisplay_, toplevel_window, state_atom, 0, 1024, - x11::False, XA_ATOM, &actual_type, &actual_format, - &num_items, &bytes_after, - reinterpret_cast(&states)); - - bool always_on_top = false; - - for (unsigned long i = 0; i < num_items; ++i) { - if (states[i] == state_keep_above) { - always_on_top = true; - break; - } - } - - XFree(states); - - return always_on_top; } diff --git a/libcef/browser/native/window_x11.h b/libcef/browser/native/window_x11.h index 998857f91..dbf841f01 100644 --- a/libcef/browser/native/window_x11.h +++ b/libcef/browser/native/window_x11.h @@ -16,6 +16,7 @@ typedef struct _XDisplay Display; #include "base/memory/weak_ptr.h" #include "ui/events/platform/platform_event_dispatcher.h" +#include "ui/events/platform/x11/x11_event_source.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/x/x11_atom_cache.h" @@ -25,7 +26,8 @@ class DesktopWindowTreeHostX11; // Object wrapper for an X11 Window. // Based on WindowTreeHostX11 and DesktopWindowTreeHostX11. -class CefWindowX11 : public ui::PlatformEventDispatcher { +class CefWindowX11 : public ui::PlatformEventDispatcher, + public ui::XEventDispatcher { public: CefWindowX11(CefRefPtr browser, ::Window parent_xwindow, @@ -50,6 +52,12 @@ class CefWindowX11 : public ui::PlatformEventDispatcher { bool CanDispatchEvent(const ui::PlatformEvent& event) override; uint32_t DispatchEvent(const ui::PlatformEvent& event) override; + // ui::XEventDispatcher methods: + void CheckCanDispatchNextPlatformEvent(XEvent* xev) override; + void PlatformEventDispatchFinished() override; + ui::PlatformEventDispatcher* GetPlatformEventDispatcher() override; + bool DispatchXEvent(XEvent* event) override; + ::Window xwindow() const { return xwindow_; } gfx::Rect bounds() const { return bounds_; } @@ -58,6 +66,9 @@ class CefWindowX11 : public ui::PlatformEventDispatcher { private: void ContinueFocus(); + bool IsTargetedBy(const XEvent& xev) const; + void ProcessXEvent(XEvent* xev); + CefRefPtr browser_; // The display and the native X window hosting the root window. @@ -73,6 +84,11 @@ class CefWindowX11 : public ui::PlatformEventDispatcher { bool focus_pending_; + // Tells if this dispatcher can process next translated event based on a + // previous check in ::CheckCanDispatchNextPlatformEvent based on a XID + // target. + XEvent* current_xevent_ = nullptr; + // Must always be the last member. base::WeakPtrFactory weak_ptr_factory_; diff --git a/libcef/browser/net_service/resource_request_handler_wrapper.cc b/libcef/browser/net_service/resource_request_handler_wrapper.cc index 0e1983bf8..cb863138a 100644 --- a/libcef/browser/net_service/resource_request_handler_wrapper.cc +++ b/libcef/browser/net_service/resource_request_handler_wrapper.cc @@ -31,6 +31,7 @@ #include "net/base/load_flags.h" #include "net/http/http_status_code.h" #include "net/http/http_util.h" +#include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h" #include "ui/base/page_transition_types.h" #include "url/origin.h" @@ -1202,8 +1203,8 @@ void InitOnUIThread( if (request.render_frame_id >= 0) { // TODO(network): Are these main frame checks equivalent? if (request.is_main_frame || - static_cast(request.resource_type) == - content::ResourceType::kMainFrame) { + static_cast(request.resource_type) == + blink::mojom::ResourceType::kMainFrame) { frame = web_contents->GetMainFrame(); DCHECK(frame); } else { diff --git a/libcef/browser/net_service/url_loader_factory_getter.cc b/libcef/browser/net_service/url_loader_factory_getter.cc index 64afafea5..c1c370a22 100644 --- a/libcef/browser/net_service/url_loader_factory_getter.cc +++ b/libcef/browser/net_service/url_loader_factory_getter.cc @@ -55,7 +55,7 @@ scoped_refptr URLLoaderFactoryGetter::Create( content::devtools_instrumentation::WillCreateURLLoaderFactory( static_cast(render_frame_host), false /* is_navigation */, false /* is_download */, - &maybe_proxy_factory_request); + &maybe_proxy_factory_request, nullptr /* factory_override */); } // Allow the Content embedder to inject itself if it wants to. diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index aa65ab808..509f04f53 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -25,10 +25,8 @@ #include "components/viz/common/frame_sinks/begin_frame_args.h" #include "components/viz/common/frame_sinks/copy_output_request.h" #include "components/viz/common/frame_sinks/delay_based_time_source.h" -#include "components/viz/common/gl_helper.h" #include "components/viz/common/switches.h" #include "content/browser/bad_message.h" -#include "content/browser/compositor/image_transport_factory.h" #include "content/browser/gpu/gpu_data_manager_impl.h" #include "content/browser/renderer_host/cursor_manager.h" #include "content/browser/renderer_host/delegated_frame_host.h" @@ -48,7 +46,6 @@ #include "content/public/browser/render_view_host.h" #include "content/public/common/content_switches.h" #include "media/base/video_frame.h" -#include "ui/base/cursor/types/cursor_types.h" #include "ui/compositor/compositor.h" #include "ui/events/blink/blink_event_util.h" #include "ui/events/gesture_detection/gesture_provider_config_helper.h" @@ -236,15 +233,11 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( external_begin_frame_enabled_ = use_external_begin_frame; - content::ImageTransportFactory* factory = - content::ImageTransportFactory::GetInstance(); - ui::ContextFactoryPrivate* context_factory_private = - factory->GetContextFactoryPrivate(); + auto context_factory = content::GetContextFactory(); // Matching the attributes from RecyclableCompositorMac. compositor_.reset(new ui::Compositor( - context_factory_private->AllocateFrameSinkId(), - content::GetContextFactory(), context_factory_private, + context_factory->AllocateFrameSinkId(), context_factory, base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */, use_external_begin_frame)); compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); @@ -447,8 +440,9 @@ base::Optional CefRenderWidgetHostViewOSR::GetBackgroundColor() { void CefRenderWidgetHostViewOSR::UpdateBackgroundColor() {} -bool CefRenderWidgetHostViewOSR::LockMouse(bool request_unadjusted_movement) { - return false; +blink::mojom::PointerLockResult CefRenderWidgetHostViewOSR::LockMouse( + bool request_unadjusted_movement) { + return blink::mojom::PointerLockResult::kPermissionDenied; } void CefRenderWidgetHostViewOSR::UnlockMouse() {} @@ -588,39 +582,29 @@ void CefRenderWidgetHostViewOSR::UpdateCursor( browser_impl_->GetClient()->GetRenderHandler(); CHECK(handler); - const content::CursorInfo& cursor_info = cursor.info(); + const auto& ui_cursor = cursor.cursor(); const cef_cursor_type_t cursor_type = - static_cast(cursor_info.type); + static_cast(ui_cursor.type()); CefCursorInfo custom_cursor_info; - if (cursor_info.type == ui::CursorType::kCustom) { - custom_cursor_info.hotspot.x = cursor_info.hotspot.x(); - custom_cursor_info.hotspot.y = cursor_info.hotspot.y(); - custom_cursor_info.image_scale_factor = cursor_info.image_scale_factor; - custom_cursor_info.buffer = cursor_info.custom_image.getPixels(); - custom_cursor_info.size.width = cursor_info.custom_image.width(); - custom_cursor_info.size.height = cursor_info.custom_image.height(); + if (ui_cursor.type() == ui::mojom::CursorType::kCustom) { + custom_cursor_info.hotspot.x = ui_cursor.custom_hotspot().x(); + custom_cursor_info.hotspot.y = ui_cursor.custom_hotspot().y(); + custom_cursor_info.image_scale_factor = ui_cursor.image_scale_factor(); + custom_cursor_info.buffer = ui_cursor.custom_bitmap().getPixels(); + custom_cursor_info.size.width = ui_cursor.custom_bitmap().width(); + custom_cursor_info.size.height = ui_cursor.custom_bitmap().height(); } #if defined(USE_AURA) - content::WebCursor web_cursor(cursor_info); + content::WebCursor web_cursor(ui_cursor); ui::PlatformCursor platform_cursor; - if (cursor_info.type == ui::CursorType::kCustom) { - ui::Cursor ui_cursor(ui::CursorType::kCustom); - SkBitmap bitmap; - gfx::Point hotspot; - float scale_factor; - web_cursor.CreateScaledBitmapAndHotspotFromCustomData(&bitmap, &hotspot, - &scale_factor); - ui_cursor.set_custom_bitmap(bitmap); - ui_cursor.set_custom_hotspot(hotspot); - ui_cursor.set_device_scale_factor(scale_factor); - + if (ui_cursor.type() == ui::mojom::CursorType::kCustom) { // |web_cursor| owns the resulting |platform_cursor|. platform_cursor = web_cursor.GetPlatformCursor(ui_cursor); } else { - platform_cursor = GetPlatformCursor(cursor_info.type); + platform_cursor = GetPlatformCursor(ui_cursor.type()); } handler->OnCursorChange(browser_impl_.get(), platform_cursor, cursor_type, @@ -1065,8 +1049,8 @@ void CefRenderWidgetHostViewOSR::SendExternalBeginFrame() { if (render_widget_host_) render_widget_host_->ProgressFlingIfNeeded(frame_time); - compositor_->context_factory_private()->IssueExternalBeginFrame( - compositor_.get(), begin_frame_args, /* force= */ true, + compositor_->IssueExternalBeginFrame( + begin_frame_args, /* force= */ true, base::BindOnce(&CefRenderWidgetHostViewOSR::OnFrameComplete, weak_ptr_factory_.GetWeakPtr())); diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index f93b653be..c0dbdd359 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -28,7 +28,7 @@ #include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/browser/renderer_host/text_input_manager.h" #include "content/public/common/widget_type.h" -#include "ui/base/cursor/types/cursor_types.h" +#include "ui/base/mojom/cursor_type.mojom-shared.h" #include "ui/compositor/compositor.h" #include "ui/events/base_event_utils.h" #include "ui/events/gesture_detection/filtered_gesture_provider.h" @@ -49,7 +49,6 @@ #endif #if defined(USE_AURA) -#include "third_party/blink/public/platform/web_cursor_info.h" #include "ui/base/cursor/cursor.h" #endif @@ -124,7 +123,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, void SetBackgroundColor(SkColor color) override; base::Optional GetBackgroundColor() override; void UpdateBackgroundColor() override; - bool LockMouse(bool request_unadjusted_movement) override; + blink::mojom::PointerLockResult LockMouse( + bool request_unadjusted_movement) override; void UnlockMouse() override; void TakeFallbackContentFrom(content::RenderWidgetHostView* view) override; @@ -321,7 +321,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, void UpdateBackgroundColorFromRenderer(SkColor color); #if defined(USE_AURA) - ui::PlatformCursor GetPlatformCursor(ui::CursorType type); + ui::PlatformCursor GetPlatformCursor(ui::mojom::CursorType type); #endif // The background color of the web content. diff --git a/libcef/browser/osr/render_widget_host_view_osr_linux.cc b/libcef/browser/osr/render_widget_host_view_osr_linux.cc index 7b622a862..0e4025b5b 100644 --- a/libcef/browser/osr/render_widget_host_view_osr_linux.cc +++ b/libcef/browser/osr/render_widget_host_view_osr_linux.cc @@ -5,8 +5,6 @@ #include "libcef/browser/osr/render_widget_host_view_osr.h" -#include "third_party/blink/public/platform/web_cursor_info.h" - #if defined(USE_X11) #include #include @@ -23,110 +21,108 @@ namespace { // Based on ui/base/cursor/cursor_loader_x11.cc. -using blink::WebCursorInfo; - -int ToCursorID(ui::CursorType type) { +int ToCursorID(ui::mojom::CursorType type) { switch (type) { - case ui::CursorType::kPointer: + case ui::mojom::CursorType::kPointer: return XC_left_ptr; - case ui::CursorType::kCross: + case ui::mojom::CursorType::kCross: return XC_crosshair; - case ui::CursorType::kHand: + case ui::mojom::CursorType::kHand: return XC_hand2; - case ui::CursorType::kIBeam: + case ui::mojom::CursorType::kIBeam: return XC_xterm; - case ui::CursorType::kWait: + case ui::mojom::CursorType::kWait: return XC_watch; - case ui::CursorType::kHelp: + case ui::mojom::CursorType::kHelp: return XC_question_arrow; - case ui::CursorType::kEastResize: + case ui::mojom::CursorType::kEastResize: return XC_right_side; - case ui::CursorType::kNorthResize: + case ui::mojom::CursorType::kNorthResize: return XC_top_side; - case ui::CursorType::kNorthEastResize: + case ui::mojom::CursorType::kNorthEastResize: return XC_top_right_corner; - case ui::CursorType::kNorthWestResize: + case ui::mojom::CursorType::kNorthWestResize: return XC_top_left_corner; - case ui::CursorType::kSouthResize: + case ui::mojom::CursorType::kSouthResize: return XC_bottom_side; - case ui::CursorType::kSouthEastResize: + case ui::mojom::CursorType::kSouthEastResize: return XC_bottom_right_corner; - case ui::CursorType::kSouthWestResize: + case ui::mojom::CursorType::kSouthWestResize: return XC_bottom_left_corner; - case ui::CursorType::kWestResize: + case ui::mojom::CursorType::kWestResize: return XC_left_side; - case ui::CursorType::kNorthSouthResize: + case ui::mojom::CursorType::kNorthSouthResize: return XC_sb_v_double_arrow; - case ui::CursorType::kEastWestResize: + case ui::mojom::CursorType::kEastWestResize: return XC_sb_h_double_arrow; - case ui::CursorType::kNorthEastSouthWestResize: + case ui::mojom::CursorType::kNorthEastSouthWestResize: return XC_left_ptr; - case ui::CursorType::kNorthWestSouthEastResize: + case ui::mojom::CursorType::kNorthWestSouthEastResize: return XC_left_ptr; - case ui::CursorType::kColumnResize: + case ui::mojom::CursorType::kColumnResize: return XC_sb_h_double_arrow; - case ui::CursorType::kRowResize: + case ui::mojom::CursorType::kRowResize: return XC_sb_v_double_arrow; - case ui::CursorType::kMiddlePanning: + case ui::mojom::CursorType::kMiddlePanning: return XC_fleur; - case ui::CursorType::kEastPanning: + case ui::mojom::CursorType::kEastPanning: return XC_sb_right_arrow; - case ui::CursorType::kNorthPanning: + case ui::mojom::CursorType::kNorthPanning: return XC_sb_up_arrow; - case ui::CursorType::kNorthEastPanning: + case ui::mojom::CursorType::kNorthEastPanning: return XC_top_right_corner; - case ui::CursorType::kNorthWestPanning: + case ui::mojom::CursorType::kNorthWestPanning: return XC_top_left_corner; - case ui::CursorType::kSouthPanning: + case ui::mojom::CursorType::kSouthPanning: return XC_sb_down_arrow; - case ui::CursorType::kSouthEastPanning: + case ui::mojom::CursorType::kSouthEastPanning: return XC_bottom_right_corner; - case ui::CursorType::kSouthWestPanning: + case ui::mojom::CursorType::kSouthWestPanning: return XC_bottom_left_corner; - case ui::CursorType::kWestPanning: + case ui::mojom::CursorType::kWestPanning: return XC_sb_left_arrow; - case ui::CursorType::kMove: + case ui::mojom::CursorType::kMove: return XC_fleur; - case ui::CursorType::kVerticalText: + case ui::mojom::CursorType::kVerticalText: return XC_left_ptr; - case ui::CursorType::kCell: + case ui::mojom::CursorType::kCell: return XC_left_ptr; - case ui::CursorType::kContextMenu: + case ui::mojom::CursorType::kContextMenu: return XC_left_ptr; - case ui::CursorType::kAlias: + case ui::mojom::CursorType::kAlias: return XC_left_ptr; - case ui::CursorType::kProgress: + case ui::mojom::CursorType::kProgress: return XC_left_ptr; - case ui::CursorType::kNoDrop: + case ui::mojom::CursorType::kNoDrop: return XC_left_ptr; - case ui::CursorType::kCopy: + case ui::mojom::CursorType::kCopy: return XC_left_ptr; - case ui::CursorType::kNotAllowed: + case ui::mojom::CursorType::kNotAllowed: return XC_left_ptr; - case ui::CursorType::kZoomIn: + case ui::mojom::CursorType::kZoomIn: return XC_left_ptr; - case ui::CursorType::kZoomOut: + case ui::mojom::CursorType::kZoomOut: return XC_left_ptr; - case ui::CursorType::kGrab: + case ui::mojom::CursorType::kGrab: return XC_left_ptr; - case ui::CursorType::kGrabbing: + case ui::mojom::CursorType::kGrabbing: return XC_left_ptr; - case ui::CursorType::kMiddlePanningVertical: + case ui::mojom::CursorType::kMiddlePanningVertical: return XC_left_ptr; - case ui::CursorType::kMiddlePanningHorizontal: + case ui::mojom::CursorType::kMiddlePanningHorizontal: return XC_left_ptr; - case ui::CursorType::kDndNone: + case ui::mojom::CursorType::kDndNone: return XC_left_ptr; - case ui::CursorType::kDndMove: + case ui::mojom::CursorType::kDndMove: return XC_left_ptr; - case ui::CursorType::kDndCopy: + case ui::mojom::CursorType::kDndCopy: return XC_left_ptr; - case ui::CursorType::kDndLink: + case ui::mojom::CursorType::kDndLink: return XC_left_ptr; - case ui::CursorType::kNull: + case ui::mojom::CursorType::kNull: return XC_left_ptr; - case ui::CursorType::kCustom: - case ui::CursorType::kNone: + case ui::mojom::CursorType::kCustom: + case ui::mojom::CursorType::kNone: break; } NOTREACHED(); @@ -184,9 +180,9 @@ XCursorCache* cursor_cache = nullptr; #endif // defined(USE_X11) ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor( - ui::CursorType type) { + ui::mojom::CursorType type) { #if defined(USE_X11) - if (type == ui::CursorType::kNone) { + if (type == ui::mojom::CursorType::kNone) { if (!invisible_cursor_) { invisible_cursor_.reset(new ui::XScopedCursor(ui::CreateInvisibleCursor(), gfx::GetXDisplay())); diff --git a/libcef/browser/osr/render_widget_host_view_osr_win.cc b/libcef/browser/osr/render_widget_host_view_osr_win.cc index 2837ce356..45c68a997 100644 --- a/libcef/browser/osr/render_widget_host_view_osr_win.cc +++ b/libcef/browser/osr/render_widget_host_view_osr_win.cc @@ -10,7 +10,6 @@ #include "libcef/browser/browser_host_impl.h" #include "libcef/browser/content_browser_client.h" -#include "third_party/blink/public/platform/web_cursor_info.h" #include "ui/resources/grit/ui_unscaled_resources.h" namespace { @@ -39,112 +38,110 @@ class CefCompositorHostWin : public gfx::WindowImpl { // From content/common/cursors/webcursor_win.cc. -using blink::WebCursorInfo; - -LPCWSTR ToCursorID(ui::CursorType type) { +LPCWSTR ToCursorID(ui::mojom::CursorType type) { switch (type) { - case ui::CursorType::kPointer: + case ui::mojom::CursorType::kPointer: return IDC_ARROW; - case ui::CursorType::kCross: + case ui::mojom::CursorType::kCross: return IDC_CROSS; - case ui::CursorType::kHand: + case ui::mojom::CursorType::kHand: return IDC_HAND; - case ui::CursorType::kIBeam: + case ui::mojom::CursorType::kIBeam: return IDC_IBEAM; - case ui::CursorType::kWait: + case ui::mojom::CursorType::kWait: return IDC_WAIT; - case ui::CursorType::kHelp: + case ui::mojom::CursorType::kHelp: return IDC_HELP; - case ui::CursorType::kEastResize: + case ui::mojom::CursorType::kEastResize: return IDC_SIZEWE; - case ui::CursorType::kNorthResize: + case ui::mojom::CursorType::kNorthResize: return IDC_SIZENS; - case ui::CursorType::kNorthEastResize: + case ui::mojom::CursorType::kNorthEastResize: return IDC_SIZENESW; - case ui::CursorType::kNorthWestResize: + case ui::mojom::CursorType::kNorthWestResize: return IDC_SIZENWSE; - case ui::CursorType::kSouthResize: + case ui::mojom::CursorType::kSouthResize: return IDC_SIZENS; - case ui::CursorType::kSouthEastResize: + case ui::mojom::CursorType::kSouthEastResize: return IDC_SIZENWSE; - case ui::CursorType::kSouthWestResize: + case ui::mojom::CursorType::kSouthWestResize: return IDC_SIZENESW; - case ui::CursorType::kWestResize: + case ui::mojom::CursorType::kWestResize: return IDC_SIZEWE; - case ui::CursorType::kNorthSouthResize: + case ui::mojom::CursorType::kNorthSouthResize: return IDC_SIZENS; - case ui::CursorType::kEastWestResize: + case ui::mojom::CursorType::kEastWestResize: return IDC_SIZEWE; - case ui::CursorType::kNorthEastSouthWestResize: + case ui::mojom::CursorType::kNorthEastSouthWestResize: return IDC_SIZENESW; - case ui::CursorType::kNorthWestSouthEastResize: + case ui::mojom::CursorType::kNorthWestSouthEastResize: return IDC_SIZENWSE; - case ui::CursorType::kColumnResize: + case ui::mojom::CursorType::kColumnResize: return MAKEINTRESOURCE(IDC_COLRESIZE); - case ui::CursorType::kRowResize: + case ui::mojom::CursorType::kRowResize: return MAKEINTRESOURCE(IDC_ROWRESIZE); - case ui::CursorType::kMiddlePanning: + case ui::mojom::CursorType::kMiddlePanning: return MAKEINTRESOURCE(IDC_PAN_MIDDLE); - case ui::CursorType::kEastPanning: + case ui::mojom::CursorType::kEastPanning: return MAKEINTRESOURCE(IDC_PAN_EAST); - case ui::CursorType::kNorthPanning: + case ui::mojom::CursorType::kNorthPanning: return MAKEINTRESOURCE(IDC_PAN_NORTH); - case ui::CursorType::kNorthEastPanning: + case ui::mojom::CursorType::kNorthEastPanning: return MAKEINTRESOURCE(IDC_PAN_NORTH_EAST); - case ui::CursorType::kNorthWestPanning: + case ui::mojom::CursorType::kNorthWestPanning: return MAKEINTRESOURCE(IDC_PAN_NORTH_WEST); - case ui::CursorType::kSouthPanning: + case ui::mojom::CursorType::kSouthPanning: return MAKEINTRESOURCE(IDC_PAN_SOUTH); - case ui::CursorType::kSouthEastPanning: + case ui::mojom::CursorType::kSouthEastPanning: return MAKEINTRESOURCE(IDC_PAN_SOUTH_EAST); - case ui::CursorType::kSouthWestPanning: + case ui::mojom::CursorType::kSouthWestPanning: return MAKEINTRESOURCE(IDC_PAN_SOUTH_WEST); - case ui::CursorType::kWestPanning: + case ui::mojom::CursorType::kWestPanning: return MAKEINTRESOURCE(IDC_PAN_WEST); - case ui::CursorType::kMove: + case ui::mojom::CursorType::kMove: return IDC_SIZEALL; - case ui::CursorType::kVerticalText: + case ui::mojom::CursorType::kVerticalText: return MAKEINTRESOURCE(IDC_VERTICALTEXT); - case ui::CursorType::kCell: + case ui::mojom::CursorType::kCell: return MAKEINTRESOURCE(IDC_CELL); - case ui::CursorType::kContextMenu: + case ui::mojom::CursorType::kContextMenu: return IDC_ARROW; - case ui::CursorType::kAlias: + case ui::mojom::CursorType::kAlias: return MAKEINTRESOURCE(IDC_ALIAS); - case ui::CursorType::kProgress: + case ui::mojom::CursorType::kProgress: return IDC_APPSTARTING; - case ui::CursorType::kNoDrop: + case ui::mojom::CursorType::kNoDrop: return IDC_NO; - case ui::CursorType::kCopy: + case ui::mojom::CursorType::kCopy: return MAKEINTRESOURCE(IDC_COPYCUR); - case ui::CursorType::kNone: + case ui::mojom::CursorType::kNone: return MAKEINTRESOURCE(IDC_CURSOR_NONE); - case ui::CursorType::kNotAllowed: + case ui::mojom::CursorType::kNotAllowed: return IDC_NO; - case ui::CursorType::kZoomIn: + case ui::mojom::CursorType::kZoomIn: return MAKEINTRESOURCE(IDC_ZOOMIN); - case ui::CursorType::kZoomOut: + case ui::mojom::CursorType::kZoomOut: return MAKEINTRESOURCE(IDC_ZOOMOUT); - case ui::CursorType::kGrab: + case ui::mojom::CursorType::kGrab: return MAKEINTRESOURCE(IDC_HAND_GRAB); - case ui::CursorType::kGrabbing: + case ui::mojom::CursorType::kGrabbing: return MAKEINTRESOURCE(IDC_HAND_GRABBING); - case ui::CursorType::kNull: + case ui::mojom::CursorType::kNull: return IDC_NO; - case ui::CursorType::kMiddlePanningVertical: + case ui::mojom::CursorType::kMiddlePanningVertical: return MAKEINTRESOURCE(IDC_PAN_MIDDLE_VERTICAL); - case ui::CursorType::kMiddlePanningHorizontal: + case ui::mojom::CursorType::kMiddlePanningHorizontal: return MAKEINTRESOURCE(IDC_PAN_MIDDLE_HORIZONTAL); // TODO(cef): Find better cursors for these things - case ui::CursorType::kDndNone: + case ui::mojom::CursorType::kDndNone: return IDC_ARROW; - case ui::CursorType::kDndMove: + case ui::mojom::CursorType::kDndMove: return IDC_ARROW; - case ui::CursorType::kDndCopy: + case ui::mojom::CursorType::kDndCopy: return IDC_ARROW; - case ui::CursorType::kDndLink: + case ui::mojom::CursorType::kDndLink: return IDC_ARROW; - case ui::CursorType::kCustom: + case ui::mojom::CursorType::kCustom: break; } NOTREACHED(); @@ -158,7 +155,7 @@ bool IsSystemCursorID(LPCWSTR cursor_id) { } // namespace ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor( - ui::CursorType type) { + ui::mojom::CursorType type) { HMODULE module_handle = NULL; const wchar_t* cursor_id = ToCursorID(type); if (!IsSystemCursorID(cursor_id)) { diff --git a/libcef/browser/osr/web_contents_view_osr.cc b/libcef/browser/osr/web_contents_view_osr.cc index 16605869a..61a40585b 100644 --- a/libcef/browser/osr/web_contents_view_osr.cc +++ b/libcef/browser/osr/web_contents_view_osr.cc @@ -29,8 +29,11 @@ void CefWebContentsViewOSR::WebContentsCreated( DCHECK(!web_contents_); web_contents_ = web_contents; - // Call this again for popup browsers now that the view should exist. - RenderViewCreated(web_contents_->GetRenderViewHost()); + auto host = web_contents_->GetRenderViewHost(); + CefRenderWidgetHostViewOSR* view = + static_cast(host->GetWidget()->GetView()); + if (view) + view->InstallTransparency(); } gfx::NativeView CefWebContentsViewOSR::GetNativeView() const { @@ -123,15 +126,6 @@ CefWebContentsViewOSR::CreateViewForChildWidget( void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {} -void CefWebContentsViewOSR::RenderViewCreated(content::RenderViewHost* host) { - if (!host) - return; - CefRenderWidgetHostViewOSR* view = - static_cast(host->GetWidget()->GetView()); - if (view) - view->InstallTransparency(); -} - void CefWebContentsViewOSR::RenderViewReady() {} void CefWebContentsViewOSR::RenderViewHostChanged( diff --git a/libcef/browser/osr/web_contents_view_osr.h b/libcef/browser/osr/web_contents_view_osr.h index d23cc3217..088edce2b 100644 --- a/libcef/browser/osr/web_contents_view_osr.h +++ b/libcef/browser/osr/web_contents_view_osr.h @@ -50,7 +50,6 @@ class CefWebContentsViewOSR : public content::WebContentsView, content::RenderWidgetHostViewBase* CreateViewForChildWidget( content::RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; - void RenderViewCreated(content::RenderViewHost* host) override; void RenderViewReady() override; void RenderViewHostChanged(content::RenderViewHost* old_host, content::RenderViewHost* new_host) override; diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index 016c11e6e..3b02881d9 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -784,7 +784,7 @@ void CefMainDelegate::PreSandboxStartup() { crash_reporting::PreSandboxStartup(*command_line, process_type); InitializeResourceBundle(); - InitializePDF(); + MaybeInitializeGDI(); } void CefMainDelegate::SandboxInitialized(const std::string& process_type) { diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index cd667d9fb..05f7c5417 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -23,7 +23,6 @@ #include "components/navigation_interception/navigation_params.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/content_switches.h" -#include "content/public/common/resource_type.h" #include "net/base/elements_upload_data_stream.h" #include "net/base/load_flags.h" #include "net/base/upload_bytes_element_reader.h" @@ -38,6 +37,7 @@ #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/resource_request_body.h" #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h" +#include "third_party/blink/public/platform/web_http_body.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" @@ -207,17 +207,6 @@ void GetHeaderMap(const CefRequest::HeaderMap& source, } } -// Read |map| into |request|. -void SetHeaderMap(const CefRequest::HeaderMap& map, - blink::WebURLRequest& request) { - CefRequest::HeaderMap::const_iterator it = map.begin(); - for (; it != map.end(); ++it) { - request.SetHttpHeaderField( - blink::WebString::FromUTF16(it->first.ToString16()), - blink::WebString::FromUTF16(it->second.ToString16())); - } -} - // Type used in UploadDataStream. typedef std::vector> UploadElementReaders; @@ -610,63 +599,6 @@ void CefRequestImpl::Set( static_cast(params.transition_type()); } -void CefRequestImpl::Get(blink::WebURLRequest& request, - int64& upload_data_size) const { - base::AutoLock lock_scope(lock_); - - request.SetRequestContext(blink::mojom::RequestContextType::INTERNAL); - request.SetUrl(url_); - request.SetHttpMethod(blink::WebString::FromUTF8(method_)); - - if (!referrer_url_.is_empty()) { - const blink::WebString& referrer = - blink::WebSecurityPolicy::GenerateReferrerHeader( - NetReferrerPolicyToBlinkReferrerPolicy(referrer_policy_), url_, - blink::WebString::FromUTF8(referrer_url_.spec())); - if (!referrer.IsEmpty()) { - request.SetReferrerString(referrer); - request.SetReferrerPolicy( - NetReferrerPolicyToBlinkReferrerPolicy(referrer_policy_)); - } - } - - if (postdata_.get()) { - blink::WebHTTPBody body; - body.Initialize(); - static_cast(postdata_.get())->Get(body); - request.SetHttpBody(body); - - if (flags_ & UR_FLAG_REPORT_UPLOAD_PROGRESS) { - // Attempt to determine the upload data size. - CefPostData::ElementVector elements; - postdata_->GetElements(elements); - if (elements.size() == 1 && elements[0]->GetType() == PDE_TYPE_BYTES) { - CefPostDataElementImpl* impl = - static_cast(elements[0].get()); - upload_data_size = impl->GetBytesCount(); - } - } - } - - ::SetHeaderMap(headermap_, request); - - if (!site_for_cookies_.IsNull()) - request.SetSiteForCookies(site_for_cookies_); - - int flags = flags_; - if (!(flags & kURCachePolicyMask)) { - // Only consider the Cache-Control directives when a cache policy is not - // explicitly set on the request. - flags |= GetCacheControlHeaderPolicy(headermap_); - } - request.SetCacheMode(GetFetchCacheMode(flags)); - - SETBOOLFLAG(request, flags_, SetAllowStoredCredentials, - UR_FLAG_ALLOW_STORED_CREDENTIALS); - SETBOOLFLAG(request, flags_, SetReportUploadProgress, - UR_FLAG_REPORT_UPLOAD_PROGRESS); -} - // static void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params, blink::WebURLRequest& request) { @@ -867,8 +799,7 @@ CefRequestImpl::NetReferrerPolicyToBlinkReferrerPolicy( case REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE: return network::mojom::ReferrerPolicy::kNoReferrerWhenDowngrade; case REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN: - return network::mojom::ReferrerPolicy:: - kNoReferrerWhenDowngradeOriginWhenCrossOrigin; + return network::mojom::ReferrerPolicy::kStrictOriginWhenCrossOrigin; case REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN: return network::mojom::ReferrerPolicy::kOriginWhenCrossOrigin; case REFERRER_POLICY_NEVER_CLEAR_REFERRER: @@ -892,8 +823,7 @@ cef_referrer_policy_t CefRequestImpl::BlinkReferrerPolicyToNetReferrerPolicy( switch (blink_policy) { case network::mojom::ReferrerPolicy::kNoReferrerWhenDowngrade: return REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE; - case network::mojom::ReferrerPolicy:: - kNoReferrerWhenDowngradeOriginWhenCrossOrigin: + case network::mojom::ReferrerPolicy::kStrictOriginWhenCrossOrigin: return REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN; case network::mojom::ReferrerPolicy::kOriginWhenCrossOrigin: return REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN; @@ -1182,42 +1112,6 @@ std::unique_ptr CefPostDataImpl::Get() const { std::move(element_readers), 0); } -void CefPostDataImpl::Set(const blink::WebHTTPBody& data) { - { - base::AutoLock lock_scope(lock_); - CHECK_READONLY_RETURN_VOID(); - } - - CefRefPtr postelem; - blink::WebHTTPBody::Element element; - size_t size = data.ElementCount(); - for (size_t i = 0; i < size; ++i) { - if (data.ElementAt(i, element)) { - postelem = CefPostDataElement::Create(); - static_cast(postelem.get())->Set(element); - AddElement(postelem); - } - } -} - -void CefPostDataImpl::Get(blink::WebHTTPBody& data) const { - base::AutoLock lock_scope(lock_); - - blink::WebHTTPBody::Element element; - ElementVector::const_iterator it = elements_.begin(); - for (; it != elements_.end(); ++it) { - static_cast(it->get())->Get(element); - if (element.type == blink::WebHTTPBody::Element::kTypeData) { - data.AppendData(element.data); - } else if (element.type == blink::WebHTTPBody::Element::kTypeFile) { - data.AppendFileRange(element.file_path, element.file_start, - element.file_length, element.modification_time); - } else { - NOTREACHED(); - } - } -} - void CefPostDataImpl::SetReadOnly(bool read_only) { base::AutoLock lock_scope(lock_); if (read_only_ == read_only) @@ -1470,45 +1364,6 @@ std::unique_ptr CefPostDataElementImpl::Get() const { } } -void CefPostDataElementImpl::Set(const blink::WebHTTPBody::Element& element) { - { - base::AutoLock lock_scope(lock_); - CHECK_READONLY_RETURN_VOID(); - } - - if (element.type == blink::WebHTTPBody::Element::kTypeData) { - std::string file_contents; - file_contents.reserve(element.data.size()); - element.data.ForEachSegment([&file_contents](const char* segment, - size_t segment_size, - size_t segment_offset) { - file_contents.append(segment, segment_size); - return true; - }); - SetToBytes(file_contents.size(), file_contents.data()); - } else if (element.type == blink::WebHTTPBody::Element::kTypeFile) { - SetToFile(element.file_path.Utf16()); - } else { - NOTREACHED(); - } -} - -void CefPostDataElementImpl::Get(blink::WebHTTPBody::Element& element) const { - base::AutoLock lock_scope(lock_); - - if (type_ == PDE_TYPE_BYTES) { - element.type = blink::WebHTTPBody::Element::kTypeData; - element.data.Assign(static_cast(data_.bytes.bytes), - data_.bytes.size); - } else if (type_ == PDE_TYPE_FILE) { - element.type = blink::WebHTTPBody::Element::kTypeFile; - element.file_path = - blink::WebString::FromUTF16(CefString(&data_.filename).ToString16()); - } else { - NOTREACHED(); - } -} - void CefPostDataElementImpl::SetReadOnly(bool read_only) { base::AutoLock lock_scope(lock_); if (read_only_ == read_only) diff --git a/libcef/common/request_impl.h b/libcef/common/request_impl.h index b0e259748..aa6462e55 100644 --- a/libcef/common/request_impl.h +++ b/libcef/common/request_impl.h @@ -15,7 +15,6 @@ #include "base/synchronization/lock.h" #include "net/cookies/site_for_cookies.h" #include "services/network/public/mojom/referrer_policy.mojom-shared.h" -#include "third_party/blink/public/platform/web_http_body.h" #include "url/gurl.h" namespace blink { @@ -109,10 +108,6 @@ class CefRequestImpl : public CefRequest { void Set(const navigation_interception::NavigationParams& params, bool is_main_frame); - // Populate the WebURLRequest object from this object. - // Called from CefRenderURLRequest::Context::Start(). - void Get(blink::WebURLRequest& request, int64& upload_data_size) const; - // Populate the WebURLRequest object based on the contents of |params|. // Called from CefBrowserImpl::LoadRequest(). static void Get(const CefMsg_LoadRequest_Params& params, @@ -217,8 +212,6 @@ class CefPostDataImpl : public CefPostData { void Set(const net::UploadDataStream& data_stream); void Get(net::UploadData& data) const; std::unique_ptr Get() const; - void Set(const blink::WebHTTPBody& data); - void Get(blink::WebHTTPBody& data) const; void SetReadOnly(bool read_only); @@ -270,8 +263,6 @@ class CefPostDataElementImpl : public CefPostDataElement { void Set(const net::UploadElementReader& element_reader); void Get(net::UploadElement& element) const; std::unique_ptr Get() const; - void Set(const blink::WebHTTPBody::Element& element); - void Get(blink::WebHTTPBody::Element& element) const; void SetReadOnly(bool read_only); diff --git a/libcef/common/value_base.h b/libcef/common/value_base.h index 03ea42192..3fd1c9225 100644 --- a/libcef/common/value_base.h +++ b/libcef/common/value_base.h @@ -13,6 +13,7 @@ #include "base/logging.h" #include "base/memory/ref_counted.h" #include "base/synchronization/lock.h" +#include "base/thread_annotations.h" #include "base/threading/platform_thread.h" // Controller implementation base class. @@ -142,11 +143,11 @@ class CefValueControllerThreadSafe : public CefValueController { // CefValueController methods. bool thread_safe() override { return true; } bool on_correct_thread() override { return true; } - void lock() override { + void lock() override NO_THREAD_SAFETY_ANALYSIS { lock_.Acquire(); locked_thread_id_ = base::PlatformThread::CurrentId(); } - void unlock() override { + void unlock() override NO_THREAD_SAFETY_ANALYSIS { locked_thread_id_ = 0; lock_.Release(); } diff --git a/libcef/common/values_impl.cc b/libcef/common/values_impl.cc index 2fbe1cb33..5884116de 100644 --- a/libcef/common/values_impl.cc +++ b/libcef/common/values_impl.cc @@ -378,7 +378,7 @@ CefValueController* CefValueImpl::GetValueController() const { return nullptr; } -void CefValueImpl::AcquireLock() { +void CefValueImpl::AcquireLock() NO_THREAD_SAFETY_ANALYSIS { lock_.Acquire(); CefValueController* controller = GetValueController(); @@ -386,7 +386,7 @@ void CefValueImpl::AcquireLock() { controller->lock(); } -void CefValueImpl::ReleaseLock() { +void CefValueImpl::ReleaseLock() NO_THREAD_SAFETY_ANALYSIS { CefValueController* controller = GetValueController(); if (controller) { controller->AssertLockAcquired(); diff --git a/libcef/renderer/blink_glue.cc b/libcef/renderer/blink_glue.cc index 58f1c3f30..8f2c13e1f 100644 --- a/libcef/renderer/blink_glue.cc +++ b/libcef/renderer/blink_glue.cc @@ -152,7 +152,8 @@ v8::MaybeLocal CallV8Function(v8::Local context, if (frame && frame->GetDocument()->CanExecuteScripts(blink::kAboutToExecuteScript)) { func_rv = blink::V8ScriptRunner::CallFunction( - function, frame->GetDocument(), receiver, argc, args, isolate); + function, frame->GetDocument()->ToExecutionContext(), receiver, argc, + args, isolate); } return func_rv; diff --git a/libcef/renderer/content_renderer_client.cc b/libcef/renderer/content_renderer_client.cc index d45e742cf..8115e07ba 100644 --- a/libcef/renderer/content_renderer_client.cc +++ b/libcef/renderer/content_renderer_client.cc @@ -95,7 +95,6 @@ #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/scheduler/web_renderer_process_type.h" #include "third_party/blink/public/platform/url_conversion.h" -#include "third_party/blink/public/platform/web_prerendering_support.h" #include "third_party/blink/public/platform/web_runtime_features.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_url.h" @@ -115,15 +114,6 @@ namespace { -// Stub implementation of blink::WebPrerenderingSupport. -class CefPrerenderingSupport : public blink::WebPrerenderingSupport { - private: - void Add(const blink::WebPrerender& prerender) override {} - void Cancel(const blink::WebPrerender& prerender) override {} - void Abandon(const blink::WebPrerender& prerender) override {} - void PrefetchFinished() override {} -}; - // Stub implementation of blink::WebPrerendererClient. class CefPrerendererClient : public content::RenderViewObserver, public blink::WebPrerendererClient { @@ -141,7 +131,6 @@ class CefPrerendererClient : public content::RenderViewObserver, void OnDestruct() override { delete this; } // WebPrerendererClient methods: - void WillAddPrerender(blink::WebPrerender* prerender) override {} bool IsPrefetchOnly() override { return false; } }; @@ -404,8 +393,6 @@ void CefContentRendererClient::RenderThreadStarted() { base::MessageLoopCurrent::Get()->AddDestructionObserver(this); } - blink::WebPrerenderingSupport::Initialize(new CefPrerenderingSupport()); - #if defined(OS_MACOSX) { base::ScopedCFTypeRef key( diff --git a/libcef/renderer/render_thread_observer.cc b/libcef/renderer/render_thread_observer.cc index aa743fc65..e4c3bdf3a 100644 --- a/libcef/renderer/render_thread_observer.cc +++ b/libcef/renderer/render_thread_observer.cc @@ -84,12 +84,6 @@ void CefRenderThreadObserver::SetConfiguration( void CefRenderThreadObserver::SetContentSettingRules( const RendererContentSettingRules& rules) {} -void CefRenderThreadObserver::SetFieldTrialGroup( - const std::string& trial_name, - const std::string& group_name) { - content::RenderThread::Get()->SetFieldTrialGroup(trial_name, group_name); -} - void CefRenderThreadObserver::OnRendererConfigurationAssociatedRequest( mojo::PendingAssociatedReceiver receiver) { diff --git a/libcef/renderer/render_thread_observer.h b/libcef/renderer/render_thread_observer.h index f88c3608a..2044fc87c 100644 --- a/libcef/renderer/render_thread_observer.h +++ b/libcef/renderer/render_thread_observer.h @@ -46,8 +46,6 @@ class CefRenderThreadObserver : public content::RenderThreadObserver, void SetConfiguration(chrome::mojom::DynamicParamsPtr params) override; void SetContentSettingRules( const RendererContentSettingRules& rules) override; - void SetFieldTrialGroup(const std::string& trial_name, - const std::string& group_name) override; void OnRendererConfigurationAssociatedRequest( mojo::PendingAssociatedReceiver diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index ac7759ce6..c187d172a 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -14,6 +14,8 @@ #include "base/logging.h" #include "base/message_loop/message_loop.h" +#include "net/base/request_priority.h" +#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.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" @@ -110,15 +112,35 @@ class CefRenderURLRequest::Context url_client_.reset(new CefWebURLLoaderClient(this, request_->GetFlags())); - WebURLRequest urlRequest; + std::unique_ptr resource_request = + std::make_unique(); static_cast(request_.get()) - ->Get(urlRequest, upload_data_size_); - urlRequest.SetPriority(blink::WebURLRequest::Priority::kMedium); + ->Get(resource_request.get(), false); + resource_request->priority = net::MEDIUM; + + // Behave the same as a subresource load. + resource_request->fetch_request_context_type = + static_cast(blink::mojom::RequestContextType::SUBRESOURCE); + resource_request->resource_type = + static_cast(blink::mojom::ResourceType::kSubResource); + + // Need load timing info for WebURLLoaderImpl::PopulateURLResponse to + // properly set cached status. + resource_request->enable_load_timing = true; // Set the origin to match the request. The requirement for an origin is // DCHECK'd in ResourceDispatcherHostImpl::ContinuePendingBeginRequest. - urlRequest.SetRequestorOrigin( - blink::WebSecurityOrigin::Create(urlRequest.Url())); + resource_request->request_initiator = url::Origin::Create(url); + + if (resource_request->request_body) { + const auto& elements = *resource_request->request_body->elements(); + if (elements.size() > 0) { + const auto& element = elements[0]; + if (element.type() == network::mojom::DataElementType::kBytes) { + upload_data_size_ = element.length() - element.offset(); + } + } + } blink::WebURLLoaderFactory* factory = nullptr; if (frame_) { @@ -131,9 +153,13 @@ class CefRenderURLRequest::Context } loader_ = factory->CreateURLLoader( - urlRequest, blink::scheduler::WebResourceLoadingTaskRunnerHandle:: - CreateUnprioritized(task_runner_.get())); - loader_->LoadAsynchronously(urlRequest, url_client_.get()); + blink::WebURLRequest(), + blink::scheduler::WebResourceLoadingTaskRunnerHandle:: + CreateUnprioritized(task_runner_.get())); + 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()); return true; } @@ -316,8 +342,7 @@ class CefRenderURLRequest::Context // Upload notifications are sent using a timer and may not occur if the // request completes too quickly. We therefore send the notification here // if necessary. - client_->OnUploadProgress(url_request_.get(), upload_data_size_, - upload_data_size_); + url_client_->DidSendData(upload_data_size_, upload_data_size_); got_upload_progress_complete_ = true; } } diff --git a/libcef/renderer/url_loader_throttle_provider_impl.cc b/libcef/renderer/url_loader_throttle_provider_impl.cc index f73eb73bc..61f6f8d78 100644 --- a/libcef/renderer/url_loader_throttle_provider_impl.cc +++ b/libcef/renderer/url_loader_throttle_provider_impl.cc @@ -15,6 +15,7 @@ #include "content/public/renderer/render_frame.h" #include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h" #include "services/network/public/cpp/features.h" +#include "third_party/blink/public/common/loader/resource_type_util.h" #include "third_party/blink/public/platform/web_url.h" CefURLLoaderThrottleProviderImpl::CefURLLoaderThrottleProviderImpl( @@ -42,22 +43,25 @@ CefURLLoaderThrottleProviderImpl::Clone() { std::vector> CefURLLoaderThrottleProviderImpl::CreateThrottles( int render_frame_id, - const blink::WebURLRequest& request, - content::ResourceType resource_type) { + const blink::WebURLRequest& request) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); std::vector> throttles; + const network::mojom::RequestDestination request_destination = + request.GetRequestDestination(); + // Some throttles have already been added in the browser for frame resources. // Don't add them for frame requests. - bool is_frame_resource = content::IsResourceTypeFrame(resource_type); + bool is_frame_resource = + blink::IsRequestDestinationFrame(request_destination); DCHECK(!is_frame_resource || type_ == content::URLLoaderThrottleProviderType::kFrame); if (extensions::ExtensionsEnabled() && type_ == content::URLLoaderThrottleProviderType::kFrame && - resource_type == content::ResourceType::kObject) { + request_destination == network::mojom::RequestDestination::kObject) { content::RenderFrame* render_frame = content::RenderFrame::FromRoutingID(render_frame_id); auto mime_handlers = @@ -73,7 +77,6 @@ CefURLLoaderThrottleProviderImpl::CreateThrottles( } throttles.push_back(std::make_unique( - CefRenderThreadObserver::is_incognito_process(), CefRenderThreadObserver::GetDynamicParams())); return throttles; diff --git a/libcef/renderer/url_loader_throttle_provider_impl.h b/libcef/renderer/url_loader_throttle_provider_impl.h index 5be0a1df7..1fe2ca085 100644 --- a/libcef/renderer/url_loader_throttle_provider_impl.h +++ b/libcef/renderer/url_loader_throttle_provider_impl.h @@ -25,8 +25,7 @@ class CefURLLoaderThrottleProviderImpl std::unique_ptr Clone() override; std::vector> CreateThrottles( int render_frame_id, - const blink::WebURLRequest& request, - content::ResourceType resource_type) override; + const blink::WebURLRequest& request) override; void SetOnline(bool is_online) override; private: diff --git a/patch/patch.cfg b/patch/patch.cfg index f9a961f2a..a9973fb6b 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -327,11 +327,6 @@ patches = [ # https://bitbucket.org/chromiumembedded/cef/issues/2470 'name': 'build', }, - { - # Linux: Remove GTK build dependency. - # https://bitbucket.org/chromiumembedded/cef/issues/2014 - 'name': 'linux_gtk_2014', - }, { # Changes necessary to support for chrome extensions. Add a new # ExtensionHost constructor that allows CEF to create the WebContents. @@ -414,11 +409,6 @@ patches = [ # for the cef_sandbox build, and which is no longer required. # https://bugs.chromium.org/p/chromium/issues/detail?id=646113#c173 # https://chromium.googlesource.com/chromium/src/+/2f28731c17 - # - # Windows: Revert "implement C++17's std::as_const" change which causes the - # cef_sandbox build to fail with "error: call to 'as_const' is ambiguous". - # https://bugs.chromium.org/p/chromium/issues/detail?id=752720#c132 - # https://chromium.googlesource.com/chromium/src/+/9b751f0f4d 'name': 'win_base_msvc_sandbox', }, { @@ -493,19 +483,6 @@ patches = [ # https://chromium-review.googlesource.com/c/chromium/src/+/1884750 'name': 'libxml_visibility', }, - { - # Fix Jumbo build errors. - # - Allow use of jumbo-related GN args. - # - Fix multiple definition errors. - # - Add `never_build_jumbo = true` for targets with complex errors. - 'name': 'build_jumbo', - }, - { - # Ignore port number when matching scheme + IP address in - # VerifyRequestInitiatorLock. - # https://bugs.chromium.org/p/chromium/issues/detail?id=1051674 - 'name': 'services_network_initiator_lock_1051674', - }, { # Fix ScreenlockMonitorDeviceSource window creation error. # https://bugs.chromium.org/p/chromium/issues/detail?id=1058556 diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index 438301da8..51b1ecbe3 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,8 +1,8 @@ diff --git base/BUILD.gn base/BUILD.gn -index 447280ffe5e3..ddff00ac1a69 100644 +index b47b0ec88dde..d3554dd7ef6e 100644 --- base/BUILD.gn +++ base/BUILD.gn -@@ -32,6 +32,7 @@ import("//build/config/sysroot.gni") +@@ -33,6 +33,7 @@ import("//build/config/sysroot.gni") import("//build/config/ui.gni") import("//build/nocompile.gni") import("//build/timestamp.gni") @@ -10,7 +10,7 @@ index 447280ffe5e3..ddff00ac1a69 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") import("//third_party/icu/config.gni") -@@ -1644,7 +1645,11 @@ jumbo_component("base") { +@@ -1654,7 +1655,11 @@ jumbo_component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] diff --git a/patch/patches/browser_compositor_mac.patch b/patch/patches/browser_compositor_mac.patch index 85e0d566c..6f4844946 100644 --- a/patch/patches/browser_compositor_mac.patch +++ b/patch/patches/browser_compositor_mac.patch @@ -12,7 +12,7 @@ index af7b3249d421..1483a48f9074 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 c1593171af25..4c892782d338 100644 +index ac9fdebbc87d..ebb2556ad908 100644 --- content/browser/renderer_host/browser_compositor_view_mac.mm +++ content/browser/renderer_host/browser_compositor_view_mac.mm @@ -85,6 +85,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() { diff --git a/patch/patches/browser_scheduler.patch b/patch/patches/browser_scheduler.patch index 274d54af5..6f5f47052 100644 --- a/patch/patches/browser_scheduler.patch +++ b/patch/patches/browser_scheduler.patch @@ -1,8 +1,8 @@ diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc -index eb9f505243bf..191368199d44 100644 +index fb38e3b0f072..c390d6443e7b 100644 --- content/browser/scheduler/browser_task_executor.cc +++ content/browser/scheduler/browser_task_executor.cc -@@ -245,7 +245,7 @@ void BrowserTaskExecutor::PostFeatureListSetup() { +@@ -244,7 +244,7 @@ void BrowserTaskExecutor::PostFeatureListSetup() { // static void BrowserTaskExecutor::Shutdown() { diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 6efc58876..767d0048b 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 eef1140e8006..0e222de2a9a6 100644 +index 9573394d28b8..eb3663551a62 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -162,7 +162,7 @@ declare_args() { +@@ -163,7 +163,7 @@ declare_args() { !use_clang_coverage && !(is_android && use_order_profiling) && (use_lld || (use_gold && @@ -11,7 +11,7 @@ index eef1140e8006..0e222de2a9a6 100644 !(current_cpu == "x86" || current_cpu == "x64")))) } -@@ -1743,8 +1743,6 @@ config("thin_archive") { +@@ -1748,8 +1748,6 @@ config("thin_archive") { # archive names to 16 characters, which is not what we want). if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { arflags = [ "-T" ] diff --git a/patch/patches/build_jumbo.patch b/patch/patches/build_jumbo.patch deleted file mode 100644 index ec4c7bc15..000000000 --- a/patch/patches/build_jumbo.patch +++ /dev/null @@ -1,1907 +0,0 @@ -diff --git base/win/com_init_util.cc base/win/com_init_util.cc -index 57c3c6f8d8c5..fee206222ebf 100644 ---- base/win/com_init_util.cc -+++ base/win/com_init_util.cc -@@ -35,7 +35,7 @@ struct OleTlsData { - }; - - OleTlsData* GetOleTlsData() { -- TEB* teb = NtCurrentTeb(); -+ auto teb = NtCurrentTeb(); - return reinterpret_cast(teb->ReservedForOle); - } - -diff --git build/config/jumbo.gni build/config/jumbo.gni -index 0c84b283bf8f..e6f033a59151 100644 ---- build/config/jumbo.gni -+++ build/config/jumbo.gni -@@ -11,13 +11,6 @@ declare_args() { - jumbo_file_merge_limit = -1 - } - --# TODO(crbug.com/994387): Remove all uses of the jumbo_* templates from the --# BUILD.gn files, and then remove this whole file. --assert(!use_jumbo_build, -- "The jumbo build is no longer supported. Please remove any uses of " + -- "'use_jumbo_build', 'jumbo_build_excluded', or " + -- "'jumbo_file_merge_limit' from your args.gn file and re-run GN.") -- - # Normal builds benefit from lots of jumbification - jumbo_file_merge_default = 50 - -diff --git chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc -index 3a6306647661..6ea29431a353 100644 ---- chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc -+++ chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc -@@ -570,7 +570,7 @@ void IdentityGetAuthTokenFunction::OnIssueAdviceSuccess( - - void IdentityGetAuthTokenFunction::OnRemoteConsentSuccess( - const RemoteConsentResolutionData& resolution_data) { -- if (!base::FeatureList::IsEnabled(switches::kOAuthRemoteConsent)) { -+ if (!base::FeatureList::IsEnabled(::switches::kOAuthRemoteConsent)) { - // Fallback to the issue advice flow. - // TODO(https://crbug.com/1026237): Remove the fallback after making sure - // that the new flow works correctly. -diff --git chrome/browser/extensions/api/input_ime/input_ime_api.cc chrome/browser/extensions/api/input_ime/input_ime_api.cc -index a7cea04fa3d0..60dc5475e747 100644 ---- chrome/browser/extensions/api/input_ime/input_ime_api.cc -+++ chrome/browser/extensions/api/input_ime/input_ime_api.cc -@@ -19,7 +19,9 @@ namespace SendKeyEvents = extensions::api::input_ime::SendKeyEvents; - using input_method::InputMethodEngineBase; - - namespace { -+namespace i { - const char kErrorRouterNotAvailable[] = "The router is not available."; -+} - const char kErrorSetKeyEventsFail[] = "Could not send key events."; - - InputMethodEngineBase* GetEngineIfActive(Profile* profile, -@@ -27,7 +29,7 @@ InputMethodEngineBase* GetEngineIfActive(Profile* profile, - std::string* error) { - extensions::InputImeEventRouter* event_router = - extensions::GetInputImeEventRouter(profile); -- DCHECK(event_router) << kErrorRouterNotAvailable; -+ DCHECK(event_router) << i::kErrorRouterNotAvailable; - InputMethodEngineBase* engine = - event_router->GetEngineIfActive(extension_id, error); - return engine; -diff --git chrome/browser/native_file_system/chrome_native_file_system_permission_context.cc chrome/browser/native_file_system/chrome_native_file_system_permission_context.cc -index e0da20cc3bb6..b3f6720dff90 100644 ---- chrome/browser/native_file_system/chrome_native_file_system_permission_context.cc -+++ chrome/browser/native_file_system/chrome_native_file_system_permission_context.cc -@@ -194,6 +194,7 @@ bool ShouldBlockAccessToPath(const base::FilePath& check_path) { - - // Returns a callback that calls the passed in |callback| by posting a task to - // the current sequenced task runner. -+namespace i { - template - base::OnceCallback - BindResultCallbackToCurrentSequence( -@@ -207,6 +208,7 @@ BindResultCallbackToCurrentSequence( - }, - base::SequencedTaskRunnerHandle::Get(), std::move(callback)); - } -+} // namespace i - - void DoSafeBrowsingCheckOnUIThread( - int process_id, -@@ -402,7 +404,7 @@ void ChromeNativeFileSystemPermissionContext:: - } - - auto result_callback = -- BindResultCallbackToCurrentSequence(std::move(callback)); -+ i::BindResultCallbackToCurrentSequence(std::move(callback)); - - base::PostTask( - FROM_HERE, {content::BrowserThread::UI}, -diff --git chrome/browser/optimization_guide/optimization_guide_navigation_data.cc chrome/browser/optimization_guide/optimization_guide_navigation_data.cc -index b532a58d5db7..e6d30ce29ea1 100644 ---- chrome/browser/optimization_guide/optimization_guide_navigation_data.cc -+++ chrome/browser/optimization_guide/optimization_guide_navigation_data.cc -@@ -8,6 +8,7 @@ - #include "base/metrics/histogram_functions.h" - #include "base/metrics/histogram_macros.h" - #include "base/strings/stringprintf.h" -+#include "chrome/browser/optimization_guide/optimization_guide_util.h" - #include "chrome/browser/optimization_guide/optimization_guide_web_contents_observer.h" - #include "components/optimization_guide/hints_processing_util.h" - #include "content/public/browser/navigation_handle.h" -@@ -16,25 +17,6 @@ - #include "services/metrics/public/cpp/ukm_source.h" - #include "services/metrics/public/cpp/ukm_source_id.h" - --namespace { -- --// The returned string is used to record histograms for the optimization target. --// Also add the string to OptimizationGuide.OptimizationTargets histogram --// suffixes in histograms.xml. --std::string GetStringNameForOptimizationTarget( -- optimization_guide::proto::OptimizationTarget optimization_target) { -- switch (optimization_target) { -- case optimization_guide::proto::OPTIMIZATION_TARGET_UNKNOWN: -- return "Unknown"; -- case optimization_guide::proto::OPTIMIZATION_TARGET_PAINFUL_PAGE_LOAD: -- return "PainfulPageLoad"; -- } -- NOTREACHED(); -- return std::string(); --} -- --} // namespace -- - OptimizationGuideNavigationData::OptimizationGuideNavigationData( - int64_t navigation_id) - : navigation_id_(navigation_id) {} -diff --git chrome/browser/optimization_guide/prediction/prediction_manager.cc chrome/browser/optimization_guide/prediction/prediction_manager.cc -index 7b7567f55df2..3b204a446187 100644 ---- chrome/browser/optimization_guide/prediction/prediction_manager.cc -+++ chrome/browser/optimization_guide/prediction/prediction_manager.cc -@@ -62,7 +62,9 @@ bool ShouldUseCurrentOptimizationTargetDecision( - - // Delay between retries on failed fetch and store of prediction models and - // host model features from the remote Optimization Guide Service. -+namespace i { - constexpr base::TimeDelta kFetchRetryDelay = base::TimeDelta::FromMinutes(16); -+} - - // The amount of time to wait after a successful fetch of models and host model - // features before requesting an update from the remote Optimization Guide -@@ -72,11 +74,13 @@ constexpr base::TimeDelta kUpdateModelsAndFeaturesDelay = - - // Provide a random time delta in seconds before fetching models and host model - // features. -+namespace i { - base::TimeDelta RandomFetchDelay() { - return base::TimeDelta::FromSeconds(base::RandInt( - optimization_guide::features::PredictionModelFetchRandomMinDelaySecs(), - optimization_guide::features::PredictionModelFetchRandomMaxDelaySecs())); - } -+} - - // Util class for recording the state of a prediction model. The result is - // recorded when it goes out of scope and its destructor is called. -@@ -822,12 +826,12 @@ void PredictionManager::ScheduleModelsAndHostModelFeaturesFetch() { - model_and_features_store_->GetHostModelFeaturesUpdateTime() - - clock_->Now(); - const base::TimeDelta time_until_retry = -- GetLastFetchAttemptTime() + kFetchRetryDelay - clock_->Now(); -+ GetLastFetchAttemptTime() + i::kFetchRetryDelay - clock_->Now(); - base::TimeDelta fetcher_delay = - std::max(time_until_update_time, time_until_retry); - if (fetcher_delay <= base::TimeDelta()) { - SetLastModelAndFeaturesFetchAttemptTime(clock_->Now()); -- fetch_timer_.Start(FROM_HERE, RandomFetchDelay(), this, -+ fetch_timer_.Start(FROM_HERE, i::RandomFetchDelay(), this, - &PredictionManager::FetchModelsAndHostModelFeatures); - return; - } -diff --git chrome/browser/performance_manager/decorators/process_priority_aggregator.cc chrome/browser/performance_manager/decorators/process_priority_aggregator.cc -index 43ad1e7a3a42..e158b1dff474 100644 ---- chrome/browser/performance_manager/decorators/process_priority_aggregator.cc -+++ chrome/browser/performance_manager/decorators/process_priority_aggregator.cc -@@ -22,6 +22,7 @@ class ProcessPriorityAggregatorAccess { - - namespace { - -+namespace i { - class DataImpl : public ProcessPriorityAggregator::Data, - public NodeAttachedDataImpl { - public: -@@ -37,6 +38,7 @@ class DataImpl : public ProcessPriorityAggregator::Data, - return ProcessPriorityAggregatorAccess::GetUniquePtrStorage(process_node); - } - }; -+} // namespace i - - } // namespace - -@@ -106,7 +108,7 @@ base::TaskPriority ProcessPriorityAggregator::Data::GetPriority() const { - // static - ProcessPriorityAggregator::Data* ProcessPriorityAggregator::Data::GetForTesting( - ProcessNodeImpl* process_node) { -- return DataImpl::Get(process_node); -+ return i::DataImpl::Get(process_node); - } - - ProcessPriorityAggregator::ProcessPriorityAggregator() = default; -@@ -114,7 +116,7 @@ ProcessPriorityAggregator::~ProcessPriorityAggregator() = default; - - void ProcessPriorityAggregator::OnFrameNodeAdded(const FrameNode* frame_node) { - auto* process_node = ProcessNodeImpl::FromNode(frame_node->GetProcessNode()); -- DataImpl* data = DataImpl::Get(process_node); -+ i::DataImpl* data = i::DataImpl::Get(process_node); - data->Increment(frame_node->GetPriorityAndReason().priority()); - // This is a nop if the priority didn't actually change. - process_node->set_priority(data->GetPriority()); -@@ -123,7 +125,7 @@ void ProcessPriorityAggregator::OnFrameNodeAdded(const FrameNode* frame_node) { - void ProcessPriorityAggregator::OnBeforeFrameNodeRemoved( - const FrameNode* frame_node) { - auto* process_node = ProcessNodeImpl::FromNode(frame_node->GetProcessNode()); -- DataImpl* data = DataImpl::Get(process_node); -+ i::DataImpl* data = i::DataImpl::Get(process_node); - data->Decrement(frame_node->GetPriorityAndReason().priority()); - // This is a nop if the priority didn't actually change. - process_node->set_priority(data->GetPriority()); -@@ -140,7 +142,7 @@ void ProcessPriorityAggregator::OnPriorityAndReasonChanged( - // Update the distinct frame priority counts, and set the process priority - // accordingly. - auto* process_node = ProcessNodeImpl::FromNode(frame_node->GetProcessNode()); -- DataImpl* data = DataImpl::Get(process_node); -+ i::DataImpl* data = i::DataImpl::Get(process_node); - data->Decrement(previous_value.priority()); - data->Increment(new_value.priority()); - // This is a nop if the priority didn't actually change. -@@ -160,8 +162,8 @@ void ProcessPriorityAggregator::OnTakenFromGraph(Graph* graph) { - void ProcessPriorityAggregator::OnProcessNodeAdded( - const ProcessNode* process_node) { - auto* process_node_impl = ProcessNodeImpl::FromNode(process_node); -- DCHECK(!DataImpl::Get(process_node_impl)); -- DataImpl* data = DataImpl::GetOrCreate(process_node_impl); -+ DCHECK(!i::DataImpl::Get(process_node_impl)); -+ i::DataImpl* data = i::DataImpl::GetOrCreate(process_node_impl); - DCHECK(data->IsEmpty()); - DCHECK_EQ(base::TaskPriority::LOWEST, process_node_impl->priority()); - DCHECK_EQ(base::TaskPriority::LOWEST, data->GetPriority()); -@@ -171,7 +173,7 @@ void ProcessPriorityAggregator::OnBeforeProcessNodeRemoved( - const ProcessNode* process_node) { - #if DCHECK_IS_ON() - auto* process_node_impl = ProcessNodeImpl::FromNode(process_node); -- DataImpl* data = DataImpl::Get(process_node_impl); -+ i::DataImpl* data = i::DataImpl::Get(process_node_impl); - DCHECK(data->IsEmpty()); - #endif - } -diff --git chrome/browser/sharing/webrtc/ice_config_fetcher.cc chrome/browser/sharing/webrtc/ice_config_fetcher.cc -index 6dee784e18f8..66bb7b805728 100644 ---- chrome/browser/sharing/webrtc/ice_config_fetcher.cc -+++ chrome/browser/sharing/webrtc/ice_config_fetcher.cc -@@ -23,6 +23,7 @@ const char kIceConfigApiUrl[] = - // configs. - constexpr int kMaxBodySize = 16 * 1024; - -+namespace i { - const net::NetworkTrafficAnnotationTag kTrafficAnnotation = - net::DefineNetworkTrafficAnnotation("ice_config_fetcher", R"( - semantics { -@@ -48,6 +49,7 @@ const net::NetworkTrafficAnnotationTag kTrafficAnnotation = - } - } - })"); -+} // namespace i - - bool IsLoaderSuccessful(const network::SimpleURLLoader* loader) { - if (!loader || loader->NetError() != net::OK) -@@ -82,7 +84,7 @@ void IceConfigFetcher::GetIceServers(IceServerCallback callback) { - "application/json"); - - url_loader_ = network::SimpleURLLoader::Create(std::move(resource_request), -- kTrafficAnnotation); -+ i::kTrafficAnnotation); - url_loader_->DownloadToString( - url_loader_factory_.get(), - base::BindOnce(&IceConfigFetcher::OnIceServersResponse, -diff --git chrome/browser/ui/views/confirm_bubble_views.cc chrome/browser/ui/views/confirm_bubble_views.cc -index fb01319cb878..3a66aa3aaa72 100644 ---- chrome/browser/ui/views/confirm_bubble_views.cc -+++ chrome/browser/ui/views/confirm_bubble_views.cc -@@ -27,6 +27,7 @@ - - namespace { - -+namespace i { - std::unique_ptr CreateExtraView(views::ButtonListener* listener) { - auto help_button = CreateVectorImageButton(listener); - help_button->SetFocusForPlatform(); -@@ -34,6 +35,7 @@ std::unique_ptr CreateExtraView(views::ButtonListener* listener) { - SetImageFromVectorIcon(help_button.get(), vector_icons::kHelpOutlineIcon); - return help_button; - } -+} // namespace i - - } // namespace - -@@ -49,7 +51,7 @@ ConfirmBubbleViews::ConfirmBubbleViews( - &ConfirmBubbleModel::Accept, base::Unretained(model_.get()))); - DialogDelegate::set_cancel_callback(base::BindOnce( - &ConfirmBubbleModel::Cancel, base::Unretained(model_.get()))); -- help_button_ = DialogDelegate::SetExtraView(::CreateExtraView(this)); -+ help_button_ = DialogDelegate::SetExtraView(::i::CreateExtraView(this)); - - set_margins(ChromeLayoutProvider::Get()->GetDialogInsetsForContentType( - views::TEXT, views::TEXT)); -diff --git components/metrics/metrics_state_manager.cc components/metrics/metrics_state_manager.cc -index 26b3faa7deae..75ae68d0b0b3 100644 ---- components/metrics/metrics_state_manager.cc -+++ components/metrics/metrics_state_manager.cc -@@ -41,7 +41,9 @@ namespace { - // The argument used to generate a non-identifying entropy source. We want no - // more than 13 bits of entropy, so use this max to return a number in the range - // [0, 7999] as the entropy source (12.97 bits of entropy). -+namespace i { - const int kMaxLowEntropySize = 8000; -+} - - int64_t ReadEnabledDate(PrefService* local_state) { - return local_state->GetInt64(prefs::kMetricsReportingEnabledTimestamp); -@@ -298,7 +300,7 @@ std::unique_ptr - MetricsStateManager::CreateLowEntropyProvider() { - int source = GetLowEntropySource(); - return std::make_unique( -- base::checked_cast(source), kMaxLowEntropySize); -+ base::checked_cast(source), i::kMaxLowEntropySize); - } - - // static -diff --git content/browser/accessibility/accessibility_event_recorder_win.cc content/browser/accessibility/accessibility_event_recorder_win.cc -index f4fcad03c04c..99b769763511 100644 ---- content/browser/accessibility/accessibility_event_recorder_win.cc -+++ content/browser/accessibility/accessibility_event_recorder_win.cc -@@ -29,6 +29,7 @@ namespace content { - - namespace { - -+namespace i { - std::string RoleVariantToString(const base::win::ScopedVariant& role) { - if (role.type() == VT_I4) { - return base::UTF16ToUTF8(IAccessibleRoleToString(V_I4(role.ptr()))); -@@ -55,6 +56,7 @@ HRESULT QueryIAccessibleText(IAccessible* accessible, - accessible_text) - : hr; - } -+} // namespace i - - std::string BstrToPrettyUTF8(BSTR bstr) { - base::string16 str16(bstr, SysStringLen(bstr)); -@@ -291,7 +293,7 @@ void AccessibilityEventRecorderWin::OnWinEventHook(HWINEVENTHOOK handle, - - AccessibleStates ia2_state = 0; - Microsoft::WRL::ComPtr iaccessible2; -- hr = QueryIAccessible2(iaccessible.Get(), iaccessible2.GetAddressOf()); -+ hr = i::QueryIAccessible2(iaccessible.Get(), iaccessible2.GetAddressOf()); - bool has_ia2 = SUCCEEDED(hr) && iaccessible2; - - base::string16 html_tag; -@@ -332,7 +334,7 @@ void AccessibilityEventRecorderWin::OnWinEventHook(HWINEVENTHOOK handle, - base::StringPrintf(" class=%s", base::UTF16ToUTF8(obj_class).c_str()); - } - -- log += base::StringPrintf(" role=%s", RoleVariantToString(role).c_str()); -+ log += base::StringPrintf(" role=%s", i::RoleVariantToString(role).c_str()); - if (name_bstr.Length() > 0) - log += - base::StringPrintf(" name=\"%s\"", BstrToPrettyUTF8(name_bstr).c_str()); -@@ -367,7 +369,7 @@ void AccessibilityEventRecorderWin::OnWinEventHook(HWINEVENTHOOK handle, - // For TEXT_REMOVED and TEXT_INSERTED events, query the text that was - // inserted or removed and include that in the log. - Microsoft::WRL::ComPtr accessible_text; -- hr = QueryIAccessibleText(iaccessible.Get(), accessible_text.GetAddressOf()); -+ hr = i::QueryIAccessibleText(iaccessible.Get(), accessible_text.GetAddressOf()); - if (SUCCEEDED(hr)) { - if (event == IA2_EVENT_TEXT_REMOVED) { - IA2TextSegment old_text; -diff --git content/browser/devtools/protocol/storage_handler.cc content/browser/devtools/protocol/storage_handler.cc -index 0db088ae7917..d4567efbf0b9 100644 ---- content/browser/devtools/protocol/storage_handler.cc -+++ content/browser/devtools/protocol/storage_handler.cc -@@ -33,8 +33,10 @@ namespace content { - namespace protocol { - - using ClearCookiesCallback = Storage::Backend::ClearCookiesCallback; -+namespace i { - using GetCookiesCallback = Storage::Backend::GetCookiesCallback; - using SetCookiesCallback = Storage::Backend::SetCookiesCallback; -+} - - struct UsageListInitializer { - const char* type; -@@ -284,7 +286,7 @@ void StorageHandler::GetCookies(Maybe browser_context_id, - - storage_partition->GetCookieManagerForBrowserProcess()->GetAllCookies( - base::BindOnce( -- [](std::unique_ptr callback, -+ [](std::unique_ptr callback, - const std::vector& cookies) { - callback->sendSuccess(NetworkHandler::BuildCookieArray(cookies)); - }, -@@ -294,7 +296,7 @@ void StorageHandler::GetCookies(Maybe browser_context_id, - void StorageHandler::SetCookies( - std::unique_ptr> cookies, - Maybe browser_context_id, -- std::unique_ptr callback) { -+ std::unique_ptr callback) { - StoragePartition* storage_partition = nullptr; - Response response = StorageHandler::FindStoragePartition(browser_context_id, - &storage_partition); -@@ -306,7 +308,7 @@ void StorageHandler::SetCookies( - NetworkHandler::SetCookies( - storage_partition, std::move(cookies), - base::BindOnce( -- [](std::unique_ptr callback, bool success) { -+ [](std::unique_ptr callback, bool success) { - if (success) { - callback->sendSuccess(); - } else { -diff --git content/browser/media/capture/frame_sink_video_capture_device.cc content/browser/media/capture/frame_sink_video_capture_device.cc -index 2630aae48b16..475dc5572ef7 100644 ---- content/browser/media/capture/frame_sink_video_capture_device.cc -+++ content/browser/media/capture/frame_sink_video_capture_device.cc -@@ -53,11 +53,13 @@ class ScopedFrameDoneHelper - ~ScopedFrameDoneHelper() final = default; - }; - -+namespace i { - void BindWakeLockProvider( - mojo::PendingReceiver receiver) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - GetDeviceService().BindWakeLockProvider(std::move(receiver)); - } -+} - - } // namespace - -@@ -364,7 +366,7 @@ void FrameSinkVideoCaptureDevice::RequestWakeLock() { - mojo::Remote wake_lock_provider; - auto receiver = wake_lock_provider.BindNewPipeAndPassReceiver(); - base::PostTask(FROM_HERE, {BrowserThread::UI}, -- base::BindOnce(&BindWakeLockProvider, std::move(receiver))); -+ base::BindOnce(&i::BindWakeLockProvider, std::move(receiver))); - wake_lock_provider->GetWakeLockWithoutContext( - device::mojom::WakeLockType::kPreventDisplaySleep, - device::mojom::WakeLockReason::kOther, "screen capture", -diff --git content/browser/renderer_host/media/media_devices_manager.cc content/browser/renderer_host/media/media_devices_manager.cc -index f355780cbd83..b13c0b99a530 100644 ---- content/browser/renderer_host/media/media_devices_manager.cc -+++ content/browser/renderer_host/media/media_devices_manager.cc -@@ -60,6 +60,7 @@ struct { - // Frame rates for sources with no support for capability enumeration. - const uint16_t kFallbackVideoFrameRates[] = {30, 60}; - -+namespace i { - void SendLogMessage(const std::string& message) { - MediaStreamManager::SendMessageToNativeLog("MDM::" + message); - } -@@ -77,12 +78,13 @@ const char* DeviceTypeToString(blink::MediaDeviceType device_type) { - } - return "UNKNOWN"; - } -+} // namespace i - - std::string GetDevicesEnumeratedLogString( - blink::MediaDeviceType device_type, - const blink::WebMediaDeviceInfoArray& device_infos) { - std::string str = base::StringPrintf("DevicesEnumerated({type=%s}, ", -- DeviceTypeToString(device_type)); -+ i::DeviceTypeToString(device_type)); - base::StringAppendF(&str, "{labels=["); - for (const auto& device_info : device_infos) - base::StringAppendF(&str, "%s, ", device_info.label.c_str()); -@@ -391,7 +393,7 @@ MediaDevicesManager::MediaDevicesManager( - DCHECK(video_capture_manager_.get()); - DCHECK(!stop_removed_input_device_cb_.is_null()); - DCHECK(!ui_input_device_change_cb_.is_null()); -- SendLogMessage("MediaDevicesManager()"); -+ i::SendLogMessage("MediaDevicesManager()"); - cache_policies_.fill(CachePolicy::NO_CACHE); - has_seen_result_.fill(false); - } -@@ -433,7 +435,7 @@ void MediaDevicesManager::EnumerateDevices( - DCHECK(request_audio_input_capabilities && - requested_types[blink::MEDIA_DEVICE_TYPE_AUDIO_INPUT] || - !request_audio_input_capabilities); -- SendLogMessage(base::StringPrintf( -+ i::SendLogMessage(base::StringPrintf( - "EnumerateDevices({render_process_id=%d}, {render_frame_id=%d}, " - "{request_audio=%s}, {request_video=%s})", - render_process_id, render_frame_id, -@@ -514,7 +516,7 @@ void MediaDevicesManager::StartMonitoring() { - std::make_unique(); - } - #endif -- SendLogMessage("StartMonitoring()"); -+ i::SendLogMessage("StartMonitoring()"); - monitoring_started_ = true; - base::SystemMonitor::Get()->AddDevicesChangedObserver(this); - -@@ -547,7 +549,7 @@ void MediaDevicesManager::StopMonitoring() { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - if (!monitoring_started_) - return; -- SendLogMessage(base::StringPrintf("StopMonitoring([this=%p])", this)); -+ i::SendLogMessage(base::StringPrintf("StopMonitoring([this=%p])", this)); - base::SystemMonitor::Get()->RemoveDevicesChangedObserver(this); - audio_service_device_listener_.reset(); - monitoring_started_ = false; -@@ -857,8 +859,8 @@ void MediaDevicesManager::DoEnumerateDevices(blink::MediaDeviceType type) { - CacheInfo& cache_info = cache_infos_[type]; - if (cache_info.is_update_ongoing()) - return; -- SendLogMessage(base::StringPrintf("DoEnumerateDevices({type=%s})", -- DeviceTypeToString(type))); -+ i::SendLogMessage(base::StringPrintf("DoEnumerateDevices({type=%s})", -+ i::DeviceTypeToString(type))); - - cache_info.UpdateStarted(); - switch (type) { -@@ -928,7 +930,7 @@ void MediaDevicesManager::DevicesEnumerated( - UpdateSnapshot(type, snapshot); - cache_infos_[type].UpdateCompleted(); - has_seen_result_[type] = true; -- SendLogMessage(GetDevicesEnumeratedLogString(type, snapshot)); -+ i::SendLogMessage(GetDevicesEnumeratedLogString(type, snapshot)); - - if (cache_policies_[type] == CachePolicy::NO_CACHE) { - for (auto& request : requests_) -@@ -1047,8 +1049,8 @@ void MediaDevicesManager::HandleDevicesChanged(blink::MediaDeviceType type) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - DCHECK(IsValidMediaDeviceType(type)); - if (!cache_infos_[type].is_update_ongoing()) { -- SendLogMessage(base::StringPrintf("HandleDevicesChanged({type=%s}", -- DeviceTypeToString(type))); -+ i::SendLogMessage(base::StringPrintf("HandleDevicesChanged({type=%s}", -+ i::DeviceTypeToString(type))); - } - cache_infos_[type].InvalidateCache(); - DoEnumerateDevices(type); -@@ -1151,9 +1153,9 @@ void MediaDevicesManager::NotifyDeviceChange( - auto it = subscriptions_.find(subscription_id); - if (it == subscriptions_.end()) - return; -- SendLogMessage( -+ i::SendLogMessage( - base::StringPrintf("NotifyDeviceChange({subscription_id=%u}, {type=%s}", -- subscription_id, DeviceTypeToString(type))); -+ subscription_id, i::DeviceTypeToString(type))); - - const SubscriptionRequest& request = it->second; - request.listener_->OnDevicesChanged( -diff --git content/browser/service_worker/service_worker_registry.cc content/browser/service_worker/service_worker_registry.cc -index 7f3723d16532..b1baf98fe511 100644 ---- content/browser/service_worker/service_worker_registry.cc -+++ content/browser/service_worker/service_worker_registry.cc -@@ -18,9 +18,11 @@ namespace content { - - namespace { - -+namespace i { - void RunSoon(const base::Location& from_here, base::OnceClosure closure) { - base::ThreadTaskRunnerHandle::Get()->PostTask(from_here, std::move(closure)); - } -+} - - void CompleteFindNow(scoped_refptr registration, - blink::ServiceWorkerStatusCode status, -@@ -39,7 +41,7 @@ void CompleteFindSoon( - scoped_refptr registration, - blink::ServiceWorkerStatusCode status, - ServiceWorkerRegistry::FindRegistrationCallback callback) { -- RunSoon(from_here, base::BindOnce(&CompleteFindNow, std::move(registration), -+ i::RunSoon(from_here, base::BindOnce(&CompleteFindNow, std::move(registration), - status, std::move(callback))); - } - -@@ -116,7 +118,7 @@ void ServiceWorkerRegistry::FindRegistrationForScope( - const GURL& scope, - FindRegistrationCallback callback) { - if (storage()->IsDisabled()) { -- RunSoon( -+ i::RunSoon( - FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorAbort, nullptr)); -@@ -232,7 +234,7 @@ void ServiceWorkerRegistry::StoreRegistration( - DCHECK(version); - - if (storage()->IsDisabled()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorAbort)); - return; -@@ -265,7 +267,7 @@ void ServiceWorkerRegistry::StoreRegistration( - version->script_cache_map()->GetResources(&resources); - - if (resources.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; -@@ -289,7 +291,7 @@ void ServiceWorkerRegistry::DeleteRegistration( - const GURL& origin, - StatusCallback callback) { - if (storage()->IsDisabled()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorAbort)); - return; -@@ -353,14 +355,14 @@ void ServiceWorkerRegistry::GetUserData(int64_t registration_id, - GetUserDataCallback callback) { - if (registration_id == blink::mojom::kInvalidServiceWorkerRegistrationId || - keys.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), std::vector(), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; - } - for (const std::string& key : keys) { - if (key.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), std::vector(), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; -@@ -379,7 +381,7 @@ void ServiceWorkerRegistry::GetUserDataByKeyPrefix( - GetUserDataCallback callback) { - if (registration_id == blink::mojom::kInvalidServiceWorkerRegistrationId || - key_prefix.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), std::vector(), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; -@@ -397,7 +399,7 @@ void ServiceWorkerRegistry::GetUserKeysAndDataByKeyPrefix( - GetUserKeysAndDataCallback callback) { - if (registration_id == blink::mojom::kInvalidServiceWorkerRegistrationId || - key_prefix.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - base::flat_map(), - blink::ServiceWorkerStatusCode::kErrorFailed)); -@@ -417,14 +419,14 @@ void ServiceWorkerRegistry::StoreUserData( - StatusCallback callback) { - if (registration_id == blink::mojom::kInvalidServiceWorkerRegistrationId || - key_value_pairs.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; - } - for (const auto& kv : key_value_pairs) { - if (kv.first.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; -@@ -442,14 +444,14 @@ void ServiceWorkerRegistry::ClearUserData(int64_t registration_id, - StatusCallback callback) { - if (registration_id == blink::mojom::kInvalidServiceWorkerRegistrationId || - keys.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; - } - for (const std::string& key : keys) { - if (key.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; -@@ -468,14 +470,14 @@ void ServiceWorkerRegistry::ClearUserDataByKeyPrefixes( - StatusCallback callback) { - if (registration_id == blink::mojom::kInvalidServiceWorkerRegistrationId || - key_prefixes.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; - } - for (const std::string& key_prefix : key_prefixes) { - if (key_prefix.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; -@@ -492,7 +494,7 @@ void ServiceWorkerRegistry::ClearUserDataForAllRegistrationsByKeyPrefix( - const std::string& key_prefix, - StatusCallback callback) { - if (key_prefix.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - blink::ServiceWorkerStatusCode::kErrorFailed)); - return; -@@ -508,7 +510,7 @@ void ServiceWorkerRegistry::GetUserDataForAllRegistrations( - const std::string& key, - GetUserDataForAllRegistrationsCallback callback) { - if (key.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - std::vector>(), - blink::ServiceWorkerStatusCode::kErrorFailed)); -@@ -525,7 +527,7 @@ void ServiceWorkerRegistry::GetUserDataForAllRegistrationsByKeyPrefix( - const std::string& key_prefix, - GetUserDataForAllRegistrationsCallback callback) { - if (key_prefix.empty()) { -- RunSoon(FROM_HERE, -+ i::RunSoon(FROM_HERE, - base::BindOnce(std::move(callback), - std::vector>(), - blink::ServiceWorkerStatusCode::kErrorFailed)); -diff --git content/browser/web_package/web_bundle_blob_data_source.cc content/browser/web_package/web_bundle_blob_data_source.cc -index ee575969d8e8..1f11b02fb049 100644 ---- content/browser/web_package/web_bundle_blob_data_source.cc -+++ content/browser/web_package/web_bundle_blob_data_source.cc -@@ -23,6 +23,7 @@ - namespace content { - namespace { - -+namespace i { - class MojoBlobReaderDelegate : public storage::MojoBlobReader::Delegate { - public: - using CompletionCallback = base::OnceCallback; -@@ -43,6 +44,7 @@ class MojoBlobReaderDelegate : public storage::MojoBlobReader::Delegate { - CompletionCallback completion_callback_; - DISALLOW_COPY_AND_ASSIGN(MojoBlobReaderDelegate); - }; -+} // namespace i - - void OnReadComplete( - data_decoder::mojom::BundleDataSource::ReadCallback callback, -@@ -364,7 +366,7 @@ void WebBundleBlobDataSource::BlobDataSourceCore::OnBlobReadyForReadToDataPipe( - } - storage::MojoBlobReader::Create( - blob_.get(), net::HttpByteRange::Bounded(offset, offset + length - 1), -- std::make_unique(std::move(callback)), -+ std::make_unique(std::move(callback)), - std::move(producer_handle)); - } - -diff --git gpu/command_buffer/service/shared_image_backing_d3d.cc gpu/command_buffer/service/shared_image_backing_d3d.cc -index 73533fba5b15..42859c57dcd7 100644 ---- gpu/command_buffer/service/shared_image_backing_d3d.cc -+++ gpu/command_buffer/service/shared_image_backing_d3d.cc -@@ -15,6 +15,7 @@ namespace gpu { - - namespace { - -+namespace i { - class ScopedRestoreTexture2D { - public: - explicit ScopedRestoreTexture2D(gl::GLApi* api) : api_(api) { -@@ -32,6 +33,7 @@ class ScopedRestoreTexture2D { - GLuint prev_binding_ = 0; - DISALLOW_COPY_AND_ASSIGN(ScopedRestoreTexture2D); - }; -+} // namespace i - - } // anonymous namespace - -@@ -207,7 +209,7 @@ bool SharedImageBackingD3D::PresentSwapChain() { - } - - gl::GLApi* const api = gl::g_current_gl_context; -- ScopedRestoreTexture2D scoped_restore(api); -+ i::ScopedRestoreTexture2D scoped_restore(api); - - const GLenum target = GL_TEXTURE_2D; - const GLuint service_id = -diff --git media/muxers/webm_muxer.h media/muxers/webm_muxer.h -index 0d9b8c6de789..d78badac69b2 100644 ---- media/muxers/webm_muxer.h -+++ media/muxers/webm_muxer.h -@@ -13,6 +13,7 @@ - #include "base/containers/circular_deque.h" - #include "base/macros.h" - #include "base/numerics/safe_math.h" -+#include "base/optional.h" - #include "base/strings/string_piece.h" - #include "base/threading/thread_checker.h" - #include "base/time/time.h" -diff --git services/network/public/cpp/cert_verifier/nss_ocsp_session_url_loader.cc services/network/public/cpp/cert_verifier/nss_ocsp_session_url_loader.cc -index 0a95dacbfba4..a120f442770c 100644 ---- services/network/public/cpp/cert_verifier/nss_ocsp_session_url_loader.cc -+++ services/network/public/cpp/cert_verifier/nss_ocsp_session_url_loader.cc -@@ -22,9 +22,11 @@ namespace { - // URL. - const int kMaxResponseSizeInBytes = 5 * 1024 * 1024; - -+namespace i { - bool CanFetchUrl(const GURL& url) { - return url.SchemeIs("http"); - } -+} // namespace i - - } // namespace - -@@ -63,7 +65,7 @@ void OCSPRequestSessionDelegateURLLoader::StartLoad( - const net::OCSPRequestSessionParams* params) { - DCHECK(load_task_runner_->RunsTasksInCurrentSequence()); - -- if (!CanFetchUrl(params->url) || !delegate_factory_) { -+ if (!i::CanFetchUrl(params->url) || !delegate_factory_) { - CancelLoad(); - return; - } -@@ -142,7 +144,7 @@ void OCSPRequestSessionDelegateURLLoader::OnReceivedRedirect( - std::vector* removed_headers) { - DCHECK(load_task_runner_->RunsTasksInCurrentSequence()); - -- if (!CanFetchUrl(redirect_info.new_url)) { -+ if (!i::CanFetchUrl(redirect_info.new_url)) { - CancelLoad(); // May delete |this| - } - } -diff --git storage/browser/quota/quota_settings.cc storage/browser/quota/quota_settings.cc -index b2210b55b40f..668246e5f363 100644 ---- storage/browser/quota/quota_settings.cc -+++ storage/browser/quota/quota_settings.cc -@@ -21,7 +21,9 @@ namespace storage { - - namespace { - -+namespace i { - const int64_t kMBytes = 1024 * 1024; -+} - const int kRandomizedPercentage = 10; - - // Skews |value| by +/- |percent|. -@@ -35,7 +37,7 @@ storage::QuotaSettings CalculateIncognitoDynamicSettings( - // The incognito pool size is a fraction of the amount of system memory, - // and the amount is capped to a hard limit. - double incognito_pool_size_ratio = 0.1; // 10% -- int64_t max_incognito_pool_size = 300 * kMBytes; -+ int64_t max_incognito_pool_size = 300 * i::kMBytes; - if (base::FeatureList::IsEnabled(features::kIncognitoDynamicQuota)) { - const double lower_bound = features::kIncognitoQuotaRatioLowerBound.Get(); - const double upper_bound = features::kIncognitoQuotaRatioUpperBound.Get(); -@@ -89,7 +91,7 @@ base::Optional CalculateNominalDynamicSettings( - // * 64GB storage -- min(6GB,2GB) = 2GB - // * 16GB storage -- min(1.6GB,2GB) = 1.6GB - // * 8GB storage -- min(800MB,2GB) = 800MB -- const int64_t kShouldRemainAvailableFixed = 2048 * kMBytes; // 2GB -+ const int64_t kShouldRemainAvailableFixed = 2048 * i::kMBytes; // 2GB - const double kShouldRemainAvailableRatio = 0.1; // 10% - - // The amount of the device's storage the browser attempts to -@@ -104,7 +106,7 @@ base::Optional CalculateNominalDynamicSettings( - // * 64GB storage -- min(640MB,1GB) = 640MB - // * 16GB storage -- min(160MB,1GB) = 160MB - // * 8GB storage -- min(80MB,1GB) = 80MB -- const int64_t kMustRemainAvailableFixed = 1024 * kMBytes; // 1GB -+ const int64_t kMustRemainAvailableFixed = 1024 * i::kMBytes; // 1GB - const double kMustRemainAvailableRatio = 0.01; // 1% - - // The fraction of the temporary pool that can be utilized by a single host. -@@ -116,7 +118,7 @@ base::Optional CalculateNominalDynamicSettings( - // SessionOnly (or ephemeral) origins are allotted a fraction of what - // normal origins are provided, and the amount is capped to a hard limit. - const double kSessionOnlyHostQuotaRatio = 0.1; // 10% -- const int64_t kMaxSessionOnlyHostQuota = 300 * kMBytes; -+ const int64_t kMaxSessionOnlyHostQuota = 300 * i::kMBytes; - - storage::QuotaSettings settings; - -diff --git third_party/blink/renderer/core/animation/css_transform_interpolation_type.cc third_party/blink/renderer/core/animation/css_transform_interpolation_type.cc -index 25afc795a40f..202e40badb96 100644 ---- third_party/blink/renderer/core/animation/css_transform_interpolation_type.cc -+++ third_party/blink/renderer/core/animation/css_transform_interpolation_type.cc -@@ -45,6 +45,7 @@ class InheritedTransformChecker - const TransformOperations inherited_transform_; - }; - -+namespace i { - class AlwaysInvalidateChecker - : public CSSInterpolationType::CSSConversionChecker { - public: -@@ -53,6 +54,8 @@ class AlwaysInvalidateChecker - return false; - } - }; -+} // namespace i -+ - } // namespace - - InterpolationValue CSSTransformInterpolationType::MaybeConvertNeutral( -@@ -124,7 +127,7 @@ CSSTransformInterpolationType::PreInterpolationCompositeIfNeeded( - // to disable that caching in this case. - // TODO(crbug.com/1009230): Remove this once our interpolation code isn't - // caching composited values. -- conversion_checkers.push_back(std::make_unique()); -+ conversion_checkers.push_back(std::make_unique()); - - InterpolableTransformList& transform_list = - To(*value.interpolable_value); -diff --git third_party/blink/renderer/core/layout/ng/ng_absolute_utils.cc third_party/blink/renderer/core/layout/ng/ng_absolute_utils.cc -index a8595ea2ff08..043350e75692 100644 ---- third_party/blink/renderer/core/layout/ng/ng_absolute_utils.cc -+++ third_party/blink/renderer/core/layout/ng/ng_absolute_utils.cc -@@ -57,55 +57,57 @@ bool IsTopDominant(const WritingMode container_writing_mode, - - // A direction agnostic version of |NGLogicalStaticPosition::InlineEdge|, and - // |NGLogicalStaticPosition::BlockEdge|. -+namespace i { - enum StaticPositionEdge { kStart, kCenter, kEnd }; -+} - --inline StaticPositionEdge GetStaticPositionEdge( -+inline i::StaticPositionEdge GetStaticPositionEdge( - NGLogicalStaticPosition::InlineEdge inline_edge) { - switch (inline_edge) { - case NGLogicalStaticPosition::InlineEdge::kInlineStart: -- return kStart; -+ return i::kStart; - case NGLogicalStaticPosition::InlineEdge::kInlineCenter: -- return kCenter; -+ return i::kCenter; - case NGLogicalStaticPosition::InlineEdge::kInlineEnd: -- return kEnd; -+ return i::kEnd; - } - } - --inline StaticPositionEdge GetStaticPositionEdge( -+inline i::StaticPositionEdge GetStaticPositionEdge( - NGLogicalStaticPosition::BlockEdge block_edge) { - switch (block_edge) { - case NGLogicalStaticPosition::BlockEdge::kBlockStart: -- return kStart; -+ return i::kStart; - case NGLogicalStaticPosition::BlockEdge::kBlockCenter: -- return kCenter; -+ return i::kCenter; - case NGLogicalStaticPosition::BlockEdge::kBlockEnd: -- return kEnd; -+ return i::kEnd; - } - } - --inline LayoutUnit StaticPositionStartInset(StaticPositionEdge edge, -+inline LayoutUnit StaticPositionStartInset(i::StaticPositionEdge edge, - LayoutUnit static_position_offset, - LayoutUnit size) { - switch (edge) { -- case kStart: -+ case i::kStart: - return static_position_offset; -- case kCenter: -+ case i::kCenter: - return static_position_offset - (size / 2); -- case kEnd: -+ case i::kEnd: - return static_position_offset - size; - } - } - --inline LayoutUnit StaticPositionEndInset(StaticPositionEdge edge, -+inline LayoutUnit StaticPositionEndInset(i::StaticPositionEdge edge, - LayoutUnit static_position_offset, - LayoutUnit available_size, - LayoutUnit size) { - switch (edge) { -- case kStart: -+ case i::kStart: - return available_size - static_position_offset - size; -- case kCenter: -+ case i::kCenter: - return available_size - static_position_offset - (size / 2); -- case kEnd: -+ case i::kEnd: - return available_size - static_position_offset; - } - } -@@ -136,7 +138,7 @@ void ComputeAbsoluteSize(const LayoutUnit border_padding_size, - const LayoutUnit min_size, - const LayoutUnit max_size, - const LayoutUnit static_position_offset, -- StaticPositionEdge static_position_edge, -+ i::StaticPositionEdge static_position_edge, - bool is_start_dominant, - bool is_block_direction, - base::Optional size, -@@ -178,13 +180,13 @@ void ComputeAbsoluteSize(const LayoutUnit border_padding_size, - - LayoutUnit computed_available_size; - switch (static_position_edge) { -- case kStart: -+ case i::kStart: - // The available-size for the start static-position "grows" towards the - // end edge. - // | *----------->| - computed_available_size = available_size - static_position_offset; - break; -- case kCenter: -+ case i::kCenter: - // The available-size for the center static-position "grows" towards - // both edges (equally), and stops when it hits the first one. - // |<-----*----> | -@@ -192,7 +194,7 @@ void ComputeAbsoluteSize(const LayoutUnit border_padding_size, - 2 * std::min(static_position_offset, - available_size - static_position_offset); - break; -- case kEnd: -+ case i::kEnd: - // The available-size for the end static-position "grows" towards the - // start edge. - // |<-----* | -diff --git third_party/blink/renderer/modules/mediastream/input_device_info.cc third_party/blink/renderer/modules/mediastream/input_device_info.cc -index 9ec87eb44495..74259742e417 100644 ---- third_party/blink/renderer/modules/mediastream/input_device_info.cc -+++ third_party/blink/renderer/modules/mediastream/input_device_info.cc -@@ -23,6 +23,7 @@ namespace { - - // TODO(c.padhi): Merge this method with ToWebFacingMode() in - // media_stream_constraints_util_video_device.h, see https://crbug.com/821668. -+namespace i { - WebMediaStreamTrack::FacingMode ToWebFacingMode( - media::VideoFacingMode facing_mode) { - switch (facing_mode) { -@@ -37,6 +38,7 @@ WebMediaStreamTrack::FacingMode ToWebFacingMode( - return WebMediaStreamTrack::FacingMode::kNone; - } - } -+} // namespace i - - } // namespace - -@@ -53,7 +55,7 @@ void InputDeviceInfo::SetVideoInputCapabilities( - // ComputeCapabilitiesForVideoSource() in media_stream_constraints_util.h, see - // https://crbug.com/821668. - platform_capabilities_.facing_mode = -- ToWebFacingMode(video_input_capabilities->facing_mode); -+ i::ToWebFacingMode(video_input_capabilities->facing_mode); - if (!video_input_capabilities->formats.IsEmpty()) { - int max_width = 1; - int max_height = 1; -diff --git third_party/blink/renderer/modules/mediastream/processed_local_audio_source.cc third_party/blink/renderer/modules/mediastream/processed_local_audio_source.cc -index 060674f1e823..80ef06e6fbfb 100644 ---- third_party/blink/renderer/modules/mediastream/processed_local_audio_source.cc -+++ third_party/blink/renderer/modules/mediastream/processed_local_audio_source.cc -@@ -38,9 +38,11 @@ using EchoCancellationType = - - namespace { - -+namespace k { - void SendLogMessage(const std::string& message) { - blink::WebRtcLogMessage("PLAS::" + message); - } -+} - - // Used as an identifier for ProcessedLocalAudioSource::From(). - void* const kProcessedLocalAudioSourceIdentifier = -@@ -114,7 +116,7 @@ ProcessedLocalAudioSource::ProcessedLocalAudioSource( - volume_(0), - allow_invalid_render_frame_id_for_testing_(false) { - SetDevice(device); -- SendLogMessage( -+ k::SendLogMessage( - base::StringPrintf("ProcessedLocalAudioSource({session_id=%s})", - device.session_id().ToString().c_str())); - } -@@ -135,7 +137,7 @@ ProcessedLocalAudioSource* ProcessedLocalAudioSource::From( - - void ProcessedLocalAudioSource::SendLogMessageWithSessionId( - const std::string& message) const { -- SendLogMessage(message + " [session_id=" + device().session_id().ToString() + -+ k::SendLogMessage(message + " [session_id=" + device().session_id().ToString() + - "]"); - } - -@@ -163,7 +165,7 @@ bool ProcessedLocalAudioSource::EnsureSourceIsStarted() { - return false; - } - -- SendLogMessage(GetEnsureSourceIsStartedLogString(device())); -+ k::SendLogMessage(GetEnsureSourceIsStartedLogString(device())); - SendLogMessageWithSessionId(base::StringPrintf( - "EnsureSourceIsStarted() => (audio_processing_properties=[%s])", - GetAudioProcesingPropertiesLogString(audio_processing_properties_) -@@ -240,7 +242,7 @@ bool ProcessedLocalAudioSource::EnsureSourceIsStarted() { - channel_layout != media::CHANNEL_LAYOUT_STEREO && - channel_layout != media::CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC && - channel_layout != media::CHANNEL_LAYOUT_DISCRETE) { -- SendLogMessage( -+ k::SendLogMessage( - base::StringPrintf("EnsureSourceIsStarted() => (ERROR: " - "input channel layout (%d) is not supported.", - static_cast(channel_layout))); -diff --git third_party/blink/renderer/modules/mediastream/user_media_processor.cc third_party/blink/renderer/modules/mediastream/user_media_processor.cc -index 19292a2b3279..d734b2df93c6 100644 ---- third_party/blink/renderer/modules/mediastream/user_media_processor.cc -+++ third_party/blink/renderer/modules/mediastream/user_media_processor.cc -@@ -122,9 +122,11 @@ const char* MediaStreamRequestResultToString(MediaStreamRequestResult value) { - return "INVALID"; - } - -+namespace l { - void SendLogMessage(const std::string& message) { - blink::WebRtcLogMessage("UMP::" + message); - } -+} - - std::string GetTrackLogString(const blink::WebMediaStreamTrack& track, - bool is_pending) { -@@ -494,10 +496,10 @@ void UserMediaProcessor::RequestInfo::StartAudioTrack( - #if DCHECK_IS_ON() - DCHECK(audio_capture_settings_.HasValue()); - #endif -- SendLogMessage(GetTrackLogString(track, is_pending)); -+ l::SendLogMessage(GetTrackLogString(track, is_pending)); - blink::MediaStreamAudioSource* native_source = - blink::MediaStreamAudioSource::From(track.Source()); -- SendLogMessage(GetTrackSourceLogString(native_source)); -+ l::SendLogMessage(GetTrackSourceLogString(native_source)); - // Add the source as pending since OnTrackStarted will expect it to be there. - sources_waiting_for_callback_.push_back(native_source); - -@@ -518,7 +520,7 @@ UserMediaProcessor::RequestInfo::CreateAndStartVideoTrack( - DCHECK(source.GetType() == blink::WebMediaStreamSource::kTypeVideo); - DCHECK(web_request().Video()); - DCHECK(video_capture_settings_.HasValue()); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "UMP::RI::CreateAndStartVideoTrack({request_id=%d})", request_id())); - - blink::MediaStreamVideoSource* native_source = -@@ -546,7 +548,7 @@ void UserMediaProcessor::RequestInfo::OnTrackStarted( - blink::WebPlatformMediaStreamSource* source, - MediaStreamRequestResult result, - const blink::WebString& result_name) { -- SendLogMessage(GetOnTrackStartedLogString(request_id(), source, result)); -+ l::SendLogMessage(GetOnTrackStartedLogString(request_id(), source, result)); - auto** it = std::find(sources_waiting_for_callback_.begin(), - sources_waiting_for_callback_.end(), source); - DCHECK(it != sources_waiting_for_callback_.end()); -@@ -605,7 +607,7 @@ void UserMediaProcessor::ProcessRequest( - DCHECK(!current_request_info_); - request_completed_cb_ = std::move(callback); - current_request_info_ = MakeGarbageCollected(std::move(request)); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "ProcessRequest({request_id=%d}, {audio=%d}, " - "{video=%d})", - current_request_info_->request_id(), -@@ -623,7 +625,7 @@ void UserMediaProcessor::SetupAudioInput() { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK(current_request_info_); - DCHECK(current_request_info_->web_request().Audio()); -- SendLogMessage( -+ l::SendLogMessage( - base::StringPrintf("SetupAudioInput({request_id=%d}, {constraints=%s})", - current_request_info_->request_id(), - current_request_info_->request() -@@ -643,7 +645,7 @@ void UserMediaProcessor::SetupAudioInput() { - } - - if (blink::IsDeviceMediaType(audio_controls.stream_type)) { -- SendLogMessage( -+ l::SendLogMessage( - base::StringPrintf("SetupAudioInput({request_id=%d}) => " - "(Requesting device capabilities)", - current_request_info_->request_id())); -@@ -712,7 +714,7 @@ void UserMediaProcessor::SelectAudioSettings( - return; - - DCHECK(current_request_info_->stream_controls()->audio.requested); -- SendLogMessage(base::StringPrintf("SelectAudioSettings({request_id=%d})", -+ l::SendLogMessage(base::StringPrintf("SelectAudioSettings({request_id=%d})", - current_request_info_->request_id())); - auto settings = SelectSettingsAudioCapture( - capabilities, web_request.AudioConstraints(), -@@ -790,7 +792,7 @@ void UserMediaProcessor::SetupVideoInput() { - : StreamSelectionStrategy::FORCE_NEW_STREAM); - return; - } -- SendLogMessage( -+ l::SendLogMessage( - base::StringPrintf("SetupVideoInput. request_id=%d, video constraints=%s", - current_request_info_->request_id(), - current_request_info_->request() -@@ -836,7 +838,7 @@ void UserMediaProcessor::SelectVideoDeviceSettings( - DCHECK(current_request_info_->stream_controls()->video.requested); - DCHECK(blink::IsDeviceMediaType( - current_request_info_->stream_controls()->video.stream_type)); -- SendLogMessage(base::StringPrintf("SelectVideoDeviceSettings. request_id=%d.", -+ l::SendLogMessage(base::StringPrintf("SelectVideoDeviceSettings. request_id=%d.", - current_request_info_->request_id())); - - blink::VideoDeviceCaptureCapabilities capabilities; -@@ -879,7 +881,7 @@ void UserMediaProcessor::SelectVideoDeviceSettings( - void UserMediaProcessor::SelectVideoContentSettings() { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK(current_request_info_); -- SendLogMessage( -+ l::SendLogMessage( - base::StringPrintf("SelectVideoContentSettings. request_id=%d.", - current_request_info_->request_id())); - gfx::Size screen_size = GetScreenSize(); -@@ -912,7 +914,7 @@ void UserMediaProcessor::GenerateStreamForCurrentRequestInfo( - blink::mojom::StreamSelectionStrategy strategy) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK(current_request_info_); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "GenerateStreamForCurrentRequestInfo({request_id=%d}, " - "{audio.device_id=%s}, {video.device_id=%s})", - current_request_info_->request_id(), -@@ -965,7 +967,7 @@ void UserMediaProcessor::OnStreamGenerated( - if (!IsCurrentRequestInfo(request_id)) { - // This can happen if the request is canceled or the frame reloads while - // MediaStreamDispatcherHost is processing the request. -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "OnStreamGenerated([request_id=%d]) => (ERROR: invalid request ID)", - request_id)); - OnStreamGeneratedForCancelledRequest(audio_devices, video_devices); -@@ -976,7 +978,7 @@ void UserMediaProcessor::OnStreamGenerated( - - for (const auto* devices : {&audio_devices, &video_devices}) { - for (const auto& device : *devices) { -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "OnStreamGenerated({request_id=%d}, {label=%s}, {device=[id: %s, " - "name: " - "%s]})", -@@ -1007,7 +1009,7 @@ void UserMediaProcessor::OnStreamGenerated( - } - - for (const auto& video_device : video_devices) { -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "OnStreamGenerated({request_id=%d}, {label=%s}, {device=[id: %s, " - "name: %s]}) => (Requesting video device formats)", - request_id, label.Utf8().c_str(), video_device.id.c_str(), -@@ -1044,7 +1046,7 @@ void UserMediaProcessor::GotAllVideoInputFormatsForDevice( - if (!IsCurrentRequestInfo(web_request)) - return; - -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "GotAllVideoInputFormatsForDevice({request_id=%d}, " - "{label=%s}, {device=[id: %s]}, {success=%d})", - current_request_info_->request_id(), label.Utf8().c_str(), -@@ -1081,7 +1083,7 @@ gfx::Size UserMediaProcessor::GetScreenSize() { - void UserMediaProcessor::OnStreamGeneratedForCancelledRequest( - const Vector& audio_devices, - const Vector& video_devices) { -- SendLogMessage("OnStreamGeneratedForCancelledRequest()"); -+ l::SendLogMessage("OnStreamGeneratedForCancelledRequest()"); - // Only stop the device if the device is not used in another MediaStream. - for (auto* it = audio_devices.begin(); it != audio_devices.end(); ++it) { - if (!FindLocalSource(*it)) { -@@ -1155,7 +1157,7 @@ void UserMediaProcessor::OnStreamGenerationFailed( - // MediaStreamDispatcherHost is processing the request. - return; - } -- SendLogMessage(base::StringPrintf("OnStreamGenerationFailed({request_id=%d})", -+ l::SendLogMessage(base::StringPrintf("OnStreamGenerationFailed({request_id=%d})", - current_request_info_->request_id())); - - GetUserMediaRequestFailed(result); -@@ -1164,7 +1166,7 @@ void UserMediaProcessor::OnStreamGenerationFailed( - - void UserMediaProcessor::OnDeviceStopped(const MediaStreamDevice& device) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "OnDeviceStopped({session_id=%s}, {device_id=%s})", - device.session_id().ToString().c_str(), device.id.c_str())); - -@@ -1227,7 +1229,7 @@ blink::WebMediaStreamSource UserMediaProcessor::InitializeVideoSourceObject( - const MediaStreamDevice& device) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK(current_request_info_); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "UMP::InitializeVideoSourceObject({request_id=%d}, {device=[id: %s, " - "name: %s]})", - current_request_info_->request_id(), device.id.c_str(), -@@ -1255,7 +1257,7 @@ blink::WebMediaStreamSource UserMediaProcessor::InitializeAudioSourceObject( - bool* is_pending) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK(current_request_info_); -- SendLogMessage( -+ l::SendLogMessage( - base::StringPrintf("InitializeAudioSourceObject({session_id=%s})", - device.session_id().ToString().c_str())); - -@@ -1398,7 +1400,7 @@ UserMediaProcessor::CreateVideoSource( - - void UserMediaProcessor::StartTracks(const String& label) { - DCHECK(!current_request_info_->web_request().IsNull()); -- SendLogMessage(base::StringPrintf("StartTracks({request_id=%d}, {label=%s})", -+ l::SendLogMessage(base::StringPrintf("StartTracks({request_id=%d}, {label=%s})", - current_request_info_->request_id(), - label.Utf8().c_str())); - if (auto* media_stream_device_observer = GetMediaStreamDeviceObserver()) { -@@ -1438,7 +1440,7 @@ void UserMediaProcessor::CreateVideoTracks( - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK(current_request_info_); - DCHECK_EQ(devices.size(), webkit_tracks->size()); -- SendLogMessage(base::StringPrintf("UMP::CreateVideoTracks({request_id=%d})", -+ l::SendLogMessage(base::StringPrintf("UMP::CreateVideoTracks({request_id=%d})", - current_request_info_->request_id())); - - for (WTF::wtf_size_t i = 0; i < devices.size(); ++i) { -@@ -1461,7 +1463,7 @@ void UserMediaProcessor::CreateAudioTracks( - current_request_info_->audio_capture_settings().HasValue() && - current_request_info_->audio_capture_settings() - .render_to_associated_sink(); -- SendLogMessage( -+ l::SendLogMessage( - base::StringPrintf("CreateAudioTracks({render_to_associated_sink=%d})", - render_to_associated_sink)); - if (!render_to_associated_sink) { -@@ -1491,7 +1493,7 @@ void UserMediaProcessor::OnCreateNativeTracksCompleted( - MediaStreamRequestResult result, - const String& constraint_name) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "UMP::OnCreateNativeTracksCompleted({request_id = %d}, {label=%s})", - request_info->request_id(), label.Utf8().c_str())); - if (result == MediaStreamRequestResult::OK) { -@@ -1524,7 +1526,7 @@ void UserMediaProcessor::GetUserMediaRequestSucceeded( - blink::WebUserMediaRequest web_request) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK(IsCurrentRequestInfo(web_request)); -- SendLogMessage( -+ l::SendLogMessage( - base::StringPrintf("GetUserMediaRequestSucceeded({request_id=%d})", - current_request_info_->request_id())); - -@@ -1544,7 +1546,7 @@ void UserMediaProcessor::DelayedGetUserMediaRequestSucceeded( - const blink::WebMediaStream& stream, - blink::WebUserMediaRequest web_request) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "DelayedGetUserMediaRequestSucceeded({request_id=%d}, {result=%s})", - request_id, - MediaStreamRequestResultToString(MediaStreamRequestResult::OK))); -@@ -1558,7 +1560,7 @@ void UserMediaProcessor::GetUserMediaRequestFailed( - const String& constraint_name) { - DCHECK(current_request_info_); - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage( -+ l::SendLogMessage( - base::StringPrintf("GetUserMediaRequestFailed({request_id=%d})", - current_request_info_->request_id())); - -@@ -1580,7 +1582,7 @@ void UserMediaProcessor::DelayedGetUserMediaRequestFailed( - const String& constraint_name) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - blink::LogUserMediaRequestResult(result); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "DelayedGetUserMediaRequestFailed({request_id=%d}, {result=%s})", - request_id, MediaStreamRequestResultToString(result))); - DeleteWebRequest(web_request); -@@ -1700,7 +1702,7 @@ blink::WebMediaStreamSource UserMediaProcessor::FindOrInitializeSourceObject( - bool UserMediaProcessor::RemoveLocalSource( - const blink::WebMediaStreamSource& source) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "RemoveLocalSource({id=%s}, {name=%s}, {group_id=%s})", - source.Id().Utf8().c_str(), source.GetName().Utf8().c_str(), - source.GroupId().Utf8().c_str())); -@@ -1797,7 +1799,7 @@ void UserMediaProcessor::OnLocalSourceStopped( - const blink::WebMediaStreamSource& source) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - blink::WebPlatformMediaStreamSource* source_impl = source.GetPlatformSource(); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "OnLocalSourceStopped({session_id=%s})", - source_impl->device().session_id().ToString().c_str())); - -@@ -1816,7 +1818,7 @@ void UserMediaProcessor::StopLocalSource( - const blink::WebMediaStreamSource& source, - bool notify_dispatcher) { - blink::WebPlatformMediaStreamSource* source_impl = source.GetPlatformSource(); -- SendLogMessage(base::StringPrintf( -+ l::SendLogMessage(base::StringPrintf( - "StopLocalSource({session_id=%s})", - source_impl->device().session_id().ToString().c_str())); - -diff --git third_party/blink/renderer/modules/peerconnection/BUILD.gn third_party/blink/renderer/modules/peerconnection/BUILD.gn -index 467410d76984..2cdb84e6bdae 100644 ---- third_party/blink/renderer/modules/peerconnection/BUILD.gn -+++ third_party/blink/renderer/modules/peerconnection/BUILD.gn -@@ -5,6 +5,7 @@ - import("//third_party/blink/renderer/modules/modules.gni") - - blink_modules_sources("peerconnection") { -+ never_build_jumbo = true - sources = [ - "adapters/dtls_transport_proxy.cc", - "adapters/dtls_transport_proxy.h", -diff --git third_party/blink/renderer/modules/xr/xr_hit_test_source.cc third_party/blink/renderer/modules/xr/xr_hit_test_source.cc -index a7903d985d0b..e3bcef51a01e 100644 ---- third_party/blink/renderer/modules/xr/xr_hit_test_source.cc -+++ third_party/blink/renderer/modules/xr/xr_hit_test_source.cc -@@ -10,10 +10,12 @@ - #include "third_party/blink/renderer/platform/bindings/exception_state.h" - - namespace { -+namespace i { - const char kCannotCancelHitTestSource[] = - "Hit test source could not be canceled! Ensure that it was not already " - "canceled."; - } -+} - - namespace blink { - -@@ -27,7 +29,7 @@ uint64_t XRHitTestSource::id() const { - void XRHitTestSource::cancel(ExceptionState& exception_state) { - if (!xr_session_->RemoveHitTestSource(this)) { - exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, -- kCannotCancelHitTestSource); -+ i::kCannotCancelHitTestSource); - } - } - -diff --git third_party/blink/renderer/platform/audio/audio_delay_dsp_kernel.cc third_party/blink/renderer/platform/audio/audio_delay_dsp_kernel.cc -index 3e2f1a5a3fad..613745b93595 100644 ---- third_party/blink/renderer/platform/audio/audio_delay_dsp_kernel.cc -+++ third_party/blink/renderer/platform/audio/audio_delay_dsp_kernel.cc -@@ -32,7 +32,9 @@ - namespace blink { - - // Delay nodes have a max allowed delay time of this many seconds. -+namespace i { - const float kMaxDelayTimeSeconds = 30; -+} - - AudioDelayDSPKernel::AudioDelayDSPKernel(AudioDSPKernelProcessor* processor, - size_t processing_size_in_frames) -@@ -46,7 +48,7 @@ AudioDelayDSPKernel::AudioDelayDSPKernel(double max_delay_time, - max_delay_time_(max_delay_time), - write_index_(0) { - DCHECK_GT(max_delay_time_, 0.0); -- DCHECK_LE(max_delay_time_, kMaxDelayTimeSeconds); -+ DCHECK_LE(max_delay_time_, i::kMaxDelayTimeSeconds); - DCHECK(std::isfinite(max_delay_time_)); - - size_t buffer_length = BufferLengthForDelay(max_delay_time, sample_rate); -diff --git third_party/blink/renderer/platform/exported/web_cursor_info.cc third_party/blink/renderer/platform/exported/web_cursor_info.cc -index 21c245ecef6e..851861b0e7fd 100644 ---- third_party/blink/renderer/platform/exported/web_cursor_info.cc -+++ third_party/blink/renderer/platform/exported/web_cursor_info.cc -@@ -42,7 +42,7 @@ static SkBitmap GetCursorBitmap(const Cursor& cursor) { - - WebCursorInfo::WebCursorInfo(const Cursor& cursor) - : type(static_cast(cursor.GetType())), -- hot_spot(cursor.HotSpot()), -+ hot_spot(cursor.HotSpot().X(), cursor.HotSpot().Y()), - image_scale_factor(cursor.ImageScaleFactor()), - custom_image(GetCursorBitmap(cursor)) {} - -diff --git third_party/blink/renderer/platform/fonts/font_matching_metrics.cc third_party/blink/renderer/platform/fonts/font_matching_metrics.cc -index a9a0511de039..0d3db36ad37f 100644 ---- third_party/blink/renderer/platform/fonts/font_matching_metrics.cc -+++ third_party/blink/renderer/platform/fonts/font_matching_metrics.cc -@@ -14,6 +14,7 @@ constexpr double kUkmFontLoadCountBucketSpacing = 1.3; - - enum FontLoadContext { kTopLevel = 0, kSubFrame }; - -+namespace i { - template - HashSet Intersection(const HashSet& a, const HashSet& b) { - HashSet result; -@@ -23,6 +24,7 @@ HashSet Intersection(const HashSet& a, const HashSet& b) { - } - return result; - } -+} // namespace i - - } // namespace - -@@ -74,16 +76,16 @@ void FontMatchingMetrics::PublishUkmMetrics() { - ukm::builders::FontMatchAttempts(source_id_) - .SetLoadContext(top_level_ ? kTopLevel : kSubFrame) - .SetSystemFontFamilySuccesses(ukm::GetExponentialBucketMin( -- Intersection(successful_font_families_, system_font_families_).size(), -+ i::Intersection(successful_font_families_, system_font_families_).size(), - kUkmFontLoadCountBucketSpacing)) - .SetSystemFontFamilyFailures(ukm::GetExponentialBucketMin( -- Intersection(failed_font_families_, system_font_families_).size(), -+ i::Intersection(failed_font_families_, system_font_families_).size(), - kUkmFontLoadCountBucketSpacing)) - .SetWebFontFamilySuccesses(ukm::GetExponentialBucketMin( -- Intersection(successful_font_families_, web_font_families_).size(), -+ i::Intersection(successful_font_families_, web_font_families_).size(), - kUkmFontLoadCountBucketSpacing)) - .SetWebFontFamilyFailures(ukm::GetExponentialBucketMin( -- Intersection(failed_font_families_, web_font_families_).size(), -+ i::Intersection(failed_font_families_, web_font_families_).size(), - kUkmFontLoadCountBucketSpacing)) - .SetLocalFontFailures(ukm::GetExponentialBucketMin( - local_fonts_failed_.size(), kUkmFontLoadCountBucketSpacing)) -diff --git third_party/blink/renderer/platform/mediastream/media_stream_audio_source.cc third_party/blink/renderer/platform/mediastream/media_stream_audio_source.cc -index 4c60ce0cff03..a3ebe396867f 100644 ---- third_party/blink/renderer/platform/mediastream/media_stream_audio_source.cc -+++ third_party/blink/renderer/platform/mediastream/media_stream_audio_source.cc -@@ -21,9 +21,11 @@ namespace blink { - - namespace { - -+namespace m { - void SendLogMessage(const std::string& message) { - blink::WebRtcLogMessage("MSAS::" + message); - } -+} // namespace m - - } // namespace - -@@ -55,7 +57,7 @@ MediaStreamAudioSource::MediaStreamAudioSource( - disable_local_echo_(disable_local_echo), - is_stopped_(false), - task_runner_(std::move(task_runner)) { -- SendLogMessage(base::StringPrintf( -+ m::SendLogMessage(base::StringPrintf( - "MediaStreamAudioSource([this=%p] {is_local_source=%s})", this, - (is_local_source ? "local" : "remote"))); - } -@@ -69,7 +71,7 @@ MediaStreamAudioSource::MediaStreamAudioSource( - - MediaStreamAudioSource::~MediaStreamAudioSource() { - DCHECK(task_runner_->BelongsToCurrentThread()); -- SendLogMessage( -+ m::SendLogMessage( - base::StringPrintf("~MediaStreamAudioSource([this=%p])", this)); - } - -@@ -86,7 +88,7 @@ bool MediaStreamAudioSource::ConnectToTrack( - const WebMediaStreamTrack& blink_track) { - DCHECK(task_runner_->BelongsToCurrentThread()); - DCHECK(!blink_track.IsNull()); -- SendLogMessage(base::StringPrintf("ConnectToTrack({track_id=%s})", -+ m::SendLogMessage(base::StringPrintf("ConnectToTrack({track_id=%s})", - blink_track.Id().Utf8().c_str())); - - // Sanity-check that there is not already a MediaStreamAudioTrack instance -@@ -181,7 +183,7 @@ void MediaStreamAudioSource::DoChangeSource( - std::unique_ptr - MediaStreamAudioSource::CreateMediaStreamAudioTrack(const std::string& id) { - DCHECK(task_runner_->BelongsToCurrentThread()); -- SendLogMessage( -+ m::SendLogMessage( - base::StringPrintf("CreateMediaStreamAudioTrack({id=%s})", id.c_str())); - return std::unique_ptr( - new MediaStreamAudioTrack(is_local_source())); -@@ -206,7 +208,7 @@ void MediaStreamAudioSource::ChangeSourceImpl( - } - - void MediaStreamAudioSource::SetFormat(const media::AudioParameters& params) { -- SendLogMessage(base::StringPrintf( -+ m::SendLogMessage(base::StringPrintf( - "SetFormat([this=%p] {params=[%s]}, {old_params=[%s]})", this, - params.AsHumanReadableString().c_str(), - deliverer_.GetAudioParameters().AsHumanReadableString().c_str())); -@@ -227,7 +229,7 @@ void MediaStreamAudioSource::DoStopSource() { - - void MediaStreamAudioSource::StopAudioDeliveryTo(MediaStreamAudioTrack* track) { - DCHECK(task_runner_->BelongsToCurrentThread()); -- SendLogMessage(base::StringPrintf("StopAudioDeliveryTo([this=%p])", this)); -+ m::SendLogMessage(base::StringPrintf("StopAudioDeliveryTo([this=%p])", this)); - - const bool did_remove_last_track = deliverer_.RemoveConsumer(track); - DVLOG(1) << "Removed MediaStreamAudioTrack@" << track -@@ -240,7 +242,7 @@ void MediaStreamAudioSource::StopAudioDeliveryTo(MediaStreamAudioTrack* track) { - } - - void MediaStreamAudioSource::StopSourceOnError(const std::string& why) { -- SendLogMessage(base::StringPrintf("StopSourceOnError([this=%p] {why=%s})", -+ m::SendLogMessage(base::StringPrintf("StopSourceOnError([this=%p] {why=%s})", - this, why.c_str())); - // Stop source when error occurs. - PostCrossThreadTask( -@@ -250,7 +252,7 @@ void MediaStreamAudioSource::StopSourceOnError(const std::string& why) { - } - - void MediaStreamAudioSource::SetMutedState(bool muted_state) { -- SendLogMessage(base::StringPrintf("SetMutedState([this=%p] {muted_state=%s})", -+ m::SendLogMessage(base::StringPrintf("SetMutedState([this=%p] {muted_state=%s})", - this, (muted_state ? "true" : "false"))); - PostCrossThreadTask( - *task_runner_, FROM_HERE, -diff --git third_party/blink/renderer/platform/mediastream/media_stream_audio_track.cc third_party/blink/renderer/platform/mediastream/media_stream_audio_track.cc -index 2c73fb0c88bd..5d5a852b0699 100644 ---- third_party/blink/renderer/platform/mediastream/media_stream_audio_track.cc -+++ third_party/blink/renderer/platform/mediastream/media_stream_audio_track.cc -@@ -18,22 +18,24 @@ namespace blink { - - namespace { - -+namespace i { - void SendLogMessage(const std::string& message) { - blink::WebRtcLogMessage("MSAT::" + message); - } -+} - - } // namespace - - MediaStreamAudioTrack::MediaStreamAudioTrack(bool is_local_track) - : WebPlatformMediaStreamTrack(is_local_track), is_enabled_(1) { -- SendLogMessage( -+ i::SendLogMessage( - base::StringPrintf("MediaStreamAudioTrack([this=%p] {is_local_track=%s})", - this, (is_local_track ? "local" : "remote"))); - } - - MediaStreamAudioTrack::~MediaStreamAudioTrack() { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf("~MediaStreamAudioTrack([this=%p])", this)); -+ i::SendLogMessage(base::StringPrintf("~MediaStreamAudioTrack([this=%p])", this)); - Stop(); - } - -@@ -49,7 +51,7 @@ MediaStreamAudioTrack* MediaStreamAudioTrack::From( - - void MediaStreamAudioTrack::AddSink(WebMediaStreamAudioSink* sink) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf("AddSink([this=%p])", this)); -+ i::SendLogMessage(base::StringPrintf("AddSink([this=%p])", this)); - - // If the track has already stopped, just notify the sink of this fact without - // adding it. -@@ -64,7 +66,7 @@ void MediaStreamAudioTrack::AddSink(WebMediaStreamAudioSink* sink) { - - void MediaStreamAudioTrack::RemoveSink(WebMediaStreamAudioSink* sink) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf("RemoveSink([this=%p])", this)); -+ i::SendLogMessage(base::StringPrintf("RemoveSink([this=%p])", this)); - deliverer_.RemoveConsumer(sink); - } - -@@ -74,7 +76,7 @@ media::AudioParameters MediaStreamAudioTrack::GetOutputFormat() const { - - void MediaStreamAudioTrack::SetEnabled(bool enabled) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf("SetEnabled([this=%p] {enabled=%s})", this, -+ i::SendLogMessage(base::StringPrintf("SetEnabled([this=%p] {enabled=%s})", this, - (enabled ? "true" : "false"))); - - const bool previously_enabled = -@@ -106,13 +108,13 @@ void MediaStreamAudioTrack::Start(base::OnceClosure stop_callback) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK(!stop_callback.is_null()); - DCHECK(stop_callback_.is_null()); -- SendLogMessage(base::StringPrintf("Start([this=%p])", this)); -+ i::SendLogMessage(base::StringPrintf("Start([this=%p])", this)); - stop_callback_ = std::move(stop_callback); - } - - void MediaStreamAudioTrack::StopAndNotify(base::OnceClosure callback) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf("StopAndNotify([this=%p])", this)); -+ i::SendLogMessage(base::StringPrintf("StopAndNotify([this=%p])", this)); - - if (!stop_callback_.is_null()) - std::move(stop_callback_).Run(); -@@ -130,7 +132,7 @@ void MediaStreamAudioTrack::StopAndNotify(base::OnceClosure callback) { - } - - void MediaStreamAudioTrack::OnSetFormat(const media::AudioParameters& params) { -- SendLogMessage(base::StringPrintf("OnSetFormat([this=%p] {params: [%s]})", -+ i::SendLogMessage(base::StringPrintf("OnSetFormat([this=%p] {params: [%s]})", - this, - params.AsHumanReadableString().c_str())); - deliverer_.OnSetFormat(params); -@@ -141,7 +143,7 @@ void MediaStreamAudioTrack::OnData(const media::AudioBus& audio_bus, - if (!received_audio_callback_) { - // Add log message with unique this pointer id to mark the audio track as - // alive at the first data callback. -- SendLogMessage(base::StringPrintf( -+ i::SendLogMessage(base::StringPrintf( - "OnData([this=%p] => (audio track is alive))", this)); - received_audio_callback_ = true; - } -diff --git third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_factory.cc third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_factory.cc -index cb12d36124c2..341845474fc3 100644 ---- third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_factory.cc -+++ third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_factory.cc -@@ -25,7 +25,9 @@ namespace { - - const int kDefaultFps = 30; - // Any reasonable size, will be overridden by the decoder anyway. -+namespace i { - const gfx::Size kDefaultSize(640, 480); -+} - - struct CodecConfig { - media::VideoCodec codec; -@@ -182,8 +184,8 @@ RTCVideoDecoderFactory::GetSupportedFormats() const { - media::VideoDecoderConfig config( - codec_config.codec, codec_config.profile, - media::VideoDecoderConfig::AlphaMode::kIsOpaque, -- media::VideoColorSpace(), media::kNoTransformation, kDefaultSize, -- gfx::Rect(kDefaultSize), kDefaultSize, media::EmptyExtraData(), -+ media::VideoColorSpace(), media::kNoTransformation, i::kDefaultSize, -+ gfx::Rect(i::kDefaultSize), i::kDefaultSize, media::EmptyExtraData(), - media::EncryptionScheme::kUnencrypted); - if (gpu_factories_->IsDecoderConfigSupported( - RTCVideoDecoderAdapter::kImplementation, config) == -diff --git third_party/blink/renderer/platform/peerconnection/webrtc_audio_sink.cc third_party/blink/renderer/platform/peerconnection/webrtc_audio_sink.cc -index 7d747bc50090..59a6c42e3281 100644 ---- third_party/blink/renderer/platform/peerconnection/webrtc_audio_sink.cc -+++ third_party/blink/renderer/platform/peerconnection/webrtc_audio_sink.cc -@@ -19,9 +19,11 @@ - - namespace { - -+namespace j { - void SendLogMessage(const std::string& message) { - blink::WebRtcLogMessage("WRAS::" + message); - } -+} - - } // namespace - -@@ -58,13 +60,13 @@ WebRtcAudioSink::WebRtcAudioSink( - fifo_(ConvertToBaseRepeatingCallback( - CrossThreadBindRepeating(&WebRtcAudioSink::DeliverRebufferedAudio, - CrossThreadUnretained(this)))) { -- SendLogMessage(base::StringPrintf("WebRtcAudioSink({label=%s})", -+ j::SendLogMessage(base::StringPrintf("WebRtcAudioSink({label=%s})", - adapter_->label().c_str())); - } - - WebRtcAudioSink::~WebRtcAudioSink() { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf("~WebRtcAudioSink([label=%s])", -+ j::SendLogMessage(base::StringPrintf("~WebRtcAudioSink([label=%s])", - adapter_->label().c_str())); - } - -@@ -84,7 +86,7 @@ void WebRtcAudioSink::SetLevel( - - void WebRtcAudioSink::OnEnabledChanged(bool enabled) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -- SendLogMessage(base::StringPrintf("OnEnabledChanged([label=%s] {enabled=%s})", -+ j::SendLogMessage(base::StringPrintf("OnEnabledChanged([label=%s] {enabled=%s})", - adapter_->label().c_str(), - (enabled ? "true" : "false"))); - PostCrossThreadTask( -@@ -105,7 +107,7 @@ void WebRtcAudioSink::OnData(const media::AudioBus& audio_bus, - - void WebRtcAudioSink::OnSetFormat(const media::AudioParameters& params) { - DCHECK(params.IsValid()); -- SendLogMessage(base::StringPrintf("OnSetFormat([label=%s] {params=[%s]})", -+ j::SendLogMessage(base::StringPrintf("OnSetFormat([label=%s] {params=[%s]})", - adapter_->label().c_str(), - params.AsHumanReadableString().c_str())); - params_ = params; -@@ -153,12 +155,12 @@ WebRtcAudioSink::Adapter::Adapter( - main_task_runner_(std::move(main_task_runner)) { - DCHECK(signaling_task_runner_); - DCHECK(main_task_runner_); -- SendLogMessage( -+ j::SendLogMessage( - base::StringPrintf("Adapter::Adapter({label=%s})", label_.c_str())); - } - - WebRtcAudioSink::Adapter::~Adapter() { -- SendLogMessage( -+ j::SendLogMessage( - base::StringPrintf("Adapter::~Adapter([label=%s])", label_.c_str())); - if (audio_processor_) { - PostCrossThreadTask(*main_task_runner_.get(), FROM_HERE, -@@ -186,7 +188,7 @@ std::string WebRtcAudioSink::Adapter::kind() const { - bool WebRtcAudioSink::Adapter::set_enabled(bool enable) { - DCHECK(!signaling_task_runner_ || - signaling_task_runner_->RunsTasksInCurrentSequence()); -- SendLogMessage( -+ j::SendLogMessage( - base::StringPrintf("Adapter::set_enabled([label=%s] {enable=%s})", - label_.c_str(), (enable ? "true" : "false"))); - return webrtc::MediaStreamTrack::set_enabled( -@@ -197,7 +199,7 @@ void WebRtcAudioSink::Adapter::AddSink(webrtc::AudioTrackSinkInterface* sink) { - DCHECK(!signaling_task_runner_ || - signaling_task_runner_->RunsTasksInCurrentSequence()); - DCHECK(sink); -- SendLogMessage( -+ j::SendLogMessage( - base::StringPrintf("Adapter::AddSink({label=%s})", label_.c_str())); - base::AutoLock auto_lock(lock_); - DCHECK(!base::Contains(sinks_, sink)); -@@ -208,7 +210,7 @@ void WebRtcAudioSink::Adapter::RemoveSink( - webrtc::AudioTrackSinkInterface* sink) { - DCHECK(!signaling_task_runner_ || - signaling_task_runner_->RunsTasksInCurrentSequence()); -- SendLogMessage( -+ j::SendLogMessage( - base::StringPrintf("Adapter::RemoveSink([label=%s])", label_.c_str())); - base::AutoLock auto_lock(lock_); - const auto it = std::find(sinks_.begin(), sinks_.end(), sink); -@@ -230,7 +232,7 @@ bool WebRtcAudioSink::Adapter::GetSignalLevel(int* level) { - // Convert from float in range [0.0,1.0] to an int in range [0,32767]. - *level = static_cast(signal_level * std::numeric_limits::max() + - 0.5f /* rounding to nearest int */); -- SendLogMessage( -+ j::SendLogMessage( - base::StringPrintf("Adapter::GetSignalLevel([label=%s]) => (level=%d)", - label_.c_str(), *level)); - return true; -diff --git ui/base/x/x11_drag_context.cc ui/base/x/x11_drag_context.cc -index 3ed9e98b2a20..8ada19c7afd9 100644 ---- ui/base/x/x11_drag_context.cc -+++ ui/base/x/x11_drag_context.cc -@@ -13,6 +13,7 @@ - namespace ui { - - namespace { -+namespace i { - - // Window property that holds the supported drag and drop data types. - // This property is set on the XDND source window when the drag and drop data -@@ -34,6 +35,7 @@ const char kXdndActionLink[] = "XdndActionLink"; - // Window property that will receive the drag and drop selection data. - const char kChromiumDragReciever[] = "_CHROMIUM_DRAG_RECEIVER"; - -+} // namespace i - } // namespace - - XDragContext::XDragContext(XID local_window, -@@ -47,7 +49,7 @@ XDragContext::XDragContext(XID local_window, - bool get_types_from_property = ((event.data.l[1] & 1) != 0); - - if (get_types_from_property) { -- if (!GetAtomArrayProperty(source_window_, kXdndTypeList, -+ if (!GetAtomArrayProperty(source_window_, i::kXdndTypeList, - &unfetched_targets_)) { - return; - } -@@ -111,8 +113,8 @@ void XDragContext::RequestNextTarget() { - Atom target = unfetched_targets_.back(); - unfetched_targets_.pop_back(); - -- XConvertSelection(gfx::GetXDisplay(), gfx::GetAtom(kXdndSelection), target, -- gfx::GetAtom(kChromiumDragReciever), local_window_, -+ XConvertSelection(gfx::GetXDisplay(), gfx::GetAtom(i::kXdndSelection), target, -+ gfx::GetAtom(i::kChromiumDragReciever), local_window_, - position_time_stamp_); - } - -@@ -127,7 +129,7 @@ void XDragContext::OnSelectionNotify(const XSelectionEvent& event) { - DVLOG(1) << "SelectionNotify, format " << event.target; - - if (event.property != x11::None) { -- DCHECK_EQ(event.property, gfx::GetAtom(kChromiumDragReciever)); -+ DCHECK_EQ(event.property, gfx::GetAtom(i::kChromiumDragReciever)); - - scoped_refptr data; - Atom type = x11::None; -@@ -155,7 +157,7 @@ void XDragContext::OnSelectionNotify(const XSelectionEvent& event) { - void XDragContext::ReadActions() { - if (!source_client_) { - std::vector atom_array; -- if (!GetAtomArrayProperty(source_window_, kXdndActionList, &atom_array)) -+ if (!GetAtomArrayProperty(source_window_, i::kXdndActionList, &atom_array)) - actions_.clear(); - else - actions_.swap(atom_array); -@@ -179,17 +181,17 @@ int XDragContext::GetDragOperation() const { - - void XDragContext::MaskOperation(Atom xdnd_operation, - int* drag_operation) const { -- if (xdnd_operation == gfx::GetAtom(kXdndActionCopy)) -+ if (xdnd_operation == gfx::GetAtom(i::kXdndActionCopy)) - *drag_operation |= DragDropTypes::DRAG_COPY; -- else if (xdnd_operation == gfx::GetAtom(kXdndActionMove)) -+ else if (xdnd_operation == gfx::GetAtom(i::kXdndActionMove)) - *drag_operation |= DragDropTypes::DRAG_MOVE; -- else if (xdnd_operation == gfx::GetAtom(kXdndActionLink)) -+ else if (xdnd_operation == gfx::GetAtom(i::kXdndActionLink)) - *drag_operation |= DragDropTypes::DRAG_LINK; - } - - bool XDragContext::DispatchXEvent(XEvent* xev) { - if (xev->type == PropertyNotify && -- xev->xproperty.atom == gfx::GetAtom(kXdndActionList)) { -+ xev->xproperty.atom == gfx::GetAtom(i::kXdndActionList)) { - ReadActions(); - return true; - } diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 48fd822cd..8e3a0de38 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 477e30a34cd2..7a24ff410e7e 100644 +index 021b133ee20e..3282a16ad86c 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -11,6 +11,7 @@ import("//build/config/features.gni") @@ -8,9 +8,9 @@ index 477e30a34cd2..7a24ff410e7e 100644 import("//build/config/ui.gni") +import("//cef/libcef/features/features.gni") import("//chrome/browser/buildflags.gni") + import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/common/features.gni") - import("//components/captive_portal/core/features.gni") -@@ -1956,6 +1957,7 @@ jumbo_static_library("browser") { +@@ -1975,6 +1976,7 @@ jumbo_static_library("browser") { "//base/util/values:values_util", "//build:branding_buildflags", "//cc", @@ -18,7 +18,7 @@ index 477e30a34cd2..7a24ff410e7e 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2275,6 +2277,10 @@ jumbo_static_library("browser") { +@@ -2296,6 +2298,10 @@ jumbo_static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index cae165682..be2585449 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -1,16 +1,16 @@ diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc -index 1610e0ecc707..f231d5033983 100644 +index 937b56a2e261..9e3877b06c59 100644 --- chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc -@@ -7,6 +7,7 @@ - #include +@@ -8,6 +8,7 @@ #include "base/feature_list.h" + #include "build/buildflag.h" +#include "cef/libcef/features/features.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" -@@ -17,6 +18,10 @@ +@@ -19,6 +20,10 @@ #include "content/public/browser/browser_thread.h" #include "extensions/buildflags/buildflags.h" @@ -21,7 +21,7 @@ index 1610e0ecc707..f231d5033983 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_service.h" #include "extensions/browser/extension_system.h" -@@ -45,8 +50,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() +@@ -47,8 +52,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() DependsOn(SupervisedUserSettingsServiceFactory::GetInstance()); #endif #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -36,8 +36,8 @@ index 1610e0ecc707..f231d5033983 100644 #endif } -@@ -86,10 +97,16 @@ scoped_refptr - base::FeatureList::IsEnabled(features::kPermissionDelegation))); +@@ -89,10 +100,16 @@ scoped_refptr + permissions::features::kPermissionDelegation))); #if BUILDFLAG(ENABLE_EXTENSIONS) +#if BUILDFLAG(ENABLE_CEF) diff --git a/patch/patches/chrome_browser_net_export.patch b/patch/patches/chrome_browser_net_export.patch index 3065c86f1..cf9288bec 100644 --- a/patch/patches/chrome_browser_net_export.patch +++ b/patch/patches/chrome_browser_net_export.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index c820df8447f0..58cb1279b7bf 100644 +index c2920a353de1..1b5a3b70b276 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn -@@ -9,6 +9,7 @@ import("//build/config/features.gni") +@@ -10,6 +10,7 @@ import("//build/config/features.gni") import("//build/config/jumbo.gni") import("//build/config/linux/gtk/gtk.gni") import("//build/config/ui.gni") @@ -10,7 +10,7 @@ index c820df8447f0..58cb1279b7bf 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/assistant/assistant.gni") -@@ -362,6 +363,10 @@ jumbo_static_library("ui") { +@@ -364,6 +365,10 @@ jumbo_static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -21,7 +21,7 @@ index c820df8447f0..58cb1279b7bf 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 -@@ -383,6 +388,7 @@ jumbo_static_library("ui") { +@@ -385,6 +390,7 @@ jumbo_static_library("ui") { "//base/allocator:buildflags", "//build:branding_buildflags", "//cc/paint", @@ -29,7 +29,7 @@ index c820df8447f0..58cb1279b7bf 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -1438,6 +1444,7 @@ jumbo_static_library("ui") { +@@ -1460,6 +1466,7 @@ jumbo_static_library("ui") { "//components/keep_alive_registry", "//components/network_session_configurator/common", "//components/page_load_metrics/browser", diff --git a/patch/patches/chrome_browser_product_override.patch b/patch/patches/chrome_browser_product_override.patch index c6e706b9e..798a2ba5b 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 6cdca1affb9f..f875ba1a5d75 100644 +index f1f4f715ca7e..97075e049f9c 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc -@@ -1027,10 +1027,6 @@ void LaunchURL(const GURL& url, +@@ -992,10 +992,6 @@ void LaunchURL(const GURL& url, } } @@ -13,7 +13,7 @@ index 6cdca1affb9f..f875ba1a5d75 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 -@@ -1125,6 +1121,14 @@ void MaybeRecordSameSiteCookieEngagementHistogram( +@@ -1090,6 +1086,14 @@ void MaybeRecordSameSiteCookieEngagementHistogram( } // namespace @@ -29,10 +29,10 @@ index 6cdca1affb9f..f875ba1a5d75 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 e4a98f0bb2f6..cbc986303fd2 100644 +index 3e2312a0bffa..940ca48b98a0 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -86,7 +86,8 @@ enum class Channel; +@@ -85,7 +85,8 @@ class ChromeBluetoothDelegate; class ChromeHidDelegate; class ChromeSerialDelegate; diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 2128700e8..bcc7941f8 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 3c43cc752511..fbc476cc9023 100644 +index bd8f77e07208..325f4ba698ec 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -362,7 +362,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -364,7 +364,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, content::NotificationService::AllSources()); @@ -12,7 +12,7 @@ index 3c43cc752511..fbc476cc9023 100644 } diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h -index f4c3c9e25190..dd91e00d3001 100644 +index 3e1e28ea7d0e..b70f718c8e94 100644 --- chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h @@ -101,7 +101,7 @@ class ProfileManager : public content::NotificationObserver, @@ -43,7 +43,7 @@ index f4c3c9e25190..dd91e00d3001 100644 // Get the path of the last used profile, or if that's undefined, the default // profile. diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc -index ce50c9ee3f92..eba0894ee2b4 100644 +index c1792eccd997..6c34846b7947 100644 --- chrome/browser/profiles/renderer_updater.cc +++ chrome/browser/profiles/renderer_updater.cc @@ -7,6 +7,7 @@ @@ -67,12 +67,3 @@ index ce50c9ee3f92..eba0894ee2b4 100644 #if defined(OS_CHROMEOS) oauth2_login_manager_ = chromeos::OAuth2LoginManagerFactory::GetForProfile(profile_); -@@ -233,7 +238,7 @@ void RendererUpdater::UpdateRenderer( - force_google_safesearch_.GetValue(), - force_youtube_restrict_.GetValue(), - allowed_domains_for_apps_.GetValue(), -- identity_manager_->HasPrimaryAccount() -+ identity_manager_ && identity_manager_->HasPrimaryAccount() - ? cached_variation_ids_header_signed_in_ - : cached_variation_ids_header_)); - } diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index dff60b6bb..47c400f58 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,12 +1,12 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 7bd46afdfd34..f3d2d056d6a0 100644 +index 42cacbd4d078..cce7879e66f2 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn -@@ -243,6 +243,7 @@ jumbo_static_library("safe_browsing") { +@@ -241,6 +241,7 @@ jumbo_static_library("safe_browsing") { "//chrome/common/safe_browsing:download_type_util", "//chrome/services/file_util/public/cpp", "//components/content_settings/core/browser", + "//components/gcm_driver:gcm_buildflags", "//components/language/core/common", "//components/prefs", - "//components/safe_browsing/core/db", + "//components/safe_browsing/core:webprotect_proto", diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 04dfc53bf..af54d8af1 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -165,16 +165,16 @@ index 4e64db143b8a..71322b0261a1 100644 Profile* profile = Profile::FromBrowserContext(browser_context); std::vector whitelist = MimeTypesHandler::GetMIMETypeWhitelist(); diff --git chrome/common/google_url_loader_throttle.cc chrome/common/google_url_loader_throttle.cc -index a7e5caea5add..f9d11b317946 100644 +index bcb97138c321..df6792bd5317 100644 --- chrome/common/google_url_loader_throttle.cc +++ chrome/common/google_url_loader_throttle.cc -@@ -4,10 +4,15 @@ - +@@ -5,10 +5,15 @@ #include "chrome/common/google_url_loader_throttle.h" + #include "build/build_config.h" +#include "cef/libcef/features/features.h" #include "chrome/common/net/safe_search_util.h" - #include "components/variations/net/variations_http_headers.h" + #include "components/google/core/common/google_util.h" #include "services/network/public/mojom/url_response_head.mojom.h" +#if BUILDFLAG(ENABLE_CEF) @@ -184,7 +184,7 @@ index a7e5caea5add..f9d11b317946 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "extensions/common/extension_urls.h" #endif -@@ -96,6 +101,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse( +@@ -116,6 +121,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse( const GURL& response_url, network::mojom::URLResponseHead* response_head, bool* defer) { @@ -197,7 +197,7 @@ index a7e5caea5add..f9d11b317946 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 e03ad3a5a115..12adcae6cf84 100644 +index 6600de77c3f6..dece49ca3455 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc @@ -811,6 +811,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -208,7 +208,7 @@ index e03ad3a5a115..12adcae6cf84 100644 content_settings_agent->IsPluginTemporarilyAllowed(identifier)) { status = chrome::mojom::PluginStatus::kAllowed; } -@@ -1009,7 +1010,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1013,7 +1014,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -218,7 +218,7 @@ index e03ad3a5a115..12adcae6cf84 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -1018,7 +1020,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1022,7 +1024,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 e03ad3a5a115..12adcae6cf84 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -1028,7 +1031,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1032,7 +1035,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -238,7 +238,7 @@ index e03ad3a5a115..12adcae6cf84 100644 break; } case chrome::mojom::PluginStatus::kBlockedNoLoading: { -@@ -1036,7 +1040,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1040,7 +1044,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( IDR_BLOCKED_PLUGIN_HTML, l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, group_name)); @@ -249,7 +249,7 @@ index e03ad3a5a115..12adcae6cf84 100644 } case chrome::mojom::PluginStatus::kComponentUpdateRequired: { diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc -index ed7a8e4d9c7b..19af355cac2a 100644 +index 8a7d7402a48c..4dde943d0222 100644 --- chrome/renderer/plugins/chrome_plugin_placeholder.cc +++ chrome/renderer/plugins/chrome_plugin_placeholder.cc @@ -359,8 +359,11 @@ void ChromePluginPlaceholder::OnBlockedContent( diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index 4f08a9fc3..59731947e 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 b2eaaf2b29fd..842e99c37e95 100644 +index 9b93e72eee7b..5d7c3d7fb2ab 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -5,6 +5,7 @@ @@ -10,7 +10,7 @@ index b2eaaf2b29fd..842e99c37e95 100644 import("//chrome/common/features.gni") import("//components/nacl/features.gni") import("//components/offline_pages/buildflags/features.gni") -@@ -129,6 +130,7 @@ jumbo_static_library("renderer") { +@@ -127,6 +128,7 @@ jumbo_static_library("renderer") { defines = [] deps = [ @@ -18,7 +18,7 @@ index b2eaaf2b29fd..842e99c37e95 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -194,6 +196,10 @@ jumbo_static_library("renderer") { +@@ -191,6 +193,10 @@ jumbo_static_library("renderer") { configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 44f9d14e9..b22a6f231 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 544ed223ac8e..490330c87453 100644 +index e42da08fd771..f7e63be23f92 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h @@ -12,6 +12,7 @@ diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index ecd185e27..09032c2ec 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc -index c07ba782b810..7ae3ab09a15a 100644 +index 1b5b71193d02..05dad7a969d5 100644 --- chrome/browser/download/download_target_determiner.cc +++ chrome/browser/download/download_target_determiner.cc -@@ -639,7 +639,7 @@ void IsHandledBySafePlugin(int render_process_id, +@@ -657,7 +657,7 @@ void IsHandledBySafePlugin(int render_process_id, content::PluginService* plugin_service = content::PluginService::GetInstance(); bool plugin_found = plugin_service->GetPluginInfo( @@ -36,10 +36,10 @@ index 937d3d5bc84f..ac327392dcf3 100644 content::WebPluginInfo* plugin) override; diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc -index 8d7b5276955d..787f338e7ca6 100644 +index 5b780f8bf34c..a75d0da983b4 100644 --- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc +++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc -@@ -68,7 +68,7 @@ bool IsPDFPluginEnabled(content::NavigationHandle* navigation_handle, +@@ -65,7 +65,7 @@ bool IsPDFPluginEnabled(content::NavigationHandle* navigation_handle, content::WebPluginInfo plugin_info; return content::PluginService::GetInstance()->GetPluginInfo( @@ -49,10 +49,10 @@ index 8d7b5276955d..787f338e7ca6 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 e622e8099e95..2b08fc4e3727 100644 +index 2277ac1008af..db0c90677538 100644 --- chrome/browser/ui/views/frame/browser_root_view.cc +++ chrome/browser/ui/views/frame/browser_root_view.cc -@@ -75,7 +75,7 @@ void OnFindURLMimeType(const GURL& url, +@@ -76,7 +76,7 @@ void OnFindURLMimeType(const GURL& url, #if BUILDFLAG(ENABLE_PLUGINS) content::WebPluginInfo plugin; result = result || content::PluginService::GetInstance()->GetPluginInfo( @@ -62,7 +62,7 @@ index e622e8099e95..2b08fc4e3727 100644 #endif diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index 6518a57a5f16..e88984c8150c 100644 +index 4956b35c1278..2f9c0621f53e 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc @@ -571,7 +571,7 @@ void DevToolsHttpHandler::OnJsonRequest( @@ -75,10 +75,10 @@ index 6518a57a5f16..e88984c8150c 100644 GetContentClient()->browser()->GetUserAgent()); version.SetString("V8-Version", V8_VERSION_STRING); diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc -index c80e4075de69..7bc702749974 100644 +index f6511e22ab05..0ccf811d7b22 100644 --- content/browser/frame_host/render_frame_message_filter.cc +++ content/browser/frame_host/render_frame_message_filter.cc -@@ -308,6 +308,7 @@ void RenderFrameMessageFilter::OnAre3DAPIsBlocked(int render_frame_id, +@@ -298,6 +298,7 @@ void RenderFrameMessageFilter::OnCreateChildFrame( void RenderFrameMessageFilter::OnGetPluginInfo( int render_frame_id, const GURL& url, @@ -86,7 +86,7 @@ index c80e4075de69..7bc702749974 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool* found, -@@ -315,8 +316,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo( +@@ -305,8 +306,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo( std::string* actual_mime_type) { bool allow_wildcard = true; *found = plugin_service_->GetPluginInfo( @@ -99,10 +99,10 @@ index c80e4075de69..7bc702749974 100644 void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin( diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h -index 9ce9487ef40c..78421b32149c 100644 +index 451bfecfa4b1..b7cddcbaca66 100644 --- content/browser/frame_host/render_frame_message_filter.h +++ content/browser/frame_host/render_frame_message_filter.h -@@ -90,6 +90,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter { +@@ -83,6 +83,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter { #if BUILDFLAG(ENABLE_PLUGINS) void OnGetPluginInfo(int render_frame_id, const GURL& url, @@ -111,10 +111,10 @@ index 9ce9487ef40c..78421b32149c 100644 const std::string& mime_type, bool* found, diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index 7f322176a102..9301825b8b59 100644 +index f9125290d783..e7558300bbe3 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -716,6 +716,13 @@ class NavigationURLLoaderImpl::URLLoaderRequestController +@@ -718,6 +718,13 @@ class NavigationURLLoaderImpl::URLLoaderRequestController resource_request_->has_user_gesture, resource_request_->request_initiator, &loader_factory); @@ -128,7 +128,7 @@ index 7f322176a102..9301825b8b59 100644 if (loader_factory) { factory = base::MakeRefCounted( -@@ -924,7 +931,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController +@@ -929,7 +936,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController frame_tree_node->current_frame_host()->GetProcess()->GetID(); int routing_id = frame_tree_node->current_frame_host()->GetRoutingID(); bool has_plugin = PluginService::GetInstance()->GetPluginInfo( @@ -138,10 +138,10 @@ index 7f322176a102..9301825b8b59 100644 if (stale) { diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc -index 848431a0cad6..9001ad4c9e68 100644 +index 8f0f145f9760..49f0698c89f5 100644 --- content/browser/plugin_service_impl.cc +++ content/browser/plugin_service_impl.cc -@@ -311,6 +311,7 @@ bool PluginServiceImpl::GetPluginInfoArray( +@@ -340,6 +340,7 @@ bool PluginServiceImpl::GetPluginInfoArray( bool PluginServiceImpl::GetPluginInfo(int render_process_id, int render_frame_id, const GURL& url, @@ -149,7 +149,7 @@ index 848431a0cad6..9001ad4c9e68 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool allow_wildcard, -@@ -328,7 +329,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, +@@ -357,7 +358,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, @@ -224,10 +224,10 @@ index 632ae86c6fd6..55b749ec1242 100644 const std::vector& all_plugins); diff --git content/common/frame_messages.h content/common/frame_messages.h -index 4370f99c9a51..8dc0736e2b59 100644 +index c71e15cc41c6..420d581c04e1 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h -@@ -826,9 +826,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, +@@ -724,9 +724,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. @@ -239,8 +239,21 @@ index 4370f99c9a51..8dc0736e2b59 100644 url::Origin /* main_frame_origin */, std::string /* mime_type */, bool /* found */, +diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc +index 4e95486031b4..a6009160c9ed 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 820000 ++// #pragma clang max_tokens_here 820000 + + #include + diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index 51f31b2c7e43..85faf2c0486b 100644 +index a13172df620d..16c1e118e7df 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h @@ -26,6 +26,7 @@ @@ -251,7 +264,7 @@ index 51f31b2c7e43..85faf2c0486b 100644 #include "content/public/common/page_visibility_state.h" #include "content/public/common/previews_state.h" #include "content/public/common/window_container_type.mojom-forward.h" -@@ -1626,6 +1627,14 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1620,6 +1621,14 @@ class CONTENT_EXPORT ContentBrowserClient { const base::Optional& initiating_origin, mojo::PendingRemote* out_factory); @@ -266,7 +279,7 @@ index 51f31b2c7e43..85faf2c0486b 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. -@@ -1689,6 +1698,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1687,6 +1696,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -302,7 +315,7 @@ index 98c59005599e..69752184745d 100644 WebPluginInfo* plugin) = 0; diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index 87df60c52d1e..c3841a7845dd 100644 +index 56062bb2680a..246c965ed375 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -80,6 +80,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -315,7 +328,7 @@ index 87df60c52d1e..c3841a7845dd 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -321,6 +324,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -305,6 +308,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -327,10 +340,10 @@ index 87df60c52d1e..c3841a7845dd 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index 00bbbdc9b82d..a3c923fcc442 100644 +index 813fd92481d5..4f609d11f92e 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc -@@ -3796,7 +3796,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( +@@ -3754,7 +3754,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( std::string mime_type; bool found = false; Send(new FrameHostMsg_GetPluginInfo( @@ -341,10 +354,10 @@ index 00bbbdc9b82d..a3c923fcc442 100644 if (!found) return nullptr; diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index ae1a77a219f1..f91dd6477bf3 100644 +index 1ba5936414aa..7595a5279c1c 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -620,6 +620,8 @@ void RenderThreadImpl::Init() { +@@ -623,6 +623,8 @@ void RenderThreadImpl::Init() { GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( URLLoaderThrottleProviderType::kFrame); @@ -354,10 +367,10 @@ index ae1a77a219f1..f91dd6477bf3 100644 &RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index 58c1b0e78a66..e8efa7277f33 100644 +index 8c641e6e3a6f..d2d1a7c2b6de 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -914,6 +914,15 @@ RendererBlinkPlatformImpl::GetGpuFactories() { +@@ -899,6 +899,15 @@ RendererBlinkPlatformImpl::GetGpuFactories() { //------------------------------------------------------------------------------ @@ -374,10 +387,10 @@ index 58c1b0e78a66..e8efa7277f33 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 096cd162c7d5..c409b6eb08ca 100644 +index 80490f5b8d52..8c07dc87edbb 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -197,6 +197,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -198,6 +198,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { media::GpuVideoAcceleratorFactories* GetGpuFactories() override; diff --git a/patch/patches/content_app_shutdown_2798.patch b/patch/patches/content_app_shutdown_2798.patch index 9934541e6..a4467ae04 100644 --- a/patch/patches/content_app_shutdown_2798.patch +++ b/patch/patches/content_app_shutdown_2798.patch @@ -1,5 +1,5 @@ diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index 3b37ef6a284e..466c0331311e 100644 +index d769b656dbe9..b2c67e1da6aa 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc @@ -43,6 +43,7 @@ @@ -10,7 +10,7 @@ index 3b37ef6a284e..466c0331311e 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" -@@ -1001,6 +1002,11 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1014,6 +1015,11 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } @@ -23,10 +23,10 @@ index 3b37ef6a284e..466c0331311e 100644 ContentMainRunner* ContentMainRunner::Create() { return ContentMainRunnerImpl::Create(); diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h -index 72098b4d06f8..2c2091576aa8 100644 +index 0a129f34c19f..9c83646113a0 100644 --- content/app/content_main_runner_impl.h +++ content/app/content_main_runner_impl.h -@@ -50,6 +50,8 @@ class ContentMainRunnerImpl : public ContentMainRunner { +@@ -51,6 +51,8 @@ class ContentMainRunnerImpl : public ContentMainRunner { int Run(bool start_service_manager_only) override; void Shutdown() override; diff --git a/patch/patches/content_pepper_flash_1586.patch b/patch/patches/content_pepper_flash_1586.patch index 276ab1e47..3a7893971 100644 --- a/patch/patches/content_pepper_flash_1586.patch +++ b/patch/patches/content_pepper_flash_1586.patch @@ -1,8 +1,8 @@ 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 fe3311bc5e54..e4b5385ff3bf 100644 +index be208ad722fa..df9c50da18ad 100644 --- content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc +++ content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc -@@ -55,7 +55,7 @@ PepperFlashFileMessageFilter::PepperFlashFileMessageFilter( +@@ -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. diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index dfa565d4b..63aecdcda 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -1,5 +1,5 @@ diff --git chrome/chrome_elf/BUILD.gn chrome/chrome_elf/BUILD.gn -index abd8ceba1896..f92981183aad 100644 +index de079e97cc2b..b6bcf351e438 100644 --- chrome/chrome_elf/BUILD.gn +++ chrome/chrome_elf/BUILD.gn @@ -7,6 +7,7 @@ @@ -244,7 +244,7 @@ index 6e95af6ca7f5..061fb189d60f 100644 extern void InitCrashKeysForTesting(); diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc -index 4d2b6ad68d80..728ffd9e7b4c 100644 +index bb131fb5d540..a4b86e58187d 100644 --- components/crash/content/app/crash_reporter_client.cc +++ components/crash/content/app/crash_reporter_client.cc @@ -88,7 +88,7 @@ int CrashReporterClient::GetResultCodeRespawnFailed() { @@ -305,7 +305,7 @@ index 4d2b6ad68d80..728ffd9e7b4c 100644 #if defined(OS_ANDROID) unsigned int CrashReporterClient::GetCrashDumpPercentage() { return 100; -@@ -195,9 +223,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() { +@@ -200,9 +228,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() { return false; } @@ -321,7 +321,7 @@ index 4d2b6ad68d80..728ffd9e7b4c 100644 } // namespace crash_reporter diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h -index d46bcc2a39b4..390654dd76fd 100644 +index eb726494e22b..c8b1d82e64b9 100644 --- components/crash/content/app/crash_reporter_client.h +++ components/crash/content/app/crash_reporter_client.h @@ -5,7 +5,9 @@ @@ -359,7 +359,7 @@ index d46bcc2a39b4..390654dd76fd 100644 #endif // The location where minidump files should be written. Returns true if -@@ -207,6 +211,30 @@ class CrashReporterClient { +@@ -210,6 +214,30 @@ class CrashReporterClient { // Returns true if breakpad should run in the given process type. virtual bool EnableBreakpadForProcess(const std::string& process_type); @@ -391,16 +391,16 @@ index d46bcc2a39b4..390654dd76fd 100644 } // namespace crash_reporter diff --git components/crash/content/app/crashpad.cc components/crash/content/app/crashpad.cc -index 5eba3742684b..9bc66b0dbfb9 100644 +index 222d62ada276..22c35665b394 100644 --- components/crash/content/app/crashpad.cc +++ components/crash/content/app/crashpad.cc -@@ -152,7 +152,8 @@ void InitializeCrashpadImpl(bool initial_client, +@@ -151,7 +151,8 @@ void InitializeCrashpadImpl(bool initial_client, // fallback. Forwarding is turned off for debug-mode builds even for the // browser process, because the system's crash reporter can take a very long // time to chew on symbols. - if (!browser_process || is_debug_build) { + if (!browser_process || is_debug_build || -+ !crash_reporter_client->EnableBrowserCrashForwarding()) { ++ !GetCrashReporterClient()->EnableBrowserCrashForwarding()) { crashpad::CrashpadInfo::GetCrashpadInfo() ->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled); } diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index fbac98718..1ece692e7 100644 --- a/patch/patches/crashpad_tp_1995.patch +++ b/patch/patches/crashpad_tp_1995.patch @@ -130,10 +130,10 @@ index db9dface43f8..e5bdfebf8403 100644 Settings::ScopedLockedFileHandle Settings::MakeScopedLockedFileHandle( FileHandle file, diff --git third_party/crashpad/crashpad/client/settings.h third_party/crashpad/crashpad/client/settings.h -index a2b0c74636f4..01370fdc20d9 100644 +index 5761c6b965b5..aee4e6c96033 100644 --- third_party/crashpad/crashpad/client/settings.h +++ third_party/crashpad/crashpad/client/settings.h -@@ -111,6 +111,11 @@ class Settings { +@@ -115,6 +115,11 @@ class Settings { //! error logged. bool SetLastUploadAttemptTime(time_t time); @@ -146,7 +146,7 @@ index a2b0c74636f4..01370fdc20d9 100644 struct Data; diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn -index b06f68af3baa..42b47ab40109 100644 +index ff9f5d1f2c47..c7935c4d65a7 100644 --- third_party/crashpad/crashpad/handler/BUILD.gn +++ third_party/crashpad/crashpad/handler/BUILD.gn @@ -12,6 +12,7 @@ @@ -248,7 +248,7 @@ 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 1cf655aec466..50ff7ed6fdbf 100644 +index e0a262cd1f38..2949e3ac1739 100644 --- third_party/crashpad/crashpad/handler/handler_main.cc +++ third_party/crashpad/crashpad/handler/handler_main.cc @@ -36,8 +36,10 @@ @@ -273,7 +273,7 @@ index 1cf655aec466..50ff7ed6fdbf 100644 namespace crashpad { namespace { -@@ -204,6 +210,9 @@ struct Options { +@@ -215,6 +221,9 @@ struct Options { bool periodic_tasks; bool rate_limit; bool upload_gzip; @@ -283,7 +283,7 @@ index 1cf655aec466..50ff7ed6fdbf 100644 #if defined(OS_CHROMEOS) bool use_cros_crash_reporter = false; base::FilePath minidump_dir_for_tests; -@@ -563,6 +572,9 @@ int HandlerMain(int argc, +@@ -577,6 +586,9 @@ int HandlerMain(int argc, kOptionTraceParentWithException, #endif kOptionURL, @@ -293,8 +293,8 @@ index 1cf655aec466..50ff7ed6fdbf 100644 #if defined(OS_CHROMEOS) kOptionUseCrosCrashReporter, kOptionMinidumpDirForTests, -@@ -649,6 +661,9 @@ int HandlerMain(int argc, - #endif // OS_CHROMEOS +@@ -675,6 +687,9 @@ int HandlerMain(int argc, + #endif // OS_ANDROID {"help", no_argument, nullptr, kOptionHelp}, {"version", no_argument, nullptr, kOptionVersion}, + {"max-uploads", required_argument, nullptr, kOptionMaxUploads}, @@ -303,7 +303,7 @@ index 1cf655aec466..50ff7ed6fdbf 100644 {nullptr, 0, nullptr, 0}, }; -@@ -788,6 +803,27 @@ int HandlerMain(int argc, +@@ -823,6 +838,27 @@ int HandlerMain(int argc, options.url = optarg; break; } @@ -331,7 +331,7 @@ index 1cf655aec466..50ff7ed6fdbf 100644 #if defined(OS_CHROMEOS) case kOptionUseCrosCrashReporter: { options.use_cros_crash_reporter = true; -@@ -923,8 +959,14 @@ int HandlerMain(int argc, +@@ -972,8 +1008,14 @@ int HandlerMain(int argc, upload_thread_options.upload_gzip = options.upload_gzip; upload_thread_options.watch_pending_reports = options.periodic_tasks; @@ -346,7 +346,7 @@ index 1cf655aec466..50ff7ed6fdbf 100644 upload_thread.Get()->Start(); } -@@ -984,7 +1026,8 @@ int HandlerMain(int argc, +@@ -1043,7 +1085,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 9bed2045c..e67ae0398 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 3841b7adf65d..41ca32ea5e2f 100644 +index bb4af725af9f..a1389be84f6e 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 @@ @@ -9,8 +9,8 @@ index 3841b7adf65d..41ca32ea5e2f 100644 +#include "cef/libcef/features/features.h" #include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/prerender/prerender_contents.h" - #include "content/public/browser/browser_thread.h" -@@ -40,6 +41,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( + #include "components/sessions/core/session_id.h" +@@ -41,6 +42,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( if (!web_contents) return; @@ -18,7 +18,7 @@ index 3841b7adf65d..41ca32ea5e2f 100644 // If the request was for a prerender, abort the prerender and do not // continue. This is because plugins cancel prerender, see // http://crbug.com/343590. -@@ -49,6 +51,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( +@@ -50,6 +52,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( prerender_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD); return; } @@ -132,7 +132,7 @@ index 093fb25589a9..3e6247802c52 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 e697984786c5..dc84cfd92669 100644 +index c2d64706c1db..4d5c75dd035f 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h @@ -56,6 +56,7 @@ class ComponentExtensionResourceManager; diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index 709df3afa..6d1ef78cd 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index 1bd5722a6ca5..c8919a7b4ab2 100644 +index 7ad6b3bc6298..6dc25b644f2b 100644 --- .gn +++ .gn -@@ -647,6 +647,8 @@ exec_script_whitelist = +@@ -643,6 +643,8 @@ exec_script_whitelist = "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn", @@ -12,10 +12,10 @@ index 1bd5722a6ca5..c8919a7b4ab2 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index d4c2158d938c..b58ce91305fe 100644 +index 6791cf2464d3..a00f33f5987f 100644 --- BUILD.gn +++ BUILD.gn -@@ -219,6 +219,7 @@ group("gn_all") { +@@ -222,6 +222,7 @@ group("gn_all") { if (!is_ios && !is_fuchsia) { deps += [ @@ -56,10 +56,10 @@ index 982fbe8d3f0d..e757be4688f1 100644 + "studio path") } diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index 5121fa721a06..b5ab128722f0 100644 +index ddfc4bd551d1..0e9157969deb 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni -@@ -291,7 +291,7 @@ template("chrome_paks") { +@@ -297,7 +297,7 @@ template("chrome_paks") { } input_locales = locales @@ -69,7 +69,7 @@ index 5121fa721a06..b5ab128722f0 100644 if (is_mac) { output_locales = locales_as_mac_outputs diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn -index 7d835183ab85..b8553902c1a9 100644 +index b2c99d4721dd..c8f870fa4a06 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn @@ -134,7 +134,7 @@ template("generate_mini_installer") { diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index beb4cf73d..436e79788 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,8 +1,8 @@ diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec -index cd531c9abd2d..b6eb6ed923a7 100644 +index f8e27f6df773..a9cf4203e104 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -586,4 +586,13 @@ +@@ -600,4 +600,13 @@ # Please read the header and find the right section above instead. # Resource ids starting at 31000 are reserved for projects built on Chromium. diff --git a/patch/patches/ime_1610.patch b/patch/patches/ime_1610.patch index e5e2b4c89..8dcc653fa 100644 --- a/patch/patches/ime_1610.patch +++ b/patch/patches/ime_1610.patch @@ -1,5 +1,5 @@ diff --git ui/base/ime/win/input_method_win_base.cc ui/base/ime/win/input_method_win_base.cc -index d88e691ee118..e89dade3ff04 100644 +index 83850840d83b..3d5ffcc54f1e 100644 --- ui/base/ime/win/input_method_win_base.cc +++ ui/base/ime/win/input_method_win_base.cc @@ -263,8 +263,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const { diff --git a/patch/patches/linux_assets_path_1936.patch b/patch/patches/linux_assets_path_1936.patch index 3c5634117..3fac28057 100644 --- a/patch/patches/linux_assets_path_1936.patch +++ b/patch/patches/linux_assets_path_1936.patch @@ -1,5 +1,5 @@ diff --git content/browser/child_process_launcher_helper_linux.cc content/browser/child_process_launcher_helper_linux.cc -index ea5258a03f83..843f28411eea 100644 +index e53e60ef146f..9b6db4a69d41 100644 --- content/browser/child_process_launcher_helper_linux.cc +++ content/browser/child_process_launcher_helper_linux.cc @@ -164,7 +164,7 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( @@ -25,7 +25,7 @@ index 0aaed76c1dda..517c3d8b5772 100644 if (base::PathExists(sandbox_candidate)) sandbox_binary = sandbox_candidate; diff --git ui/gl/init/gl_initializer_x11.cc ui/gl/init/gl_initializer_x11.cc -index 995d4399165e..b0381d77a507 100644 +index d9190a957ca2..50bb49eaf56c 100644 --- ui/gl/init/gl_initializer_x11.cc +++ ui/gl/init/gl_initializer_x11.cc @@ -86,7 +86,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { diff --git a/patch/patches/linux_gtk_2014.patch b/patch/patches/linux_gtk_2014.patch deleted file mode 100644 index 98593e0c9..000000000 --- a/patch/patches/linux_gtk_2014.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn -index 7d23fc08f7ea..24a41cf936da 100644 ---- chrome/test/BUILD.gn -+++ chrome/test/BUILD.gn -@@ -4852,7 +4852,7 @@ test("unit_tests") { - if (use_gio) { - configs += [ "//build/linux:gio_config" ] - } -- if (!is_chromeos && !use_ozone && is_linux) { -+ if (!is_chromeos && !use_ozone && is_linux && use_gtk) { - deps += [ "//chrome/browser/ui/gtk" ] - } - -@@ -5833,7 +5833,7 @@ if (!is_android) { - # suites, it seems like one or another starts timing out too. - "../browser/ui/views/keyboard_access_browsertest.cc", - ] -- if (!use_ozone) { -+ if (!use_ozone && use_gtk) { - sources += - [ "../browser/ui/gtk/select_file_dialog_interactive_uitest.cc" ] - deps += [ "//build/config/linux/gtk" ] diff --git a/patch/patches/linux_poll_2466.patch b/patch/patches/linux_poll_2466.patch index 3590e8f7c..1ffb92f7a 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 51cecad2eb04..004054491187 100644 +index 563e08067585..3200fa658457 100644 --- base/files/file_path_watcher_linux.cc +++ base/files/file_path_watcher_linux.cc @@ -5,6 +5,7 @@ @@ -18,7 +18,7 @@ index 51cecad2eb04..004054491187 100644 #include #include #include -@@ -263,22 +265,15 @@ void InotifyReaderThreadDelegate::ThreadMain() { +@@ -263,8 +265,10 @@ void InotifyReaderThreadDelegate::ThreadMain() { PlatformThread::SetName("inotify_reader"); // Make sure the file descriptors are good for use with select(). @@ -30,14 +30,11 @@ index 51cecad2eb04..004054491187 100644 + } }; while (true) { -- fd_set rfds; -- FD_ZERO(&rfds); -- FD_SET(inotify_fd_, &rfds); -- -- ScopedBlockingCall scoped_blocking_call(FROM_HERE, -- BlockingType::WILL_BLOCK); -- -- // Wait until some inotify events are available. + fd_set rfds; +@@ -272,10 +276,9 @@ void InotifyReaderThreadDelegate::ThreadMain() { + 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)); - if (select_result < 0) { diff --git a/patch/patches/mac_gpu.patch b/patch/patches/mac_gpu.patch index 2bf44f815..81234109d 100644 --- a/patch/patches/mac_gpu.patch +++ b/patch/patches/mac_gpu.patch @@ -1,5 +1,5 @@ diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc -index e486fb0d16e3..312ff3d3703c 100644 +index 0deebafe135f..fdbd9a7ecf17 100644 --- ui/gl/init/gl_initializer_mac.cc +++ ui/gl/init/gl_initializer_mac.cc @@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() { diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 11099f308..fc24bff7a 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -43,7 +43,7 @@ index 61b8c6fcc42d..d439b00a87bb 100644 #if !defined(OS_NACL) diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 3e9562cc4cc5..cf4a700364d3 100644 +index 8f6258f7644a..9c356dea5234 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -2,6 +2,7 @@ diff --git a/patch/patches/mime_handler_view_guest_1565_2727.patch b/patch/patches/mime_handler_view_guest_1565_2727.patch index aeaee7599..34fe80dea 100644 --- a/patch/patches/mime_handler_view_guest_1565_2727.patch +++ b/patch/patches/mime_handler_view_guest_1565_2727.patch @@ -1,5 +1,5 @@ diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h -index 4c5fb180bf82..f97991e11694 100644 +index c0cd19506973..956d80443c11 100644 --- content/browser/web_contents/web_contents_view.h +++ content/browser/web_contents/web_contents_view.h @@ -23,7 +23,7 @@ struct DropData; diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index b0a35b0eb..5dbcd1151 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 954011b5d562..da67cd106cec 100644 +index 40b9e634b8bf..4d2401533577 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -2606,6 +2606,11 @@ void RenderWidgetHostImpl::DidStartScrollingViewport() { +@@ -2671,6 +2671,11 @@ void RenderWidgetHostImpl::DidStartScrollingViewport() { view_->set_is_currently_scrolling_viewport(true); } @@ -57,10 +57,10 @@ index 954011b5d562..da67cd106cec 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 9faf49a3fd83..26c6845c53c3 100644 +index b6f95fdfa88b..73ab5a676373 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h -@@ -701,6 +701,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -709,6 +709,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl void ProgressFlingIfNeeded(base::TimeTicks current_time); void StopFling(); diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index b383a808b..be1ab631e 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -1,8 +1,8 @@ diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h -index fe4ca0fafd45..025424a1654c 100644 +index 1df0ec456eca..ca472453aef2 100644 --- content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h -@@ -178,6 +178,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) +@@ -177,6 +177,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) @@ -11,7 +11,7 @@ index fe4ca0fafd45..025424a1654c 100644 IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc -index b982618bef48..075efffc1ad7 100644 +index 8d1b50f56adf..1e1ad9227ce0 100644 --- content/public/common/web_preferences.cc +++ content/public/common/web_preferences.cc @@ -165,6 +165,7 @@ WebPreferences::WebPreferences() @@ -23,10 +23,10 @@ index b982618bef48..075efffc1ad7 100644 record_whole_document(false), cookie_enabled(true), diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h -index 04c03cfcb774..4f5488ef1699 100644 +index 76cb05a11674..355c32dd6c55 100644 --- content/public/common/web_preferences.h +++ content/public/common/web_preferences.h -@@ -180,6 +180,7 @@ struct CONTENT_EXPORT WebPreferences { +@@ -181,6 +181,7 @@ struct CONTENT_EXPORT WebPreferences { bool spatial_navigation_enabled; bool caret_browsing_enabled; bool navigate_on_drag_drop; @@ -35,10 +35,10 @@ index 04c03cfcb774..4f5488ef1699 100644 bool record_whole_document; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc -index bd44565e78aa..dcb7bbd6d875 100644 +index 9c452f46c9a1..018190efd2b4 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc -@@ -968,6 +968,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, +@@ -962,6 +962,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, #endif WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available); diff --git a/patch/patches/print_preview_123.patch b/patch/patches/print_preview_123.patch index 3ec9d0138..c0bcfc9db 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 c880e6ba1766..d168a5fb44bb 100644 +index 332aa3a417e8..094523fc1d6b 100644 --- chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc @@ -22,6 +22,7 @@ @@ -34,7 +34,7 @@ index c880e6ba1766..d168a5fb44bb 100644 bool DownloadPrefs::IsFromTrustedSource(const download::DownloadItem& item) { diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc -index 8c2609b8447c..f113149a30e8 100644 +index 84818167bce1..cdbd3f7f6f27 100644 --- chrome/browser/printing/print_preview_dialog_controller.cc +++ chrome/browser/printing/print_preview_dialog_controller.cc @@ -16,6 +16,7 @@ @@ -45,7 +45,7 @@ index 8c2609b8447c..f113149a30e8 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" #include "chrome/browser/printing/print_view_manager.h" -@@ -450,8 +451,11 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog( +@@ -451,8 +452,11 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog( content::HostZoomMap::Get(preview_dialog->GetSiteInstance()) ->SetZoomLevelForHostAndScheme(print_url.scheme(), print_url.host(), 0); PrintViewManager::CreateForWebContents(preview_dialog); @@ -112,10 +112,10 @@ index b59728f623e3..6fd443962836 100644 ConstrainedWebDialogUI::~ConstrainedWebDialogUI() { diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc -index c87e8694d1fa..af5f4126fd3d 100644 +index 394ce8f66012..fe0e14e27fd1 100644 --- chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc +++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc -@@ -177,8 +177,10 @@ PdfPrinterHandler::PdfPrinterHandler( +@@ -178,8 +178,10 @@ PdfPrinterHandler::PdfPrinterHandler( sticky_settings_(sticky_settings) {} PdfPrinterHandler::~PdfPrinterHandler() { @@ -126,7 +126,7 @@ index c87e8694d1fa..af5f4126fd3d 100644 } void PdfPrinterHandler::Reset() { -@@ -227,12 +229,14 @@ void PdfPrinterHandler::StartPrint( +@@ -226,12 +228,14 @@ void PdfPrinterHandler::StartPrint( return; } @@ -141,7 +141,7 @@ index c87e8694d1fa..af5f4126fd3d 100644 DCHECK(!print_callback_); print_callback_ = std::move(callback); -@@ -372,7 +376,11 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename, +@@ -370,7 +374,11 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename, // If the directory is empty there is no reason to create it or use the // default location. if (path.empty()) { @@ -153,9 +153,9 @@ index c87e8694d1fa..af5f4126fd3d 100644 return; } -@@ -383,8 +391,14 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename, - FROM_HERE, - {base::ThreadPool(), base::MayBlock(), base::TaskPriority::BEST_EFFORT}, +@@ -380,8 +388,14 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename, + base::ThreadPool::PostTaskAndReplyWithResult( + FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT}, base::BindOnce(&SelectSaveDirectory, path, default_path), +#if !BUILDFLAG(ENABLE_CEF) base::BindOnce(&PdfPrinterHandler::OnDirectorySelected, @@ -168,7 +168,7 @@ index c87e8694d1fa..af5f4126fd3d 100644 } void PdfPrinterHandler::PostPrintToPdfTask() { -@@ -401,6 +415,7 @@ void PdfPrinterHandler::OnGotUniqueFileName(const base::FilePath& path) { +@@ -397,6 +411,7 @@ void PdfPrinterHandler::OnGotUniqueFileName(const base::FilePath& path) { FileSelected(path, 0, nullptr); } @@ -176,7 +176,7 @@ index c87e8694d1fa..af5f4126fd3d 100644 void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename, const base::FilePath& directory) { base::FilePath path = directory.Append(filename); -@@ -425,5 +440,36 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename, +@@ -421,5 +436,36 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename, &file_type_info, 0, base::FilePath::StringType(), platform_util::GetTopLevel(preview_web_contents_->GetNativeView()), NULL); } @@ -262,7 +262,7 @@ index 0881b3dd9303..4df6883d4d05 100644 Profile* const profile_; PrintPreviewStickySettings* const sticky_settings_; diff --git chrome/browser/ui/webui/print_preview/print_preview_handler.cc chrome/browser/ui/webui/print_preview/print_preview_handler.cc -index b5370dedff93..e9966c08b4f8 100644 +index c0823ff96ee0..1897338ee4e6 100644 --- chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc @@ -27,6 +27,7 @@ @@ -273,7 +273,7 @@ index b5370dedff93..e9966c08b4f8 100644 #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/bad_message.h" #include "chrome/browser/browser_process.h" -@@ -1149,7 +1150,7 @@ void PrintPreviewHandler::SendInitialSettings( +@@ -1146,7 +1147,7 @@ void PrintPreviewHandler::SendInitialSettings( initial_settings.SetKey(kPolicies, std::move(policies)); if (IsCloudPrintEnabled() && @@ -282,7 +282,7 @@ index b5370dedff93..e9966c08b4f8 100644 initial_settings.SetStringKey( kCloudPrintURL, GURL(cloud_devices::GetCloudPrintURL()).spec()); } -@@ -1414,6 +1415,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( +@@ -1411,6 +1412,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( } return privet_printer_handler_.get(); } @@ -292,7 +292,7 @@ index b5370dedff93..e9966c08b4f8 100644 #endif if (printer_type == PrinterType::kPdfPrinter) { if (!pdf_printer_handler_) { -@@ -1433,7 +1437,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( +@@ -1430,7 +1434,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( if (printer_type == PrinterType::kCloudPrinter) { // This printer handler is currently experimental. Ensure it is never // created unless the flag is enabled. @@ -301,7 +301,7 @@ index b5370dedff93..e9966c08b4f8 100644 if (!cloud_printer_handler_) cloud_printer_handler_ = PrinterHandler::CreateForCloudPrinters(); return cloud_printer_handler_.get(); -@@ -1496,6 +1500,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id, +@@ -1493,6 +1497,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id, } void PrintPreviewHandler::RegisterForGaiaCookieChanges() { @@ -309,7 +309,7 @@ index b5370dedff93..e9966c08b4f8 100644 DCHECK(!identity_manager_); cloud_print_enabled_ = !base::Contains(printer_type_deny_list_, kCloudPrinter) && -@@ -1512,6 +1517,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() { +@@ -1509,6 +1514,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() { identity_manager_ = IdentityManagerFactory::GetForProfile(profile); identity_manager_->AddObserver(this); @@ -318,7 +318,7 @@ index b5370dedff93..e9966c08b4f8 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 758f61539d5e..37cd13836464 100644 +index 4e2e925da7c9..b4c622ce6c7f 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -24,6 +24,7 @@ @@ -329,7 +329,7 @@ index 758f61539d5e..37cd13836464 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process_platform_part.h" #include "chrome/browser/printing/background_printing_manager.h" -@@ -77,12 +78,16 @@ namespace printing { +@@ -76,12 +77,16 @@ namespace printing { namespace { @@ -346,7 +346,7 @@ index 758f61539d5e..37cd13836464 100644 #if !BUILDFLAG(OPTIMIZE_WEBUI) constexpr char kGeneratedPath[] = -@@ -335,7 +340,7 @@ void AddPrintPreviewFlags(content::WebUIDataSource* source, Profile* profile) { +@@ -334,7 +339,7 @@ void AddPrintPreviewFlags(content::WebUIDataSource* source, Profile* profile) { source->AddBoolean("isEnterpriseManaged", enterprise_managed); bool cloud_printer_handler_enabled = diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index a5414301b..99af9bc1d 100644 --- a/patch/patches/printing_context_2196.patch +++ b/patch/patches/printing_context_2196.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc -index ebffdb08d080..864841b470e3 100644 +index 33e17f0df356..04dd4798755c 100644 --- chrome/browser/printing/print_job_worker.cc +++ chrome/browser/printing/print_job_worker.cc -@@ -133,6 +133,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id) +@@ -134,6 +134,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id) PrintingContext::Create(printing_context_delegate_.get())), thread_("Printing_Worker") { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); diff --git a/patch/patches/renderer_preferences_util_545103.patch b/patch/patches/renderer_preferences_util_545103.patch index c1ce0dd67..8d87c5b45 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 f7ce4ce22bb7..27363d09cb7b 100644 +index 776c050ad31b..5107091f62b4 100644 --- chrome/browser/renderer_preferences_util.cc +++ chrome/browser/renderer_preferences_util.cc @@ -31,7 +31,8 @@ diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index 4f0e9f1a7..a252da46c 100644 --- a/patch/patches/rwh_background_color_1984.patch +++ b/patch/patches/rwh_background_color_1984.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc -index 80c67b78d9f6..6ca0fb1aaf85 100644 +index bef2f08dce2d..87c33b3d0d08 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -736,10 +736,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { +@@ -745,10 +745,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -19,7 +19,7 @@ index 80c67b78d9f6..6ca0fb1aaf85 100644 } void RenderWidgetHostViewAura::WindowTitleChanged() { -@@ -2013,6 +2015,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2024,6 +2026,15 @@ 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/service_manager_654986.patch b/patch/patches/service_manager_654986.patch index 3d2620d5d..1a16c4662 100644 --- a/patch/patches/service_manager_654986.patch +++ b/patch/patches/service_manager_654986.patch @@ -1,8 +1,21 @@ +diff --git base/memory/shared_memory_hooks.h base/memory/shared_memory_hooks.h +index 4404b54c22a4..fa3138003032 100644 +--- base/memory/shared_memory_hooks.h ++++ base/memory/shared_memory_hooks.h +@@ -24,7 +24,7 @@ class SharedMemoryHooks { + + private: + friend class SharedMemoryHooksTest; +- friend int service_manager::Main(const service_manager::MainParams&); ++ friend int service_manager::MainInitialize(service_manager::MainParams&); + + // Allows shared memory region creation to be hooked. Useful for sandboxed + // processes that are restricted from invoking the platform APIs directly. diff --git services/service_manager/embedder/main.cc services/service_manager/embedder/main.cc -index 53e9e0aafc49..20b13ebc17b5 100644 +index b338bbff49ff..a0645251504b 100644 --- services/service_manager/embedder/main.cc +++ services/service_manager/embedder/main.cc -@@ -241,22 +241,36 @@ int RunService(MainDelegate* delegate) { +@@ -244,22 +244,36 @@ int RunService(MainDelegate* delegate) { return 0; } @@ -43,7 +56,7 @@ index 53e9e0aafc49..20b13ebc17b5 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 -@@ -342,12 +356,7 @@ int Main(const MainParams& params) { +@@ -345,12 +359,7 @@ int Main(const MainParams& params) { MainDelegate::InitializeParams init_params; #if defined(OS_MACOSX) @@ -57,7 +70,7 @@ index 53e9e0aafc49..20b13ebc17b5 100644 InitializeMac(); #endif -@@ -391,18 +400,16 @@ int Main(const MainParams& params) { +@@ -423,18 +432,16 @@ int Main(const MainParams& params) { } } @@ -85,7 +98,7 @@ index 53e9e0aafc49..20b13ebc17b5 100644 switch (process_type) { case ProcessType::kDefault: NOTREACHED(); -@@ -424,6 +431,8 @@ int Main(const MainParams& params) { +@@ -456,6 +463,8 @@ int Main(const MainParams& params) { break; } @@ -94,7 +107,7 @@ index 53e9e0aafc49..20b13ebc17b5 100644 if (tracker) { if (exit_code == 0) { tracker->SetProcessPhaseIfEnabled( -@@ -435,13 +444,38 @@ int Main(const MainParams& params) { +@@ -467,13 +476,38 @@ int Main(const MainParams& params) { } } diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index 6d497729e..f31157700 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,16 +1,16 @@ diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc -index 75981a42a314..d29366145453 100644 +index 44ce8ba980a6..1dbbf0aa2341 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc -@@ -17,6 +17,7 @@ - #include "base/metrics/histogram_macros.h" +@@ -18,6 +18,7 @@ #include "base/strings/string_split.h" #include "base/task/post_task.h" + #include "base/task/thread_pool.h" +#include "cef/libcef/features/features.h" #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" -@@ -678,9 +679,22 @@ ProfileNetworkContextService::CreateNetworkContextParams( +@@ -681,9 +682,22 @@ ProfileNetworkContextService::CreateNetworkContextParams( network_context_params->cookie_manager_params = CreateCookieManagerParams(profile_, *cookie_settings_); @@ -33,7 +33,7 @@ index 75981a42a314..d29366145453 100644 PrefService* local_state = g_browser_process->local_state(); // Configure the HTTP cache path and size. base::FilePath base_cache_path; -@@ -693,6 +707,7 @@ ProfileNetworkContextService::CreateNetworkContextParams( +@@ -696,6 +710,7 @@ ProfileNetworkContextService::CreateNetworkContextParams( base_cache_path.Append(chrome::kCacheDirname); network_context_params->http_cache_max_size = local_state->GetInteger(prefs::kDiskCacheSize); @@ -42,10 +42,10 @@ index 75981a42a314..d29366145453 100644 // Currently this just contains HttpServerProperties, but that will likely // change. diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h -index 442d72296903..aec40aa4b77d 100644 +index ee2f1e1baf51..4d53c655d723 100644 --- chrome/browser/profiles/profile.h +++ chrome/browser/profiles/profile.h -@@ -380,6 +380,11 @@ class Profile : public content::BrowserContext { +@@ -375,6 +375,11 @@ class Profile : public content::BrowserContext { virtual bool ShouldRestoreOldSessionCookies(); virtual bool ShouldPersistSessionCookies(); @@ -117,7 +117,7 @@ index 996ad7d14dfb..5c8e43c1d29c 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 5dbc9d2dfcfb..1c31d97825c2 100644 +index d1bf7a4d1f6d..772e08ee8916 100644 --- services/network/cookie_manager.cc +++ services/network/cookie_manager.cc @@ -228,14 +228,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { @@ -139,10 +139,10 @@ index 5dbc9d2dfcfb..1c31d97825c2 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index e5dfb9c6fd20..07578a987dd9 100644 +index 05bd6dc34b94..26bd748ad4b6 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -1765,6 +1765,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1785,6 +1785,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { } scoped_refptr session_cleanup_cookie_store; @@ -150,7 +150,7 @@ index e5dfb9c6fd20..07578a987dd9 100644 if (params_->cookie_path) { scoped_refptr client_task_runner = base::ThreadTaskRunnerHandle::Get(); -@@ -1792,18 +1793,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1811,18 +1812,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { session_cleanup_cookie_store = base::MakeRefCounted(sqlite_store); @@ -165,27 +165,26 @@ index e5dfb9c6fd20..07578a987dd9 100644 } else { DCHECK(!params_->restore_old_session_cookies); DCHECK(!params_->persist_session_cookies); -+ + cookie_store = + std::make_unique(nullptr /* store */, net_log); - } - ++ } ++ + if (params_->cookieable_schemes.has_value()) { + cookie_store->SetCookieableSchemes( + *params_->cookieable_schemes, + net::CookieStore::SetCookieableSchemesCallback()); -+ } -+ + } + + builder.SetCookieStore(std::move(cookie_store)); + - std::unique_ptr user_agent_settings = - std::make_unique( - params_->accept_language, params_->user_agent); + #if BUILDFLAG(IS_TRUST_TOKENS_SUPPORTED) + if (base::FeatureList::IsEnabled(features::kTrustTokens)) { + if (params_->trust_token_path) { diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index c37e71fb1eac..3504614682bb 100644 +index b74677de805c..b67a2d246e65 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom -@@ -243,6 +243,9 @@ struct NetworkContextParams { +@@ -253,6 +253,9 @@ struct NetworkContextParams { // cookies. Otherwise it should be false. bool persist_session_cookies = false; diff --git a/patch/patches/services_network_2718.patch b/patch/patches/services_network_2718.patch index 707487f8c..120d401c6 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 5283293ac557..407de9a5e23a 100644 +index e76b66dace82..94a5f80a9b42 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -669,10 +669,6 @@ class LoginHandlerDelegate { +@@ -780,10 +780,6 @@ class LoginHandlerDelegate { } WebContents* web_contents = web_contents_getter_.Run(); @@ -13,7 +13,7 @@ index 5283293ac557..407de9a5e23a 100644 // WeakPtr is not strictly necessary here due to OnRequestCancelled. creating_login_delegate_ = true; -@@ -729,12 +725,6 @@ void OnAuthRequiredContinuation( +@@ -840,12 +836,6 @@ void OnAuthRequiredContinuation( web_contents_getter = base::BindRepeating(GetWebContents, process_id, routing_id); } @@ -26,7 +26,7 @@ index 5283293ac557..407de9a5e23a 100644 new LoginHandlerDelegate(std::move(auth_challenge_responder), std::move(web_contents_getter), auth_info, is_request_for_main_frame, process_id, routing_id, -@@ -2411,15 +2401,21 @@ void StoragePartitionImpl::GetQuotaSettings( +@@ -2573,15 +2563,21 @@ void StoragePartitionImpl::GetQuotaSettings( return; } diff --git a/patch/patches/services_network_initiator_lock_1051674.patch b/patch/patches/services_network_initiator_lock_1051674.patch deleted file mode 100644 index 04436e735..000000000 --- a/patch/patches/services_network_initiator_lock_1051674.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git services/network/public/cpp/initiator_lock_compatibility.cc services/network/public/cpp/initiator_lock_compatibility.cc -index 3215c667d8a1..c305faab1e0d 100644 ---- services/network/public/cpp/initiator_lock_compatibility.cc -+++ services/network/public/cpp/initiator_lock_compatibility.cc -@@ -37,20 +37,26 @@ InitiatorLockCompatibility VerifyRequestInitiatorLock( - if (initiator.opaque() || (initiator == lock)) - return InitiatorLockCompatibility::kCompatibleLock; - -- // TODO(lukasza, nasko): https://crbug.com/888079: Return kIncorrectLock if -+ // TODO(lukasza): https://crbug.com/891872: Return kIncorrectLock if - // the origins do not match exactly in the previous if statement. This should -- // be possible to do once we no longer fall back to site_url and have -- // request_initiator_*origin*_lock instead. In practice, the fallback can go -- // away after we no longer vend process-wide factory: https://crbug.com/891872 -+ // be possible to do once we no longer vend process-wide factory. - if (!initiator.opaque() && !lock.opaque() && - initiator.scheme() == lock.scheme() && -- initiator.GetURL().SchemeIsHTTPOrHTTPS() && -- !initiator.GetURL().HostIsIPAddress()) { -- std::string lock_domain = lock.host(); -- if (!lock_domain.empty() && lock_domain.back() == '.') -- lock_domain.erase(lock_domain.length() - 1); -- if (initiator.DomainIs(lock_domain)) -- return InitiatorLockCompatibility::kCompatibleLock; -+ initiator.GetURL().SchemeIsHTTPOrHTTPS()) { -+ if (initiator.GetURL().HostIsIPAddress()) { -+ // For IP addresses, we require host equality (allowing ports to differ, -+ // since site_url ignores ports). See also https://crbug.com/1051674. -+ if (initiator.host() == lock.host()) -+ return InitiatorLockCompatibility::kCompatibleLock; -+ } else { -+ // For non-IP-address origins, we require sites (eTLD+1) to match -+ // (again ignoring ports). -+ std::string lock_domain = lock.host(); -+ if (!lock_domain.empty() && lock_domain.back() == '.') -+ lock_domain.erase(lock_domain.length() - 1); -+ if (initiator.DomainIs(lock_domain)) -+ return InitiatorLockCompatibility::kCompatibleLock; -+ } - } - - return InitiatorLockCompatibility::kIncorrectLock; diff --git a/patch/patches/set_resize_background_color.patch b/patch/patches/set_resize_background_color.patch index 9b66bf37e..4652611ef 100644 --- a/patch/patches/set_resize_background_color.patch +++ b/patch/patches/set_resize_background_color.patch @@ -39,10 +39,10 @@ index 2a6cfc54d866..48623ab5d672 100644 }; diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc -index 982ab4872532..e24c59e4e363 100644 +index 9a9f2505f15f..8cd5198e0304 100644 --- ui/views/controls/webview/webview.cc +++ ui/views/controls/webview/webview.cc -@@ -112,6 +112,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, +@@ -126,6 +126,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, MaybeEnableAutoResize(); } @@ -54,10 +54,10 @@ index 982ab4872532..e24c59e4e363 100644 if (crashed_overlay_view_ == crashed_overlay_view) return; diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h -index 9872ad3c2f42..d71c546d1a38 100644 +index 84d5cd520f7a..c7a2c7644c4f 100644 --- ui/views/controls/webview/webview.h +++ ui/views/controls/webview/webview.h -@@ -80,6 +80,10 @@ class WEBVIEW_EXPORT WebView : public View, +@@ -82,6 +82,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 d748614f5..4f72ac437 100644 --- a/patch/patches/storage_incognito_2289.patch +++ b/patch/patches/storage_incognito_2289.patch @@ -1,22 +1,22 @@ diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc -index 33a732dab0e8..99ecf91a66a5 100644 +index f90e9fce0675..33551a2874bc 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc -@@ -116,7 +116,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( +@@ -117,7 +117,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( // If we're not incognito mode, schedule all of our file tasks to enable // disk on the storage context. - if (!context->IsOffTheRecord() && io_thread_valid) { + if (!context->GetPath().empty() && !context->IsOffTheRecord() && + io_thread_valid) { - file_task_runner = base::CreateTaskRunner( - {base::ThreadPool(), base::MayBlock(), - base::TaskPriority::USER_VISIBLE, + file_task_runner = base::ThreadPool::CreateTaskRunner( + {base::MayBlock(), base::TaskPriority::USER_VISIBLE, + base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}); diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index 44e6a961112b..f1f3e1af7f16 100644 +index 25afe1eda95e..78310ebd061d 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc -@@ -59,6 +59,7 @@ +@@ -58,6 +58,7 @@ #include "content/public/common/content_switches.h" #include "content/public/common/service_manager_connection.h" #include "content/public/common/service_names.mojom.h" @@ -24,7 +24,7 @@ index 44e6a961112b..f1f3e1af7f16 100644 #include "media/base/media_switches.h" #include "media/capabilities/in_memory_video_decode_stats_db_impl.h" #include "media/capabilities/video_decode_stats_db_impl.h" -@@ -170,7 +171,7 @@ StoragePartition* GetStoragePartitionFromConfig( +@@ -169,7 +170,7 @@ StoragePartition* GetStoragePartitionFromConfig( StoragePartitionImplMap* partition_map = GetStoragePartitionMap(browser_context); @@ -33,7 +33,7 @@ index 44e6a961112b..f1f3e1af7f16 100644 in_memory = true; return partition_map->Get(partition_domain, partition_name, in_memory, -@@ -675,7 +676,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() { +@@ -673,7 +674,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() { kUseInMemoryDBDefault); std::unique_ptr stats_db; @@ -43,10 +43,10 @@ index 44e6a961112b..f1f3e1af7f16 100644 std::make_unique(nullptr); } else { diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc -index d4cb25f0b5c5..46a145e175e6 100644 +index 41dc6c9ac188..b125c1d2bcc8 100644 --- storage/browser/database/database_tracker.cc +++ storage/browser/database/database_tracker.cc -@@ -509,7 +509,7 @@ bool DatabaseTracker::LazyInit() { +@@ -506,7 +506,7 @@ bool DatabaseTracker::LazyInit() { meta_table_.reset(new sql::MetaTable()); is_initialized_ = diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index bab285c40..9b159d704 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 bf408c6bff28..74668e88a885 100644 +index 6f07209af5dc..9f97108c8c31 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h @@ -52,6 +52,8 @@ diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index ea473c21b..97e8a3d56 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -39,10 +39,10 @@ index 5bcc6204c2b5..1bf18609d150 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index 6a97b1501d3d..3ac88ea133fc 100644 +index dcaacc840f3a..602cb6b03c0c 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc -@@ -611,6 +611,14 @@ void RenderText::SetWhitespaceElision(base::Optional whitespace_elision) { +@@ -609,6 +609,14 @@ void RenderText::SetWhitespaceElision(base::Optional whitespace_elision) { } } @@ -57,7 +57,7 @@ index 6a97b1501d3d..3ac88ea133fc 100644 void RenderText::SetDisplayRect(const Rect& r) { if (r != display_rect_) { display_rect_ = r; -@@ -1964,6 +1972,19 @@ void RenderText::OnTextAttributeChanged() { +@@ -1987,6 +1995,19 @@ void RenderText::OnTextAttributeChanged() { layout_text_up_to_date_ = false; @@ -78,7 +78,7 @@ index 6a97b1501d3d..3ac88ea133fc 100644 } diff --git ui/gfx/render_text.h ui/gfx/render_text.h -index 892b32910b77..0d3c4ef5cafa 100644 +index 3e554d265299..1596aa1f873e 100644 --- ui/gfx/render_text.h +++ ui/gfx/render_text.h @@ -324,6 +324,10 @@ class GFX_EXPORT RenderText { @@ -102,10 +102,10 @@ index 892b32910b77..0d3c4ef5cafa 100644 }; diff --git ui/views/animation/ink_drop_host_view.h ui/views/animation/ink_drop_host_view.h -index 846a4a7f09de..aded39658834 100644 +index b711c5f08f80..d0d428057e5d 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 { +@@ -138,6 +138,8 @@ class VIEWS_EXPORT InkDropHostView : public View { // this isn't necessary anymore. virtual InkDrop* GetInkDrop(); @@ -115,10 +115,10 @@ index 846a4a7f09de..aded39658834 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 12c05efa8c12..eb9c49125501 100644 +index 76864b91df6d..f9b61ee10b1e 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc -@@ -494,6 +494,12 @@ void LabelButton::OnThemeChanged() { +@@ -479,6 +479,12 @@ void LabelButton::OnThemeChanged() { SchedulePaint(); } @@ -132,10 +132,10 @@ index 12c05efa8c12..eb9c49125501 100644 const gfx::Size previous_image_size(image_->GetPreferredSize()); UpdateImage(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index ba9f5f8cd8c7..f1ab98728425 100644 +index ac348aa7dd46..88ab098daddc 100644 --- ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h -@@ -123,6 +123,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { +@@ -124,6 +124,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { ui::NativeTheme::State GetForegroundThemeState( ui::NativeTheme::ExtraParams* params) const override; @@ -146,7 +146,7 @@ index ba9f5f8cd8c7..f1ab98728425 100644 ImageView* image() const { return image_; } Label* label() const { return label_; } diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index be8d8e8dddf9..6e5efacde451 100644 +index 7749c52c1cf0..487099b3559d 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc @@ -53,6 +53,20 @@ bool IsOpaque(SkColor color) { @@ -170,7 +170,7 @@ index be8d8e8dddf9..6e5efacde451 100644 } // namespace namespace views { -@@ -309,6 +323,14 @@ base::string16 Label::GetTooltipText() const { +@@ -310,6 +324,14 @@ base::string16 Label::GetTooltipText() const { return tooltip_text_; } @@ -185,7 +185,7 @@ index be8d8e8dddf9..6e5efacde451 100644 void Label::SetTooltipText(const base::string16& tooltip_text) { DCHECK(handles_tooltips_); if (tooltip_text_ == tooltip_text) -@@ -583,7 +605,19 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -587,7 +609,19 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SetFontList(font_list()); render_text->set_shadows(GetShadows()); render_text->SetCursorEnabled(false); @@ -207,10 +207,10 @@ index be8d8e8dddf9..6e5efacde451 100644 render_text->SetMultiline(multiline); render_text->SetMaxLines(multiline ? GetMaxLines() : 0); diff --git ui/views/controls/label.h ui/views/controls/label.h -index d6e1ad61e5e1..5abc861469c8 100644 +index 4cb533caa9c7..63eac79c878c 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h -@@ -176,6 +176,10 @@ class VIEWS_EXPORT Label : public View, +@@ -177,6 +177,10 @@ class VIEWS_EXPORT Label : public View, gfx::ElideBehavior GetElideBehavior() const; void SetElideBehavior(gfx::ElideBehavior elide_behavior); @@ -221,10 +221,10 @@ index d6e1ad61e5e1..5abc861469c8 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 -@@ -412,6 +416,7 @@ class VIEWS_EXPORT Label : public View, - bool collapse_when_hidden_; - int fixed_width_; - int max_width_; +@@ -413,6 +417,7 @@ class VIEWS_EXPORT Label : public View, + bool collapse_when_hidden_ = false; + int fixed_width_ = 0; + int max_width_ = 0; + int draw_strings_flags_ = 0; std::unique_ptr selection_controller_; @@ -261,7 +261,7 @@ index 36e7f97887fd..940fb3d8a338 100644 SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); else if (item->GetParentMenuItem()->GetParentMenuItem()) diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h -index bdbd9c7e37b8..86138fd1d21c 100644 +index 2a03ff43f4a6..c12d68eb212c 100644 --- ui/views/controls/menu/menu_delegate.h +++ ui/views/controls/menu/menu_delegate.h @@ -81,6 +81,22 @@ class VIEWS_EXPORT MenuDelegate { @@ -287,7 +287,7 @@ index bdbd9c7e37b8..86138fd1d21c 100644 // The tooltip shown for the menu item. This is invoked when the user // hovers over the item, and no tooltip text has been set for that item. virtual base::string16 GetTooltipText(int id, -@@ -208,6 +224,11 @@ class VIEWS_EXPORT MenuDelegate { +@@ -207,6 +223,11 @@ class VIEWS_EXPORT MenuDelegate { bool* has_mnemonics, MenuButton** button); @@ -300,10 +300,10 @@ index bdbd9c7e37b8..86138fd1d21c 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 07fc2153d8ad..f3fce1b3fd88 100644 +index c67fc8503db7..604c8e29f5e3 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -1035,6 +1035,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1036,6 +1036,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); @@ -319,7 +319,7 @@ index 07fc2153d8ad..f3fce1b3fd88 100644 } else if (render_selection) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == Type::kActionableSubMenu) { -@@ -1102,6 +1111,13 @@ void MenuItemView::PaintMinorIconAndText( +@@ -1103,6 +1112,13 @@ void MenuItemView::PaintMinorIconAndText( } SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const { @@ -334,10 +334,10 @@ index 07fc2153d8ad..f3fce1b3fd88 100644 GetMenuController() && GetMenuController()->use_touchable_layout() ? style::CONTEXT_TOUCH_MENU diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc -index 792b864594b3..58015004ac44 100644 +index 373ea41937fe..8d13cab6916b 100644 --- ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc -@@ -229,6 +229,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const { +@@ -228,6 +228,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const { return false; } @@ -441,10 +441,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 2bd5d97fccea..996b94916a15 100644 +index a1d302f3d5d5..d83ad955da37 100644 --- ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc -@@ -189,6 +189,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) +@@ -187,6 +187,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) scroll_down_button_ = AddChildView(std::make_unique(content_view, false)); @@ -457,10 +457,10 @@ index 2bd5d97fccea..996b94916a15 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 6e69e4018a3b..f44fadcbb4c1 100644 +index 3c483dffc6c8..203e3b62c385 100644 --- ui/views/test/ui_controls_factory_desktop_aurax11.cc +++ ui/views/test/ui_controls_factory_desktop_aurax11.cc -@@ -144,10 +144,6 @@ class UIControlsDesktopX11 : public UIControlsAura { +@@ -134,10 +134,6 @@ class UIControlsDesktopX11 : public UIControlsAura { aura::test::QueryLatestMousePositionRequestInHost(host); host->ConvertPixelsToDIP(&root_current_location); @@ -472,22 +472,22 @@ index 6e69e4018a3b..f44fadcbb4c1 100644 // Move the cursor because EnterNotify/LeaveNotify are generated with the // current mouse position as a result of XGrabPointer() diff --git ui/views/view.h ui/views/view.h -index be4814ab5df3..dcddea54b813 100644 +index b1dfe17e2b28..87480a766437 100644 --- ui/views/view.h +++ ui/views/view.h -@@ -22,6 +22,7 @@ - #include "base/i18n/rtl.h" +@@ -23,6 +23,7 @@ #include "base/logging.h" #include "base/macros.h" + #include "base/memory/ptr_util.h" +#include "base/supports_user_data.h" #include "build/build_config.h" #include "third_party/skia/include/core/SkPath.h" #include "ui/accessibility/ax_enums.mojom-forward.h" @@ -273,6 +274,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, + public ui::EventTarget, public ui::EventHandler, public ui::PropertyHandler, - public metadata::MetaDataProvider, + public base::SupportsUserData, - public virtual WidgetGetter { + public views::metadata::MetaDataProvider { public: using Views = std::vector; diff --git a/patch/patches/views_widget_180_1481_1565_1677_1749.patch b/patch/patches/views_widget_180_1481_1565_1677_1749.patch index 2f128838e..c50998c70 100644 --- a/patch/patches/views_widget_180_1481_1565_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1565_1677_1749.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index 95724e75d7c9..1b39dd036bc1 100644 +index 6fc2ae557a26..0a704d1453a2 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -568,6 +568,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() { +@@ -564,6 +564,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() { return screen_info.device_scale_factor; } @@ -18,10 +18,10 @@ index 95724e75d7c9..1b39dd036bc1 100644 return renderer_frame_number_; } diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h -index 226e7c96a2b7..a00d3a66d913 100644 +index fca7a56a4b7f..3691f64f2f95 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; +@@ -65,6 +65,7 @@ class CursorManager; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; class RenderWidgetHostViewBaseObserver; @@ -29,7 +29,7 @@ index 226e7c96a2b7..a00d3a66d913 100644 class SyntheticGestureTarget; class TextInputManager; class TouchSelectionControllerClientManager; -@@ -83,6 +84,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -82,6 +83,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase float current_device_scale_factor() const { return current_device_scale_factor_; } @@ -39,7 +39,7 @@ index 226e7c96a2b7..a00d3a66d913 100644 // Returns the focused RenderWidgetHost inside this |view|'s RWH. RenderWidgetHostImpl* GetFocusedWidget() const; -@@ -117,6 +121,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -116,6 +120,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase void DisableAutoResize(const gfx::Size& new_size) override; bool IsScrollOffsetAtTop() override; float GetDeviceScaleFactor() final; @@ -73,7 +73,7 @@ index 226e7c96a2b7..a00d3a66d913 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 eeb44c8c3e99..74d1130ab509 100644 +index e571258b6046..ba1bb2e96b40 100644 --- content/browser/renderer_host/render_widget_host_view_event_handler.cc +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc @@ -33,6 +33,10 @@ @@ -86,8 +86,8 @@ index eeb44c8c3e99..74d1130ab509 100644 + #if defined(OS_WIN) #include "content/browser/frame_host/render_frame_host_impl.h" - #include "content/public/common/context_menu_params.h" -@@ -898,6 +902,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { + #include "ui/aura/window_tree_host.h" +@@ -896,6 +900,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { ::SetFocus(hwnd); } } @@ -103,10 +103,10 @@ index eeb44c8c3e99..74d1130ab509 100644 // TODO(wjmaclean): can host_ ever be null? if (host_ && set_focus_on_mouse_down_or_key_event_) { diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h -index 15cdc228387e..e469ae6063c9 100644 +index d7631d9b2246..853692333f9d 100644 --- content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h -@@ -236,6 +236,14 @@ class CONTENT_EXPORT RenderWidgetHostView { +@@ -238,6 +238,14 @@ class CONTENT_EXPORT RenderWidgetHostView { // This must always return the same device scale factor as GetScreenInfo. virtual float GetDeviceScaleFactor() = 0; @@ -122,10 +122,10 @@ index 15cdc228387e..e469ae6063c9 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 639174bb1a3c..2472a61b33e2 100644 +index 2c9c97b81e74..01dd7ca2c9b8 100644 --- ui/base/x/x11_window.cc +++ ui/base/x/x11_window.cc -@@ -245,8 +245,12 @@ void XWindow::Init(const Configuration& config) { +@@ -251,8 +251,12 @@ void XWindow::Init(const Configuration& config) { attribute_mask |= CWBorderPixel; swa.border_pixel = 0; @@ -140,10 +140,10 @@ index 639174bb1a3c..2472a61b33e2 100644 bounds_in_pixels_.height(), 0, // border width diff --git ui/base/x/x11_window.h ui/base/x/x11_window.h -index 3045c434cfa5..c6a626933f4c 100644 +index 9939835d80ad..61249e3fb8f2 100644 --- ui/base/x/x11_window.h +++ ui/base/x/x11_window.h -@@ -20,6 +20,7 @@ +@@ -19,6 +19,7 @@ #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/size_f.h" @@ -151,7 +151,7 @@ index 3045c434cfa5..c6a626933f4c 100644 #include "ui/gfx/x/x11.h" #include "ui/gfx/x/x11_types.h" -@@ -88,6 +89,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XWindow { +@@ -85,6 +86,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XWindow { std::string wm_class_name; std::string wm_class_class; std::string wm_role_name; @@ -160,10 +160,10 @@ index 3045c434cfa5..c6a626933f4c 100644 XWindow(); diff --git ui/platform_window/x11/x11_window.cc ui/platform_window/x11/x11_window.cc -index 900ed63b68cb..f6cb4cfedc92 100644 +index fb6b7ac459ce..39a262afc8ca 100644 --- ui/platform_window/x11/x11_window.cc +++ ui/platform_window/x11/x11_window.cc -@@ -84,6 +84,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig( +@@ -85,6 +85,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; @@ -198,7 +198,7 @@ index 6030f29ac64f..d7a679c4a1b8 100644 properties->x11_extension_delegate = this; } diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index e772d98f95d0..ac8f59c8d180 100644 +index d0825cdb2a1c..606400d2bcef 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -129,8 +129,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { @@ -215,7 +215,7 @@ index e772d98f95d0..ac8f59c8d180 100644 remove_standard_frame_ = params.remove_standard_frame; has_non_client_view_ = Widget::RequiresNonClientView(params.type); -@@ -904,11 +908,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -905,11 +909,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { } void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { @@ -234,7 +234,7 @@ index e772d98f95d0..ac8f59c8d180 100644 bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index b195b582fe58..f189bd083982 100644 +index 78925bf334d9..57519c817127 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h @@ -288,6 +288,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -249,10 +249,10 @@ index b195b582fe58..f189bd083982 100644 // a reference. corewm::TooltipWin* tooltip_; diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc -index 955a3a3bbe3d..77cfe052ed63 100644 +index 7439257da38c..4ccfd25c82e3 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc -@@ -82,6 +82,9 @@ DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() { +@@ -84,6 +84,9 @@ DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() { // DesktopWindowTreeHostX11, DesktopWindowTreeHost implementation: void DesktopWindowTreeHostX11::Init(const Widget::InitParams& params) { @@ -262,7 +262,7 @@ index 955a3a3bbe3d..77cfe052ed63 100644 DesktopWindowTreeHostLinux::Init(params); // Set XEventDelegate to receive selection, drag&drop and raw key events. -@@ -137,6 +140,18 @@ void DesktopWindowTreeHostX11::EndMoveLoop() { +@@ -139,6 +142,18 @@ void DesktopWindowTreeHostX11::EndMoveLoop() { //////////////////////////////////////////////////////////////////////////////// // DesktopWindowTreeHostX11 implementation: @@ -329,10 +329,10 @@ index 53da309c14d3..7a50560c8abc 100644 }; diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 750f064c58fb..1e44f073d1d8 100644 +index 734e988c5a9a..02e30f2f8b7f 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc -@@ -305,7 +305,8 @@ void Widget::Init(InitParams params) { +@@ -288,7 +288,8 @@ void Widget::Init(InitParams params) { params.name = params.delegate->GetContentsView()->GetClassName(); params.child |= (params.type == InitParams::TYPE_CONTROL); @@ -342,7 +342,7 @@ index 750f064c58fb..1e44f073d1d8 100644 if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred && params.type != views::Widget::InitParams::TYPE_WINDOW) { -@@ -388,7 +389,12 @@ void Widget::Init(InitParams params) { +@@ -370,7 +371,12 @@ void Widget::Init(InitParams params) { } } else if (delegate) { SetContentsView(delegate->GetContentsView()); @@ -354,9 +354,9 @@ index 750f064c58fb..1e44f073d1d8 100644 + SetInitialBoundsForFramelessWindow(bounds); + } } - // TODO(https://crbug.com/953978): Use GetNativeTheme() for all platforms. - #if defined(OS_MACOSX) || defined(OS_WIN) -@@ -1180,10 +1186,16 @@ void Widget::OnNativeWidgetDestroyed() { + + observer_manager_.Add(GetNativeTheme()); +@@ -1147,10 +1153,16 @@ void Widget::OnNativeWidgetDestroyed() { } gfx::Size Widget::GetMinimumSize() const { @@ -374,10 +374,10 @@ index 750f064c58fb..1e44f073d1d8 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index 108a170a7aaa..034a5fe6deef 100644 +index e7070ef061d9..e8bb88da3631 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h -@@ -283,6 +283,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -282,6 +282,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, gfx::NativeView parent = nullptr; @@ -387,10 +387,10 @@ index 108a170a7aaa..034a5fe6deef 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 66cc515a670e..57d7bf241cb8 100644 +index a3ec229f11cb..714f608b7b58 100644 --- ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h -@@ -194,6 +194,10 @@ class VIEWS_EXPORT WidgetDelegate : public virtual WidgetGetter { +@@ -202,6 +202,10 @@ class VIEWS_EXPORT WidgetDelegate { // be cycled through with keyboard focus. virtual void GetAccessiblePanes(std::vector* panes) {} @@ -415,10 +415,10 @@ index 40e66a212e3e..08ee8523ab15 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 5bfd12452008..8289108b7acf 100644 +index 10f39e919d56..787a92fefdce 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -2986,10 +2986,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -2994,10 +2994,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 51dd4a51c..6d88bcf58 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -80,7 +80,7 @@ index 1026b739d283..fe562ab60ce9 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index 7a1277ad28ed..4a426441e505 100644 +index 84a16ad496b5..79db9031051e 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn @@ -13,7 +13,10 @@ config("viz_service_implementation") { @@ -95,7 +95,7 @@ index 7a1277ad28ed..4a426441e505 100644 "display/bsp_tree.h", "display/bsp_walk_action.cc", diff --git components/viz/service/display_embedder/output_surface_provider_impl.cc components/viz/service/display_embedder/output_surface_provider_impl.cc -index 97feccc71b94..4388a702977f 100644 +index b4d4b1c1c597..9ce685048ab1 100644 --- components/viz/service/display_embedder/output_surface_provider_impl.cc +++ components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -13,6 +13,7 @@ @@ -106,7 +106,7 @@ index 97feccc71b94..4388a702977f 100644 #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" -@@ -242,6 +243,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( +@@ -224,6 +225,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( if (headless_) return std::make_unique(); @@ -128,7 +128,7 @@ index 97feccc71b94..4388a702977f 100644 return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_, display_client); diff --git components/viz/service/display_embedder/software_output_device_win.cc components/viz/service/display_embedder/software_output_device_win.cc -index bb07c338fac5..60441480f981 100644 +index 94ea55487f85..542ec00f4a7f 100644 --- components/viz/service/display_embedder/software_output_device_win.cc +++ components/viz/service/display_embedder/software_output_device_win.cc @@ -268,8 +268,9 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( @@ -143,11 +143,31 @@ index bb07c338fac5..60441480f981 100644 waiting_on_draw_ack_ = true; 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 8e10af98f2b0..d39fc7ec7b4c 100644 +--- content/browser/compositor/viz_process_transport_factory.cc ++++ content/browser/compositor/viz_process_transport_factory.cc +@@ -404,8 +404,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( + compositor_data.display_private.reset(); + root_params->display_private = + compositor_data.display_private.BindNewEndpointAndPassReceiver(); +- compositor_data.display_client = +- std::make_unique(compositor); ++ if (compositor->delegate()) { ++ compositor_data.display_client = ++ compositor->delegate()->CreateHostDisplayClient(); ++ } else { ++ compositor_data.display_client = ++ std::make_unique(compositor); ++ } + root_params->display_client = + compositor_data.display_client->GetBoundRemote(resize_task_runner_); + diff --git mojo/public/cpp/bindings/sync_call_restrictions.h mojo/public/cpp/bindings/sync_call_restrictions.h -index ac94eab98fd0..b89d52a0c869 100644 +index 60e114920575..01f2ce164a3b 100644 --- mojo/public/cpp/bindings/sync_call_restrictions.h +++ mojo/public/cpp/bindings/sync_call_restrictions.h -@@ -29,6 +29,7 @@ class HostContextFactoryPrivate; +@@ -29,6 +29,7 @@ class Compositor; namespace viz { class HostFrameSinkManager; @@ -158,17 +178,17 @@ index ac94eab98fd0..b89d52a0c869 100644 @@ -82,6 +83,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions { // For preventing frame swaps of wrong size during resize on Windows. // (https://crbug.com/811945) - friend class ui::HostContextFactoryPrivate; -+ // For query of whether to use SoftwareOutputDevice or not + friend class ui::Compositor; ++ // For query of whether to use SoftwareOutputDevice or not. + friend class viz::GpuDisplayProvider; // END ALLOWED USAGE. #if ENABLE_SYNC_CALL_RESTRICTIONS diff --git services/viz/privileged/mojom/compositing/display_private.mojom services/viz/privileged/mojom/compositing/display_private.mojom -index 609ded904478..7b326b2e0364 100644 +index d36f62e6ee41..e8ec62cda569 100644 --- services/viz/privileged/mojom/compositing/display_private.mojom +++ services/viz/privileged/mojom/compositing/display_private.mojom -@@ -75,12 +75,14 @@ interface DisplayPrivate { +@@ -74,12 +74,14 @@ interface DisplayPrivate { }; interface DisplayClient { @@ -196,7 +216,7 @@ index 6b7fbb6cf13d..e2af75168cb9 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 443406844ecf..b7a48194e9d9 100644 +index 3e2d2304faf7..f0029d34f591 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -23,7 +23,9 @@ @@ -209,8 +229,8 @@ index 443406844ecf..b7a48194e9d9 100644 #include "mojo/public/cpp/bindings/pending_remote.h" #include "services/viz/privileged/mojom/compositing/vsync_parameter_observer.mojom-forward.h" #include "third_party/skia/include/core/SkColor.h" -@@ -166,6 +168,14 @@ class COMPOSITOR_EXPORT ContextFactory { - virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; +@@ -122,6 +124,14 @@ class COMPOSITOR_EXPORT ContextFactory { + virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0; }; +class COMPOSITOR_EXPORT CompositorDelegate { @@ -224,7 +244,7 @@ index 443406844ecf..b7a48194e9d9 100644 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -205,6 +215,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -155,6 +165,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -234,32 +254,12 @@ index 443406844ecf..b7a48194e9d9 100644 // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -422,6 +435,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, - ui::ContextFactory* context_factory_; - ui::ContextFactoryPrivate* context_factory_private_; +@@ -390,6 +403,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, + + std::unique_ptr pending_begin_frame_args_; + CompositorDelegate* delegate_ = nullptr; + // The root of the Layer tree drawn by this compositor. Layer* root_layer_ = nullptr; -diff --git ui/compositor/host/host_context_factory_private.cc ui/compositor/host/host_context_factory_private.cc -index 1db09f76243c..2b3096ebc4d3 100644 ---- ui/compositor/host/host_context_factory_private.cc -+++ ui/compositor/host/host_context_factory_private.cc -@@ -112,8 +112,13 @@ void HostContextFactoryPrivate::ConfigureCompositor( - compositor_data.display_private.reset(); - root_params->display_private = - compositor_data.display_private.BindNewEndpointAndPassReceiver(); -- compositor_data.display_client = -- std::make_unique(compositor); -+ if (compositor->delegate()) { -+ compositor_data.display_client = -+ compositor->delegate()->CreateHostDisplayClient(); -+ } else { -+ compositor_data.display_client = -+ std::make_unique(compositor); -+ } - root_params->display_client = - compositor_data.display_client->GetBoundRemote(resize_task_runner_); - diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index 71b5ed88e..44a6d378e 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 ea2e52bf16dd..d77c3f7b991a 100644 +index b57520fe4254..0aa0a4a7c058 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -2062,15 +2062,22 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2066,15 +2066,22 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -33,7 +33,7 @@ index ea2e52bf16dd..d77c3f7b991a 100644 } CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -2881,6 +2888,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -2894,6 +2901,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( // objects. create_params.renderer_initiated_creation = !is_new_browsing_instance; @@ -46,10 +46,10 @@ index ea2e52bf16dd..d77c3f7b991a 100644 + &create_params.delegate_view); + } + - // If |is_new_browsing_instance| is true, defer routing_id allocation - // to the WebContentsImpl::Create() call. This is required because with - // a new browsing instance, WebContentsImpl::Create() may elect a different -@@ -6308,6 +6324,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, + std::unique_ptr new_contents; + if (!is_guest) { + create_params.context = view_->GetNativeView(); +@@ -6356,6 +6372,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, // This is an outermost WebContents. SetAsFocusedWebContentsIfNecessary(); } @@ -60,23 +60,23 @@ index ea2e52bf16dd..d77c3f7b991a 100644 void WebContentsImpl::DidCallFocus() { diff --git content/public/browser/web_contents.cc content/public/browser/web_contents.cc -index 2e133afb8da8..e9a88a6bb96b 100644 +index d1d8ff84e1d2..e7cca94f8647 100644 --- content/public/browser/web_contents.cc +++ content/public/browser/web_contents.cc -@@ -31,6 +31,8 @@ WebContents::CreateParams::CreateParams(BrowserContext* context, +@@ -28,6 +28,8 @@ WebContents::CreateParams::CreateParams(BrowserContext* context, renderer_initiated_creation(false), desired_renderer_state(kOkayToHaveRendererProcess), - starting_sandbox_flags(blink::WebSandboxFlags::kNone), + starting_sandbox_flags(blink::mojom::WebSandboxFlags::kNone), + view(nullptr), + delegate_view(nullptr), is_never_visible(false) {} WebContents::CreateParams::CreateParams(const CreateParams& other) = default; diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index 40e1e940f87b..e08b16c26327 100644 +index cf98180740c4..c4eba9a42702 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h -@@ -79,9 +79,11 @@ class BrowserPluginGuestDelegate; +@@ -82,9 +82,11 @@ class BrowserPluginGuestDelegate; class InterstitialPage; class RenderFrameHost; class RenderViewHost; @@ -85,12 +85,12 @@ index 40e1e940f87b..e08b16c26327 100644 class RenderWidgetHostView; class WebContentsDelegate; +class WebContentsView; + class WebUI; struct CustomContextMenuContext; struct DropData; - struct FaviconURL; -@@ -217,6 +219,10 @@ class WebContents : public PageNavigator, +@@ -212,6 +214,10 @@ class WebContents : public PageNavigator, // Sandboxing flags set on the new WebContents. - blink::WebSandboxFlags starting_sandbox_flags; + blink::mojom::WebSandboxFlags starting_sandbox_flags; + // Optionally specify the view and delegate view. + content::WebContentsView* view; @@ -100,7 +100,7 @@ index 40e1e940f87b..e08b16c26327 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 c2ff64f8b998..d4eb13585b71 100644 +index c20a325ff586..874490e1c878 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -57,10 +57,12 @@ class ColorChooser; @@ -132,7 +132,7 @@ index c2ff64f8b998..d4eb13585b71 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 7e1da29cb558..8ab2490bf689 100644 +index 7bc8aae9b388..81cf86ef7990 100644 --- content/public/browser/web_contents_observer.h +++ content/public/browser/web_contents_observer.h @@ -585,6 +585,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener { diff --git a/patch/patches/web_url_loader_cancel_1617042.patch b/patch/patches/web_url_loader_cancel_1617042.patch index cd8f805af..43f93a805 100644 --- a/patch/patches/web_url_loader_cancel_1617042.patch +++ b/patch/patches/web_url_loader_cancel_1617042.patch @@ -1,16 +1,16 @@ diff --git content/renderer/loader/web_url_loader_impl.h content/renderer/loader/web_url_loader_impl.h -index b694b8a2629f..ac1ba364175d 100644 +index 7b00faa7376d..62345e79ebac 100644 --- content/renderer/loader/web_url_loader_impl.h +++ content/renderer/loader/web_url_loader_impl.h -@@ -76,6 +76,7 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { - blink::WebBlobInfo& downloaded_blob) override; - void LoadAsynchronously(const blink::WebURLRequest& request, - blink::WebURLLoaderClient* client) override; +@@ -88,6 +88,7 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { + bool download_to_network_cache_only, + bool no_mime_sniffing, + blink::WebURLLoaderClient* client) override; + void Cancel() override; void SetDefersLoading(bool value) override; void DidChangePriority(blink::WebURLRequest::Priority new_priority, int intra_priority_value) override; -@@ -86,8 +87,6 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { +@@ -98,8 +99,6 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { class RequestPeerImpl; class SinkPeer; @@ -20,12 +20,12 @@ index b694b8a2629f..ac1ba364175d 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 17d09c8f7466..8fe463d0e977 100644 +index 7f1b0efcdff9..24b5561d24d8 100644 --- third_party/blink/public/platform/web_url_loader.h +++ third_party/blink/public/platform/web_url_loader.h -@@ -75,6 +75,10 @@ class WebURLLoader { - virtual void LoadAsynchronously(const WebURLRequest&, - WebURLLoaderClient*) = 0; +@@ -91,6 +91,10 @@ class WebURLLoader { + bool no_mime_sniffing, + WebURLLoaderClient*) = 0; + // Cancels an asynchronous load. This will appear as a load error to + // the client. diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index b42357d82..4bcdc4966 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -10,10 +10,10 @@ 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 8690ec1fdd21..010156ed9dbc 100644 +index c7bc68000ad0..45798fbcf914 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -679,6 +679,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -667,6 +667,11 @@ class BLINK_PLATFORM_EXPORT Platform { // runs during Chromium's build step). virtual bool IsTakingV8ContextSnapshot() { return false; } @@ -26,10 +26,10 @@ index 8690ec1fdd21..010156ed9dbc 100644 static void InitializeCommon(Platform* platform, std::unique_ptr main_thread); diff --git third_party/blink/renderer/core/dom/document_init.cc third_party/blink/renderer/core/dom/document_init.cc -index 8df9cdf40707..746e15c5884c 100644 +index bb92fd9c58d0..02f55f2f33e0 100644 --- third_party/blink/renderer/core/dom/document_init.cc +++ third_party/blink/renderer/core/dom/document_init.cc -@@ -198,11 +198,11 @@ DocumentInit& DocumentInit::WithTypeFrom(const String& type) { +@@ -200,11 +200,11 @@ DocumentInit& DocumentInit::WithTypeFrom(const String& type) { if (GetFrame()->IsMainFrame()) { scoped_refptr origin = SecurityOrigin::Create(Url()); @@ -44,10 +44,10 @@ index 8df9cdf40707..746e15c5884c 100644 } diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc -index 0cf193d31a02..1c62098d3a6a 100644 +index bd3e6c88f1ec..17467a507403 100644 --- third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc -@@ -1199,7 +1199,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { +@@ -1322,7 +1322,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { PluginData* LocalFrame::GetPluginData() const { if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) return nullptr; @@ -57,7 +57,7 @@ index 0cf193d31a02..1c62098d3a6a 100644 } diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc -index ba54df90e309..a902a0d31221 100644 +index e35e1920ecc7..5bc708d6b67a 100644 --- third_party/blink/renderer/core/inspector/devtools_session.cc +++ third_party/blink/renderer/core/inspector/devtools_session.cc @@ -8,6 +8,7 @@ @@ -68,7 +68,7 @@ index ba54df90e309..a902a0d31221 100644 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/inspector/devtools_agent.h" -@@ -151,6 +152,7 @@ DevToolsSession::DevToolsSession( +@@ -140,6 +141,7 @@ DevToolsSession::DevToolsSession( for (wtf_size_t i = 0; i < agents_.size(); i++) agents_[i]->Restore(); } @@ -76,7 +76,7 @@ index ba54df90e309..a902a0d31221 100644 } DevToolsSession::~DevToolsSession() { -@@ -191,6 +193,7 @@ void DevToolsSession::Detach() { +@@ -180,6 +182,7 @@ void DevToolsSession::Detach() { agents_.clear(); v8_session_.reset(); agent_->client_->DebuggerTaskFinished(); @@ -85,10 +85,10 @@ index ba54df90e309..a902a0d31221 100644 void DevToolsSession::FlushProtocolNotifications() { diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc -index 569cfb844dfc..29d5d6940c44 100644 +index e25cee72e6d8..306b2b721a71 100644 --- third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc -@@ -194,7 +194,8 @@ Page::Page(PageClients& page_clients) +@@ -199,7 +199,8 @@ Page::Page(PageClients& page_clients) MakeGarbageCollected(GetVisualViewport(), GetChromeClient())), link_highlight_(MakeGarbageCollected(*this)), @@ -98,7 +98,7 @@ index 569cfb844dfc..29d5d6940c44 100644 // TODO(pdr): Initialize |validation_message_client_| lazily. validation_message_client_( MakeGarbageCollected(*this)), -@@ -368,21 +369,41 @@ void Page::InitialStyleChanged() { +@@ -380,21 +381,41 @@ void Page::InitialStyleChanged() { } } @@ -149,7 +149,7 @@ index 569cfb844dfc..29d5d6940c44 100644 page->NotifyPluginsChanged(); } } -@@ -873,7 +894,8 @@ void Page::Trace(blink::Visitor* visitor) { +@@ -895,7 +916,8 @@ void Page::Trace(Visitor* visitor) { visitor->Trace(link_highlight_); visitor->Trace(spatial_navigation_controller_); visitor->Trace(main_frame_); @@ -160,7 +160,7 @@ index 569cfb844dfc..29d5d6940c44 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 f71d15a750a5..a4b901152085 100644 +index 442eb4c493d9..196017276cdb 100644 --- third_party/blink/renderer/core/page/page.h +++ third_party/blink/renderer/core/page/page.h @@ -144,7 +144,8 @@ class CORE_EXPORT Page final : public GarbageCollected, @@ -173,7 +173,7 @@ index f71d15a750a5..a4b901152085 100644 // Resets the plugin data for all pages in the renderer process and notifies // PluginsChangedObservers. -@@ -393,7 +394,8 @@ class CORE_EXPORT Page final : public GarbageCollected, +@@ -404,7 +405,8 @@ class CORE_EXPORT Page final : public GarbageCollected, const Member link_highlight_; Member spatial_navigation_controller_; @@ -184,7 +184,7 @@ index f71d15a750a5..a4b901152085 100644 Member validation_message_client_; diff --git third_party/blink/renderer/core/page/plugin_data.cc third_party/blink/renderer/core/page/plugin_data.cc -index 987ed360e0ae..382c833b39d0 100644 +index 9b6a945105c6..63c7c43114bc 100644 --- third_party/blink/renderer/core/page/plugin_data.cc +++ third_party/blink/renderer/core/page/plugin_data.cc @@ -91,10 +91,12 @@ void PluginData::RefreshBrowserSidePluginCache() { @@ -212,7 +212,7 @@ index 987ed360e0ae..382c833b39d0 100644 auto* plugin_info = MakeGarbageCollected( plugin->name, FilePathToWebString(plugin->filename), diff --git third_party/blink/renderer/core/page/plugin_data.h third_party/blink/renderer/core/page/plugin_data.h -index efd11fb5b5e3..5b985cea38fe 100644 +index d0260f9f6b1b..675ba5a7c893 100644 --- third_party/blink/renderer/core/page/plugin_data.h +++ third_party/blink/renderer/core/page/plugin_data.h @@ -97,7 +97,8 @@ class CORE_EXPORT PluginData final : public GarbageCollected { diff --git a/patch/patches/webkit_pointer_event_781966.patch b/patch/patches/webkit_pointer_event_781966.patch index c86c3dbc9..476a5764c 100644 --- a/patch/patches/webkit_pointer_event_781966.patch +++ b/patch/patches/webkit_pointer_event_781966.patch @@ -1,5 +1,5 @@ diff --git third_party/blink/renderer/core/input/pointer_event_manager.cc third_party/blink/renderer/core/input/pointer_event_manager.cc -index e498cab75c5b..1d466de86aa6 100644 +index 6a68b124069d..56d4a2bcad3c 100644 --- third_party/blink/renderer/core/input/pointer_event_manager.cc +++ third_party/blink/renderer/core/input/pointer_event_manager.cc @@ -310,7 +310,7 @@ void PointerEventManager::HandlePointerInterruption( diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 291ad4687..048741661 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h -index a6d03eca18db..d84e8615150c 100644 +index c2c079e51358..b719cf3d0edc 100644 --- third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h -@@ -367,6 +367,7 @@ class WebView { +@@ -372,6 +372,7 @@ class WebView { // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void SetUseExternalPopupMenus(bool); @@ -11,7 +11,7 @@ index a6d03eca18db..d84e8615150c 100644 // Cancels and hides the current popup (datetime, select...) if any. virtual void CancelPagePopup() = 0; diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index 7f58ed742695..2149f7815d57 100644 +index bcf5d6b07b26..d66e6df02d2d 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -216,8 +216,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { @@ -30,19 +30,19 @@ index 7f58ed742695..2149f7815d57 100644 } namespace { -@@ -275,6 +280,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, +@@ -280,6 +285,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, chrome_client_(MakeGarbageCollected(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)) { - if (!AsView().client) { + fullscreen_controller_(std::make_unique(this)), + receiver_(this, diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index 710607bd9112..829d2f55d79d 100644 +index ea6325cccfe6..c4fc56b44589 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h -@@ -112,7 +112,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -117,7 +117,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). @@ -52,7 +52,7 @@ index 710607bd9112..829d2f55d79d 100644 // Returns whether frames under this WebView are backed by a compositor. bool does_composite() const { return does_composite_; } -@@ -610,6 +611,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -618,6 +619,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; @@ -62,10 +62,10 @@ index 710607bd9112..829d2f55d79d 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 bd1ea48823f0..4b13696f3996 100644 +index 8285be4622c9..08b3dd25b6f4 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -850,7 +850,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { +@@ -859,7 +859,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { NotifyPopupOpeningObservers(); diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index 598f559b1..63052f1f1 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -1,8 +1,8 @@ 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 f68789fe4c05..089800c7a26a 100644 +index 29953fdc7c55..fb03891ede32 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 -@@ -27,6 +27,7 @@ +@@ -28,6 +28,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/common/channel_info.h" @@ -10,7 +10,7 @@ index f68789fe4c05..089800c7a26a 100644 #include "components/prefs/pref_service.h" #include "components/sync/driver/about_sync_util.h" #include "components/sync/driver/sync_service.h" -@@ -323,6 +324,10 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) { +@@ -322,6 +323,10 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) { } void ChromeInternalLogSource::PopulateSyncLogs(SystemLogsResponse* response) { @@ -21,7 +21,7 @@ index f68789fe4c05..089800c7a26a 100644 // We are only interested in sync logs for the primary user profile. Profile* profile = ProfileManager::GetPrimaryUserProfile(); if (!profile || !ProfileSyncServiceFactory::HasSyncService(profile)) -@@ -365,6 +370,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( +@@ -364,6 +369,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( if (!profile) return; @@ -34,7 +34,7 @@ index f68789fe4c05..089800c7a26a 100644 extensions::ExtensionRegistry* extension_registry = extensions::ExtensionRegistry::Get(profile); std::string extensions_list; -@@ -454,6 +465,8 @@ void ChromeInternalLogSource::PopulateArcPolicyStatus( +@@ -453,6 +464,8 @@ void ChromeInternalLogSource::PopulateArcPolicyStatus( #if defined(OS_WIN) void ChromeInternalLogSource::PopulateUsbKeyboardDetected( SystemLogsResponse* response) { @@ -44,18 +44,18 @@ index f68789fe4c05..089800c7a26a 100644 bool result = base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason); diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc -index a75f82d26388..19ddd09cc379 100644 +index d42895d9db3f..74a6d407bbcd 100644 --- chrome/browser/memory_details.cc +++ chrome/browser/memory_details.cc -@@ -17,6 +17,7 @@ - #include "base/task/post_task.h" +@@ -18,6 +18,7 @@ + #include "base/task/thread_pool.h" #include "build/build_config.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/common/chrome_switches.h" #include "components/nacl/common/nacl_process_type.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/browser_child_process_host_iterator.h" -@@ -249,8 +250,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() { +@@ -250,8 +251,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() { #if BUILDFLAG(ENABLE_EXTENSIONS) // Determine if this is an extension process. diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index 0254c8587..a459686e7 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 30da9de5bf78..29366b337312 100644 +index 007d476f22ce..106ddd21a532 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -4963,7 +4963,7 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -4984,7 +4984,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_base_msvc_sandbox.patch b/patch/patches/win_base_msvc_sandbox.patch index e7659c1e7..7f14997e5 100644 --- a/patch/patches/win_base_msvc_sandbox.patch +++ b/patch/patches/win_base_msvc_sandbox.patch @@ -1,116 +1,5 @@ -diff --git base/containers/circular_deque.h base/containers/circular_deque.h -index 0d452b56bedd..bf42a9584488 100644 ---- base/containers/circular_deque.h -+++ base/containers/circular_deque.h -@@ -14,7 +14,6 @@ - #include "base/containers/vector_buffer.h" - #include "base/logging.h" - #include "base/macros.h" --#include "base/stl_util.h" - #include "base/template_util.h" - - // base::circular_deque is similar to std::deque. Unlike std::deque, the -@@ -522,15 +521,15 @@ class circular_deque { - return buffer_[i - right_size]; - } - value_type& at(size_type i) { -- return const_cast(as_const(*this).at(i)); -+ return const_cast( -+ const_cast(this)->at(i)); - } - -- value_type& operator[](size_type i) { -- return const_cast(as_const(*this)[i]); -+ value_type& operator[](size_type i) { return at(i); } -+ const value_type& operator[](size_type i) const { -+ return const_cast(this)->at(i); - } - -- const value_type& operator[](size_type i) const { return at(i); } -- - value_type& front() { - DCHECK(!empty()); - return buffer_[begin_]; -diff --git base/containers/flat_tree.h base/containers/flat_tree.h -index b7549dd5b0c6..89c75d70692e 100644 ---- base/containers/flat_tree.h -+++ base/containers/flat_tree.h -@@ -10,7 +10,6 @@ - #include - #include - --#include "base/stl_util.h" - #include "base/template_util.h" - - namespace base { -@@ -341,6 +340,8 @@ class flat_tree { - const key_compare& key_comp_; - }; - -+ const flat_tree& as_const() { return *this; } -+ - iterator const_cast_it(const_iterator c_it) { - auto distance = std::distance(cbegin(), c_it); - return std::next(begin(), distance); -@@ -776,7 +777,7 @@ template - template - auto flat_tree::find(const K& key) - -> iterator { -- return const_cast_it(as_const(*this).find(key)); -+ return const_cast_it(as_const().find(key)); - } - - template -@@ -799,7 +800,7 @@ template - template - auto flat_tree::equal_range( - const K& key) -> std::pair { -- auto res = as_const(*this).equal_range(key); -+ auto res = as_const().equal_range(key); - return {const_cast_it(res.first), const_cast_it(res.second)}; - } - -@@ -820,7 +821,7 @@ template - template - auto flat_tree::lower_bound( - const K& key) -> iterator { -- return const_cast_it(as_const(*this).lower_bound(key)); -+ return const_cast_it(as_const().lower_bound(key)); - } - - template -@@ -841,7 +842,7 @@ template - template - auto flat_tree::upper_bound( - const K& key) -> iterator { -- return const_cast_it(as_const(*this).upper_bound(key)); -+ return const_cast_it(as_const().upper_bound(key)); - } - - template -diff --git base/stl_util.h base/stl_util.h -index 83d86ad90d24..4edd1fb9e20b 100644 ---- base/stl_util.h -+++ base/stl_util.h -@@ -158,16 +158,6 @@ constexpr const T* data(const std::array& array) noexcept { - return !array.empty() ? &array[0] : nullptr; - } - --// C++14 implementation of C++17's std::as_const(): --// https://en.cppreference.com/w/cpp/utility/as_const --template --constexpr std::add_const_t& as_const(T& t) noexcept { -- return t; --} -- --template --void as_const(const T&& t) = delete; -- - // Returns a const reference to the underlying container of a container adapter. - // Works for std::priority_queue, std::queue, and std::stack. - template diff --git base/values.cc base/values.cc -index fbc859c6518d..95e8fc815067 100644 +index ecca445840a8..9cde6ece0000 100644 --- base/values.cc +++ base/values.cc @@ -24,20 +24,6 @@ @@ -134,209 +23,3 @@ index fbc859c6518d..95e8fc815067 100644 static_assert(sizeof(Value::DoubleStorage) == sizeof(double), "The double and DoubleStorage types should have the same size"); -@@ -433,7 +419,7 @@ void Value::ClearList() { - } - - Value* Value::FindKey(StringPiece key) { -- return const_cast(as_const(*this).FindKey(key)); -+ return const_cast(static_cast(this)->FindKey(key)); - } - - const Value* Value::FindKey(StringPiece key) const { -@@ -445,7 +431,8 @@ const Value* Value::FindKey(StringPiece key) const { - } - - Value* Value::FindKeyOfType(StringPiece key, Type type) { -- return const_cast(as_const(*this).FindKeyOfType(key, type)); -+ return const_cast( -+ static_cast(this)->FindKeyOfType(key, type)); - } - - const Value* Value::FindKeyOfType(StringPiece key, Type type) const { -@@ -569,7 +556,7 @@ Optional Value::ExtractKey(StringPiece key) { - } - - Value* Value::FindPath(StringPiece path) { -- return const_cast(as_const(*this).FindPath(path)); -+ return const_cast(const_cast(this)->FindPath(path)); - } - - const Value* Value::FindPath(StringPiece path) const { -@@ -584,7 +571,8 @@ const Value* Value::FindPath(StringPiece path) const { - } - - Value* Value::FindPathOfType(StringPiece path, Type type) { -- return const_cast(as_const(*this).FindPathOfType(path, type)); -+ return const_cast( -+ const_cast(this)->FindPathOfType(path, type)); - } - - const Value* Value::FindPathOfType(StringPiece path, Type type) const { -@@ -627,7 +615,8 @@ const std::string* Value::FindStringPath(StringPiece path) const { - } - - std::string* Value::FindStringPath(StringPiece path) { -- return const_cast(as_const(*this).FindStringPath(path)); -+ return const_cast( -+ static_cast(this)->FindStringPath(path)); - } - - const Value::BlobStorage* Value::FindBlobPath(StringPiece path) const { -@@ -713,11 +702,11 @@ Optional Value::ExtractPath(StringPiece path) { - - // DEPRECATED METHODS - Value* Value::FindPath(std::initializer_list path) { -- return const_cast(as_const(*this).FindPath(path)); -+ return const_cast(const_cast(this)->FindPath(path)); - } - - Value* Value::FindPath(span path) { -- return const_cast(as_const(*this).FindPath(path)); -+ return const_cast(const_cast(this)->FindPath(path)); - } - - const Value* Value::FindPath(std::initializer_list path) const { -@@ -736,11 +725,13 @@ const Value* Value::FindPath(span path) const { - - Value* Value::FindPathOfType(std::initializer_list path, - Type type) { -- return const_cast(as_const(*this).FindPathOfType(path, type)); -+ return const_cast( -+ const_cast(this)->FindPathOfType(path, type)); - } - - Value* Value::FindPathOfType(span path, Type type) { -- return const_cast(as_const(*this).FindPathOfType(path, type)); -+ return const_cast( -+ const_cast(this)->FindPathOfType(path, type)); - } - - const Value* Value::FindPathOfType(std::initializer_list path, -@@ -902,7 +893,7 @@ bool Value::GetAsString(string16* out_value) const { - - bool Value::GetAsString(const Value** out_value) const { - if (out_value && is_string()) { -- *out_value = this; -+ *out_value = static_cast(this); - return true; - } - return is_string(); -@@ -1300,7 +1291,9 @@ bool DictionaryValue::Get(StringPiece path, - } - - bool DictionaryValue::Get(StringPiece path, Value** out_value) { -- return as_const(*this).Get(path, const_cast(out_value)); -+ return static_cast(*this).Get( -+ path, -+ const_cast(out_value)); - } - - bool DictionaryValue::GetBoolean(StringPiece path, bool* bool_value) const { -@@ -1373,7 +1366,8 @@ bool DictionaryValue::GetBinary(StringPiece path, - } - - bool DictionaryValue::GetBinary(StringPiece path, Value** out_value) { -- return as_const(*this).GetBinary(path, const_cast(out_value)); -+ return static_cast(*this).GetBinary( -+ path, const_cast(out_value)); - } - - bool DictionaryValue::GetDictionary(StringPiece path, -@@ -1391,8 +1385,9 @@ bool DictionaryValue::GetDictionary(StringPiece path, - - bool DictionaryValue::GetDictionary(StringPiece path, - DictionaryValue** out_value) { -- return as_const(*this).GetDictionary( -- path, const_cast(out_value)); -+ return static_cast(*this).GetDictionary( -+ path, -+ const_cast(out_value)); - } - - bool DictionaryValue::GetList(StringPiece path, -@@ -1409,8 +1404,9 @@ bool DictionaryValue::GetList(StringPiece path, - } - - bool DictionaryValue::GetList(StringPiece path, ListValue** out_value) { -- return as_const(*this).GetList(path, -- const_cast(out_value)); -+ return static_cast(*this).GetList( -+ path, -+ const_cast(out_value)); - } - - bool DictionaryValue::GetWithoutPathExpansion(StringPiece key, -@@ -1427,8 +1423,9 @@ bool DictionaryValue::GetWithoutPathExpansion(StringPiece key, - - bool DictionaryValue::GetWithoutPathExpansion(StringPiece key, - Value** out_value) { -- return as_const(*this).GetWithoutPathExpansion( -- key, const_cast(out_value)); -+ return static_cast(*this).GetWithoutPathExpansion( -+ key, -+ const_cast(out_value)); - } - - bool DictionaryValue::GetBooleanWithoutPathExpansion(StringPiece key, -@@ -1494,8 +1491,11 @@ bool DictionaryValue::GetDictionaryWithoutPathExpansion( - bool DictionaryValue::GetDictionaryWithoutPathExpansion( - StringPiece key, - DictionaryValue** out_value) { -- return as_const(*this).GetDictionaryWithoutPathExpansion( -- key, const_cast(out_value)); -+ const DictionaryValue& const_this = -+ static_cast(*this); -+ return const_this.GetDictionaryWithoutPathExpansion( -+ key, -+ const_cast(out_value)); - } - - bool DictionaryValue::GetListWithoutPathExpansion( -@@ -1514,8 +1514,10 @@ bool DictionaryValue::GetListWithoutPathExpansion( - - bool DictionaryValue::GetListWithoutPathExpansion(StringPiece key, - ListValue** out_value) { -- return as_const(*this).GetListWithoutPathExpansion( -- key, const_cast(out_value)); -+ return -+ static_cast(*this).GetListWithoutPathExpansion( -+ key, -+ const_cast(out_value)); - } - - bool DictionaryValue::Remove(StringPiece path, -@@ -1645,7 +1647,9 @@ bool ListValue::Get(size_t index, const Value** out_value) const { - } - - bool ListValue::Get(size_t index, Value** out_value) { -- return as_const(*this).Get(index, const_cast(out_value)); -+ return static_cast(*this).Get( -+ index, -+ const_cast(out_value)); - } - - bool ListValue::GetBoolean(size_t index, bool* bool_value) const { -@@ -1702,8 +1706,9 @@ bool ListValue::GetDictionary(size_t index, - } - - bool ListValue::GetDictionary(size_t index, DictionaryValue** out_value) { -- return as_const(*this).GetDictionary( -- index, const_cast(out_value)); -+ return static_cast(*this).GetDictionary( -+ index, -+ const_cast(out_value)); - } - - bool ListValue::GetList(size_t index, const ListValue** out_value) const { -@@ -1719,8 +1724,9 @@ bool ListValue::GetList(size_t index, const ListValue** out_value) const { - } - - bool ListValue::GetList(size_t index, ListValue** out_value) { -- return as_const(*this).GetList(index, -- const_cast(out_value)); -+ return static_cast(*this).GetList( -+ index, -+ const_cast(out_value)); - } - - bool ListValue::Remove(size_t index, std::unique_ptr* out_value) { diff --git a/patch/patches/win_rt_2274.patch b/patch/patches/win_rt_2274.patch index b78c9fb97..64c21d816 100644 --- a/patch/patches/win_rt_2274.patch +++ b/patch/patches/win_rt_2274.patch @@ -1,8 +1,8 @@ diff --git services/service_manager/sandbox/win/sandbox_win.cc services/service_manager/sandbox/win/sandbox_win.cc -index e8dd7fc20903..344d73959d79 100644 +index 5eaed19bf922..78f31aeefe40 100644 --- services/service_manager/sandbox/win/sandbox_win.cc +++ services/service_manager/sandbox/win/sandbox_win.cc -@@ -924,8 +924,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( +@@ -929,8 +929,11 @@ sandbox::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/patch/patches/win_screenlock_1058556.patch b/patch/patches/win_screenlock_1058556.patch index 1f7e197c9..b740048e7 100644 --- a/patch/patches/win_screenlock_1058556.patch +++ b/patch/patches/win_screenlock_1058556.patch @@ -1,8 +1,8 @@ diff --git content/browser/screenlock_monitor/screenlock_monitor_device_source_win.cc content/browser/screenlock_monitor/screenlock_monitor_device_source_win.cc -index 5cb66455ac9e..e00e33294aec 100644 +index 1cc7bf44645f..7ec28c21ec1d 100644 --- content/browser/screenlock_monitor/screenlock_monitor_device_source_win.cc +++ content/browser/screenlock_monitor/screenlock_monitor_device_source_win.cc -@@ -47,7 +47,7 @@ bool ScreenlockMonitorDeviceSource::SessionMessageWindow::OnWndProc( +@@ -48,7 +48,7 @@ bool ScreenlockMonitorDeviceSource::SessionMessageWindow::OnWndProc( if (message == WM_WTSSESSION_CHANGE) { ProcessWTSSessionLockMessage(wparam); } diff --git a/tests/ceftests/os_rendering_unittest.cc b/tests/ceftests/os_rendering_unittest.cc index 5f5f46d1f..37c7af593 100644 --- a/tests/ceftests/os_rendering_unittest.cc +++ b/tests/ceftests/os_rendering_unittest.cc @@ -38,7 +38,7 @@ const int kOsrHeight = 400; #if defined(OS_WIN) const CefRect kExpandedSelectRect(462, 42, 81, 334); #elif defined(OS_MACOSX) -const CefRect kExpandedSelectRect(462, 42, 75, 286); +const CefRect kExpandedSelectRect(462, 42, 75, 334); #elif defined(OS_LINUX) const CefRect kExpandedSelectRect(462, 42, 79, 334); #else diff --git a/tools/automate/automate-git.py b/tools/automate/automate-git.py index 4e1aeee97..b33e4a580 100644 --- a/tools/automate/automate-git.py +++ b/tools/automate/automate-git.py @@ -1150,10 +1150,9 @@ if os.path.exists(cef_dir) and not is_git_checkout(cef_dir): raise Exception("Not a valid CEF Git checkout: %s" % (cef_dir)) # Determine the CEF download URL to use. -if options.url == '': +cef_url = options.url.strip() +if cef_url == '': cef_url = cef_git_url -else: - cef_url = options.url # Verify that the requested CEF URL matches the existing checkout. if not options.nocefupdate and os.path.exists(cef_dir):