Update to Chromium version 82.0.4085.0 (#749737)

- Building on macOS now requires the 10.15 SDK. Xcode 11.3 is recommended as
  Xcode 11.4 is not currently supported (see https://crbug.com/1065146).
- Jumbo build configuration is no longer supported.

Chromium is skipping the M82 release and consequently no CEF 4085 branch will
be created. For details on the Chromium decision see
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/Vn7uzglqLz0/JItlSrZxBAAJ
This commit is contained in:
Marshall Greenblatt
2020-03-30 16:13:42 -04:00
parent 3d87a68561
commit 047e8f9349
99 changed files with 839 additions and 3199 deletions

View File

@ -785,7 +785,6 @@ static_library("libcef_static") {
"//components/safe_browsing/core/db:test_database_manager", "//components/safe_browsing/core/db:test_database_manager",
"//components/services/print_compositor/public/cpp", "//components/services/print_compositor/public/cpp",
"//components/services/print_compositor/public/mojom", "//components/services/print_compositor/public/mojom",
"//components/tracing",
"//components/update_client", "//components/update_client",
"//components/url_formatter", "//components/url_formatter",
"//components/user_prefs", "//components/user_prefs",
@ -1088,8 +1087,8 @@ static_library("libcef_static") {
"//ui/aura/test/aura_test_utils.cc", "//ui/aura/test/aura_test_utils.cc",
"//ui/aura/test/aura_test_utils.h", "//ui/aura/test/aura_test_utils.h",
# Part of //ui/events:test_support which is testingonly. # Part of //ui/events:test_support which is testingonly.
"//ui/events/test/platform_event_waiter.cc", "//ui/events/test/x11_event_waiter.cc",
"//ui/events/test/platform_event_waiter.h", "//ui/events/test/x11_event_waiter.h",
] ]
if (use_x11) { if (use_x11) {
@ -1583,6 +1582,7 @@ if (is_mac) {
sources = [ sources = [
"$root_out_dir/egl_intermediates/libEGL.dylib", "$root_out_dir/egl_intermediates/libEGL.dylib",
"$root_out_dir/egl_intermediates/libGLESv2.dylib", "$root_out_dir/egl_intermediates/libGLESv2.dylib",
"$root_out_dir/egl_intermediates/libvulkan.dylib",
] ]
outputs = [ outputs = [
"{{bundle_contents_dir}}/Libraries/{{source_file_part}}", "{{bundle_contents_dir}}/Libraries/{{source_file_part}}",
@ -1597,12 +1597,15 @@ if (is_mac) {
sources = [ sources = [
"$root_out_dir/egl_intermediates/libswiftshader_libEGL.dylib", "$root_out_dir/egl_intermediates/libswiftshader_libEGL.dylib",
"$root_out_dir/egl_intermediates/libswiftshader_libGLESv2.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 = [ outputs = [
"{{bundle_contents_dir}}/Libraries/{{source_file_part}}", "{{bundle_contents_dir}}/Libraries/{{source_file_part}}",
] ]
public_deps = [ 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", "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 += [ deps += [
# Bring in ui_unscaled_resources.rc which contains custom cursors. # Bring in ui_unscaled_resources.rc which contains custom cursors.
# TODO(cef): Remove this once custom cursors can be loaded via # TODO(cef): Remove this once custom cursors can be loaded via

View File

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

View File

@ -2237,7 +2237,13 @@ typedef enum {
CT_ZOOMOUT, CT_ZOOMOUT,
CT_GRAB, CT_GRAB,
CT_GRABBING, CT_GRABBING,
CT_MIDDLE_PANNING_VERTICAL,
CT_MIDDLE_PANNING_HORIZONTAL,
CT_CUSTOM, CT_CUSTOM,
CT_DND_NONE,
CT_DND_MOVE,
CT_DND_COPY,
CT_DND_LINK,
} cef_cursor_type_t; } cef_cursor_type_t;
/// ///

View File

@ -48,7 +48,6 @@
#include "extensions/browser/process_manager.h" #include "extensions/browser/process_manager.h"
#include "extensions/common/constants.h" #include "extensions/common/constants.h"
#include "net/proxy_resolution/proxy_config_service.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" #include "services/network/public/mojom/cors_origin_pattern.mojom.h"
using content::BrowserThread; using content::BrowserThread;

View File

@ -47,6 +47,8 @@
#include "chrome/browser/spellchecker/spellcheck_factory.h" #include "chrome/browser/spellchecker/spellcheck_factory.h"
#include "chrome/browser/spellchecker/spellcheck_service.h" #include "chrome/browser/spellchecker/spellcheck_service.h"
#include "chrome/browser/ui/prefs/prefs_tab_helper.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 "components/zoom/zoom_controller.h"
#include "content/browser/gpu/compositor_util.h" #include "content/browser/gpu/compositor_util.h"
#include "content/browser/web_contents/web_contents_impl.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_view_host.h"
#include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "content/public/common/favicon_url.h"
#include "extensions/browser/process_manager.h" #include "extensions/browser/process_manager.h"
#include "net/base/net_errors.h" #include "net/base/net_errors.h"
#include "third_party/blink/public/mojom/frame/find_in_page.mojom.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()) if (!web_contents())
return; return;
SpellcheckService* spellcheck = nullptr;
content::BrowserContext* browser_context = content::BrowserContext* browser_context =
web_contents()->GetBrowserContext(); web_contents()->GetBrowserContext();
if (browser_context) { if (browser_context) {
SpellcheckService* spellcheck = spellcheck = SpellcheckServiceFactory::GetForContext(browser_context);
SpellcheckServiceFactory::GetForContext(browser_context);
if (spellcheck) if (spellcheck)
spellcheck->GetCustomDictionary()->AddWord(word); spellcheck->GetCustomDictionary()->AddWord(word);
} }
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
spellcheck_platform::AddWord(word); if (spellcheck && spellcheck::UseBrowserSpellChecker()) {
spellcheck_platform::AddWord(spellcheck->platform_spell_checker(), word);
}
#endif #endif
} }
@ -2679,15 +2682,14 @@ void CefBrowserHostImpl::PluginCrashed(const base::FilePath& plugin_path,
} }
void CefBrowserHostImpl::DidUpdateFaviconURL( void CefBrowserHostImpl::DidUpdateFaviconURL(
const std::vector<content::FaviconURL>& candidates) { const std::vector<blink::mojom::FaviconURLPtr>& candidates) {
if (client_.get()) { if (client_.get()) {
CefRefPtr<CefDisplayHandler> handler = client_->GetDisplayHandler(); CefRefPtr<CefDisplayHandler> handler = client_->GetDisplayHandler();
if (handler.get()) { if (handler.get()) {
std::vector<CefString> icon_urls; std::vector<CefString> icon_urls;
std::vector<content::FaviconURL>::const_iterator it = candidates.begin(); for (const auto& icon : candidates) {
for (; it != candidates.end(); ++it) { if (icon->icon_type == blink::mojom::FaviconIconType::kFavicon)
if (it->icon_type == content::FaviconURL::IconType::kFavicon) icon_urls.push_back(icon->icon_url.spec());
icon_urls.push_back(it->icon_url.spec());
} }
if (!icon_urls.empty()) if (!icon_urls.empty())
handler->OnFaviconURLChange(this, icon_urls); handler->OnFaviconURLChange(this, icon_urls);

View File

@ -485,7 +485,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
void PluginCrashed(const base::FilePath& plugin_path, void PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) override; base::ProcessId plugin_pid) override;
void DidUpdateFaviconURL( void DidUpdateFaviconURL(
const std::vector<content::FaviconURL>& candidates) override; const std::vector<blink::mojom::FaviconURLPtr>& candidates) override;
bool OnMessageReceived(const IPC::Message& message) override; bool OnMessageReceived(const IPC::Message& message) override;
bool OnMessageReceived(const IPC::Message& message, bool OnMessageReceived(const IPC::Message& message,
content::RenderFrameHost* render_frame_host) override; content::RenderFrameHost* render_frame_host) override;

View File

@ -36,7 +36,6 @@
#include "extensions/common/constants.h" #include "extensions/common/constants.h"
#include "net/base/net_module.h" #include "net/base/net_module.h"
#include "services/service_manager/embedder/result_codes.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" #include "ui/base/resource/resource_bundle.h"
#if defined(USE_AURA) && defined(USE_X11) #if defined(USE_AURA) && defined(USE_X11)
@ -161,8 +160,6 @@ void CefBrowserMainParts::PreMainMessageLoopRun() {
display::Screen::SetScreenInstance(views::CreateDesktopScreen()); display::Screen::SetScreenInstance(views::CreateDesktopScreen());
#endif #endif
ui::MaterialDesignController::Initialize();
if (extensions::ExtensionsEnabled()) { if (extensions::ExtensionsEnabled()) {
// Initialize extension global objects before creating the global // Initialize extension global objects before creating the global
// BrowserContext. // BrowserContext.

View File

@ -372,3 +372,8 @@ ChromeBrowserProcessStub::resource_coordinator_parts() {
NOTREACHED(); NOTREACHED();
return nullptr; return nullptr;
} }
BuildState* ChromeBrowserProcessStub::GetBuildState() {
NOTREACHED();
return nullptr;
}

View File

@ -98,6 +98,7 @@ class ChromeBrowserProcessStub : public BrowserProcess {
resource_coordinator::TabManager* GetTabManager() override; resource_coordinator::TabManager* GetTabManager() override;
resource_coordinator::ResourceCoordinatorParts* resource_coordinator_parts() resource_coordinator::ResourceCoordinatorParts* resource_coordinator_parts()
override; override;
BuildState* GetBuildState() override;
private: private:
bool initialized_; bool initialized_;

View File

@ -5,9 +5,35 @@
#include "libcef/browser/chrome_profile_stub.h" #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 "content/public/browser/resource_context.h"
#include "net/url_request/url_request_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() {}
ChromeProfileStub::~ChromeProfileStub() {} ChromeProfileStub::~ChromeProfileStub() {}
@ -20,6 +46,12 @@ bool ChromeProfileStub::IsOffTheRecord() const {
return false; return false;
} }
variations::VariationsClient* ChromeProfileStub::GetVariationsClient() {
if (!variations_client_)
variations_client_ = std::make_unique<CefVariationsClient>(this);
return variations_client_.get();
}
scoped_refptr<base::SequencedTaskRunner> ChromeProfileStub::GetIOTaskRunner() { scoped_refptr<base::SequencedTaskRunner> ChromeProfileStub::GetIOTaskRunner() {
NOTREACHED(); NOTREACHED();
return scoped_refptr<base::SequencedTaskRunner>(); return scoped_refptr<base::SequencedTaskRunner>();

View File

@ -22,6 +22,7 @@ class ChromeProfileStub : public Profile {
// Profile methods. // Profile methods.
bool IsOffTheRecord() override; bool IsOffTheRecord() override;
bool IsOffTheRecord() const override; bool IsOffTheRecord() const override;
variations::VariationsClient* GetVariationsClient() override;
scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override; scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
std::string GetProfileUserName() const override; std::string GetProfileUserName() const override;
ProfileType GetProfileType() const override; ProfileType GetProfileType() const override;
@ -48,6 +49,8 @@ class ChromeProfileStub : public Profile {
void SetCreationTimeForTesting(base::Time creation_time) override; void SetCreationTimeForTesting(base::Time creation_time) override;
private: private:
std::unique_ptr<variations::VariationsClient> variations_client_;
DISALLOW_COPY_AND_ASSIGN(ChromeProfileStub); DISALLOW_COPY_AND_ASSIGN(ChromeProfileStub);
}; };

View File

@ -115,6 +115,8 @@
#include "services/service_manager/public/mojom/connector.mojom.h" #include "services/service_manager/public/mojom/connector.mojom.h"
#include "services/service_manager/sandbox/switches.h" #include "services/service_manager/sandbox/switches.h"
#include "storage/browser/quota/quota_settings.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/blink/public/web/web_window_features.h"
#include "third_party/widevine/cdm/buildflags.h" #include "third_party/widevine/cdm/buildflags.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
@ -505,6 +507,30 @@ void BindPluginInfoHost(
std::move(receiver)); 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<content::RenderFrameHost*>* map) {
map->Add<blink::mojom::InsecureInputService>(base::BindRepeating(
[](content::RenderFrameHost* frame_host,
mojo::PendingReceiver<blink::mojom::InsecureInputService> receiver) {
}));
map->Add<blink::mojom::PrerenderProcessor>(base::BindRepeating(
[](content::RenderFrameHost* frame_host,
mojo::PendingReceiver<blink::mojom::PrerenderProcessor> receiver) {}));
}
} // namespace } // namespace
CefContentBrowserClient::CefContentBrowserClient() CefContentBrowserClient::CefContentBrowserClient()
@ -1088,16 +1114,13 @@ CefContentBrowserClient::CreateURLLoaderThrottles(
request.resource_type, frame_tree_node_id)); request.resource_type, frame_tree_node_id));
Profile* profile = Profile::FromBrowserContext(browser_context); Profile* profile = Profile::FromBrowserContext(browser_context);
bool is_off_the_record = profile->IsOffTheRecord();
chrome::mojom::DynamicParams dynamic_params = { chrome::mojom::DynamicParams dynamic_params = {
profile->GetPrefs()->GetBoolean(prefs::kForceGoogleSafeSearch), profile->GetPrefs()->GetBoolean(prefs::kForceGoogleSafeSearch),
profile->GetPrefs()->GetInteger(prefs::kForceYouTubeRestrict), profile->GetPrefs()->GetInteger(prefs::kForceYouTubeRestrict),
profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps), profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps)};
variations::VariationsHttpHeaderProvider::GetInstance() result.push_back(
->GetClientDataHeader(false /* is_signed_in */)}; std::make_unique<GoogleURLLoaderThrottle>(std::move(dynamic_params)));
result.push_back(std::make_unique<GoogleURLLoaderThrottle>(
is_off_the_record, std::move(dynamic_params)));
return result; return result;
} }
@ -1300,10 +1323,7 @@ CefContentBrowserClient::GetNetworkContextsParentDirectory() {
base::PathService::Get(chrome::DIR_USER_DATA, &user_data_path); base::PathService::Get(chrome::DIR_USER_DATA, &user_data_path);
DCHECK(!user_data_path.empty()); DCHECK(!user_data_path.empty());
// The CefContext::ValidateCachePath method enforces the requirement that all const auto& root_cache_path = GetRootCachePath();
// 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));
// root_cache_path may sometimes be empty or a child of user_data_path, so // root_cache_path may sometimes be empty or a child of user_data_path, so
// only return the one path in that case. // only return the one path in that case.
@ -1380,6 +1400,8 @@ CefContentBrowserClient::CreateWindowForPictureInPicture(
void CefContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( void CefContentBrowserClient::RegisterBrowserInterfaceBindersForFrame(
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
service_manager::BinderMapWithContext<content::RenderFrameHost*>* map) { service_manager::BinderMapWithContext<content::RenderFrameHost*>* map) {
PopulateChromeFrameBinders(map);
if (!extensions::ExtensionsEnabled()) if (!extensions::ExtensionsEnabled())
return; return;
@ -1404,6 +1426,11 @@ void CefContentBrowserClient::RegisterBrowserInterfaceBindersForFrame(
extension); extension);
} }
base::FilePath
CefContentBrowserClient::GetSandboxedStorageServiceDataDirectory() {
return GetRootCachePath();
}
std::string CefContentBrowserClient::GetProduct() { std::string CefContentBrowserClient::GetProduct() {
// Match the logic in chrome_content_browser_client.cc GetProduct(). // Match the logic in chrome_content_browser_client.cc GetProduct().
return ::GetProduct(); return ::GetProduct();

View File

@ -197,7 +197,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
service_manager::BinderMapWithContext<content::RenderFrameHost*>* map) service_manager::BinderMapWithContext<content::RenderFrameHost*>* map)
override; override;
base::FilePath GetSandboxedStorageServiceDataDirectory() override;
std::string GetProduct() override; std::string GetProduct() override;
std::string GetChromeProduct() override; std::string GetChromeProduct() override;
std::string GetUserAgent() override; std::string GetUserAgent() override;

View File

@ -9,7 +9,7 @@
#include "include/cef_context_menu_handler.h" #include "include/cef_context_menu_handler.h"
#include "libcef/common/value_base.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. // CefContextMenuParams implementation. This class is not thread safe.
class CefContextMenuParamsImpl class CefContextMenuParamsImpl

View File

@ -167,7 +167,7 @@ void CefExtensionsBrowserClient::LoadResourceFromResourceBundle(
bool CefExtensionsBrowserClient::AllowCrossRendererResourceLoad( bool CefExtensionsBrowserClient::AllowCrossRendererResourceLoad(
const GURL& url, const GURL& url,
content::ResourceType resource_type, blink::mojom::ResourceType resource_type,
ui::PageTransition page_transition, ui::PageTransition page_transition,
int child_id, int child_id,
bool is_incognito, bool is_incognito,

View File

@ -55,7 +55,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
mojo::PendingRemote<network::mojom::URLLoaderClient> client, mojo::PendingRemote<network::mojom::URLLoaderClient> client,
bool send_cors_header) override; bool send_cors_header) override;
bool AllowCrossRendererResourceLoad(const GURL& url, bool AllowCrossRendererResourceLoad(const GURL& url,
content::ResourceType resource_type, blink::mojom::ResourceType resource_type,
ui::PageTransition page_transition, ui::PageTransition page_transition,
int child_id, int child_id,
bool is_incognito, bool is_incognito,

View File

@ -11,8 +11,8 @@
#include "libcef/browser/menu_runner.h" #include "libcef/browser/menu_runner.h"
#include "base/memory/weak_ptr.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/browser/web_contents_observer.h"
#include "content/public/common/context_menu_params.h"
namespace content { namespace content {
class RenderFrameHost; class RenderFrameHost;

View File

@ -258,10 +258,10 @@ void CefBrowserPlatformDelegate::HandleExternalProtocol(const GURL& url) {}
CefEventHandle CefBrowserPlatformDelegateNativeLinux::GetEventHandle( CefEventHandle CefBrowserPlatformDelegateNativeLinux::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const { const content::NativeWebKeyboardEvent& event) const {
if (!event.os_event) // TODO(cef): We need to return an XEvent* from this method, but
return nullptr; // |event.os_event->native_event()| now returns a ui::Event* instead.
return const_cast<CefEventHandle>( // See https://crbug.com/965991.
static_cast<CefEventHandle>(event.os_event->native_event())); return nullptr;
} }
std::unique_ptr<CefMenuRunner> std::unique_ptr<CefMenuRunner>

View File

@ -526,8 +526,7 @@ CefBrowserPlatformDelegateNativeMac::TranslateWebWheelEvent(
result.delta_y = deltaY; result.delta_y = deltaY;
result.wheel_ticks_x = deltaX / scrollbarPixelsPerCocoaTick; result.wheel_ticks_x = deltaX / scrollbarPixelsPerCocoaTick;
result.wheel_ticks_y = deltaY / scrollbarPixelsPerCocoaTick; result.wheel_ticks_y = deltaY / scrollbarPixelsPerCocoaTick;
result.delta_units = result.delta_units = ui::ScrollGranularity::kScrollByPrecisePixel;
ui::input_types::ScrollGranularity::kScrollByPrecisePixel;
if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::Button::kLeft; result.button = blink::WebMouseEvent::Button::kLeft;

View File

@ -8,6 +8,7 @@
#include "ui/base/x/x11_util.h" #include "ui/base/x/x11_util.h"
#include "ui/events/platform/platform_event_source.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/desktop_window_tree_host_x11.h"
#include "ui/views/widget/desktop_aura/x11_topmost_window_finder.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 kXdndProxy[] = "XdndProxy";
const char kUTF8String[] = "UTF8_STRING"; const char kUTF8String[] = "UTF8_STRING";
::Window FindEventTarget(const ui::PlatformEvent& xev) {
::Window target = xev->xany.window;
if (xev->type == GenericEvent)
target = static_cast<XIDeviceEvent*>(xev->xcookie.data)->event;
return target;
}
::Window FindChild(::Display* display, ::Window window) { ::Window FindChild(::Display* display, ::Window window) {
::Window root; ::Window root;
::Window parent; ::Window parent;
@ -109,8 +103,8 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser,
CWBackPixmap | CWOverrideRedirect, &swa); CWBackPixmap | CWOverrideRedirect, &swa);
CHECK(xwindow_); CHECK(xwindow_);
if (ui::PlatformEventSource::GetInstance()) DCHECK(ui::X11EventSource::HasInstance());
ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); ui::X11EventSource::GetInstance()->AddXEventDispatcher(this);
long event_mask = FocusChangeMask | StructureNotifyMask | PropertyChangeMask; long event_mask = FocusChangeMask | StructureNotifyMask | PropertyChangeMask;
XSelectInput(xdisplay_, xwindow_, event_mask); XSelectInput(xdisplay_, xwindow_, event_mask);
@ -148,8 +142,8 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser,
CefWindowX11::~CefWindowX11() { CefWindowX11::~CefWindowX11() {
DCHECK(!xwindow_); DCHECK(!xwindow_);
if (ui::PlatformEventSource::GetInstance()) DCHECK(ui::X11EventSource::HasInstance());
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); ui::X11EventSource::GetInstance()->RemoveXEventDispatcher(this);
} }
void CefWindowX11::Close() { void CefWindowX11::Close() {
@ -288,12 +282,88 @@ views::DesktopWindowTreeHostX11* CefWindowX11::GetHost() {
} }
bool CefWindowX11::CanDispatchEvent(const ui::PlatformEvent& event) { bool CefWindowX11::CanDispatchEvent(const ui::PlatformEvent& event) {
::Window target = FindEventTarget(event); DCHECK_NE(xwindow_, x11::None);
return target == xwindow_; return !!current_xevent_;
} }
uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) { 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<unsigned char**>(&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<XIDeviceEvent*>(xev.xcookie.data)->event
: xev.xany.window;
return target_window == xwindow_;
}
void CefWindowX11::ProcessXEvent(XEvent* xev) {
switch (xev->type) { switch (xev->type) {
case ConfigureNotify: { case ConfigureNotify: {
DCHECK_EQ(xwindow_, xev->xconfigure.event); DCHECK_EQ(xwindow_, xev->xconfigure.event);
@ -402,45 +472,4 @@ uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) {
break; 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<unsigned char**>(&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;
} }

View File

@ -16,6 +16,7 @@ typedef struct _XDisplay Display;
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "ui/events/platform/platform_event_dispatcher.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/geometry/rect.h"
#include "ui/gfx/x/x11_atom_cache.h" #include "ui/gfx/x/x11_atom_cache.h"
@ -25,7 +26,8 @@ class DesktopWindowTreeHostX11;
// Object wrapper for an X11 Window. // Object wrapper for an X11 Window.
// Based on WindowTreeHostX11 and DesktopWindowTreeHostX11. // Based on WindowTreeHostX11 and DesktopWindowTreeHostX11.
class CefWindowX11 : public ui::PlatformEventDispatcher { class CefWindowX11 : public ui::PlatformEventDispatcher,
public ui::XEventDispatcher {
public: public:
CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser, CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser,
::Window parent_xwindow, ::Window parent_xwindow,
@ -50,6 +52,12 @@ class CefWindowX11 : public ui::PlatformEventDispatcher {
bool CanDispatchEvent(const ui::PlatformEvent& event) override; bool CanDispatchEvent(const ui::PlatformEvent& event) override;
uint32_t DispatchEvent(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_; } ::Window xwindow() const { return xwindow_; }
gfx::Rect bounds() const { return bounds_; } gfx::Rect bounds() const { return bounds_; }
@ -58,6 +66,9 @@ class CefWindowX11 : public ui::PlatformEventDispatcher {
private: private:
void ContinueFocus(); void ContinueFocus();
bool IsTargetedBy(const XEvent& xev) const;
void ProcessXEvent(XEvent* xev);
CefRefPtr<CefBrowserHostImpl> browser_; CefRefPtr<CefBrowserHostImpl> browser_;
// The display and the native X window hosting the root window. // The display and the native X window hosting the root window.
@ -73,6 +84,11 @@ class CefWindowX11 : public ui::PlatformEventDispatcher {
bool focus_pending_; 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. // Must always be the last member.
base::WeakPtrFactory<CefWindowX11> weak_ptr_factory_; base::WeakPtrFactory<CefWindowX11> weak_ptr_factory_;

View File

@ -31,6 +31,7 @@
#include "net/base/load_flags.h" #include "net/base/load_flags.h"
#include "net/http/http_status_code.h" #include "net/http/http_status_code.h"
#include "net/http/http_util.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 "ui/base/page_transition_types.h"
#include "url/origin.h" #include "url/origin.h"
@ -1202,8 +1203,8 @@ void InitOnUIThread(
if (request.render_frame_id >= 0) { if (request.render_frame_id >= 0) {
// TODO(network): Are these main frame checks equivalent? // TODO(network): Are these main frame checks equivalent?
if (request.is_main_frame || if (request.is_main_frame ||
static_cast<content::ResourceType>(request.resource_type) == static_cast<blink::mojom::ResourceType>(request.resource_type) ==
content::ResourceType::kMainFrame) { blink::mojom::ResourceType::kMainFrame) {
frame = web_contents->GetMainFrame(); frame = web_contents->GetMainFrame();
DCHECK(frame); DCHECK(frame);
} else { } else {

View File

@ -55,7 +55,7 @@ scoped_refptr<URLLoaderFactoryGetter> URLLoaderFactoryGetter::Create(
content::devtools_instrumentation::WillCreateURLLoaderFactory( content::devtools_instrumentation::WillCreateURLLoaderFactory(
static_cast<content::RenderFrameHostImpl*>(render_frame_host), static_cast<content::RenderFrameHostImpl*>(render_frame_host),
false /* is_navigation */, false /* is_download */, 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. // Allow the Content embedder to inject itself if it wants to.

View File

@ -25,10 +25,8 @@
#include "components/viz/common/frame_sinks/begin_frame_args.h" #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/copy_output_request.h"
#include "components/viz/common/frame_sinks/delay_based_time_source.h" #include "components/viz/common/frame_sinks/delay_based_time_source.h"
#include "components/viz/common/gl_helper.h"
#include "components/viz/common/switches.h" #include "components/viz/common/switches.h"
#include "content/browser/bad_message.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/gpu/gpu_data_manager_impl.h"
#include "content/browser/renderer_host/cursor_manager.h" #include "content/browser/renderer_host/cursor_manager.h"
#include "content/browser/renderer_host/delegated_frame_host.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/browser/render_view_host.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "media/base/video_frame.h" #include "media/base/video_frame.h"
#include "ui/base/cursor/types/cursor_types.h"
#include "ui/compositor/compositor.h" #include "ui/compositor/compositor.h"
#include "ui/events/blink/blink_event_util.h" #include "ui/events/blink/blink_event_util.h"
#include "ui/events/gesture_detection/gesture_provider_config_helper.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; external_begin_frame_enabled_ = use_external_begin_frame;
content::ImageTransportFactory* factory = auto context_factory = content::GetContextFactory();
content::ImageTransportFactory::GetInstance();
ui::ContextFactoryPrivate* context_factory_private =
factory->GetContextFactoryPrivate();
// Matching the attributes from RecyclableCompositorMac. // Matching the attributes from RecyclableCompositorMac.
compositor_.reset(new ui::Compositor( compositor_.reset(new ui::Compositor(
context_factory_private->AllocateFrameSinkId(), context_factory->AllocateFrameSinkId(), context_factory,
content::GetContextFactory(), context_factory_private,
base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */, base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */,
use_external_begin_frame)); use_external_begin_frame));
compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
@ -447,8 +440,9 @@ base::Optional<SkColor> CefRenderWidgetHostViewOSR::GetBackgroundColor() {
void CefRenderWidgetHostViewOSR::UpdateBackgroundColor() {} void CefRenderWidgetHostViewOSR::UpdateBackgroundColor() {}
bool CefRenderWidgetHostViewOSR::LockMouse(bool request_unadjusted_movement) { blink::mojom::PointerLockResult CefRenderWidgetHostViewOSR::LockMouse(
return false; bool request_unadjusted_movement) {
return blink::mojom::PointerLockResult::kPermissionDenied;
} }
void CefRenderWidgetHostViewOSR::UnlockMouse() {} void CefRenderWidgetHostViewOSR::UnlockMouse() {}
@ -588,39 +582,29 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(
browser_impl_->GetClient()->GetRenderHandler(); browser_impl_->GetClient()->GetRenderHandler();
CHECK(handler); CHECK(handler);
const content::CursorInfo& cursor_info = cursor.info(); const auto& ui_cursor = cursor.cursor();
const cef_cursor_type_t cursor_type = const cef_cursor_type_t cursor_type =
static_cast<cef_cursor_type_t>(cursor_info.type); static_cast<cef_cursor_type_t>(ui_cursor.type());
CefCursorInfo custom_cursor_info; CefCursorInfo custom_cursor_info;
if (cursor_info.type == ui::CursorType::kCustom) { if (ui_cursor.type() == ui::mojom::CursorType::kCustom) {
custom_cursor_info.hotspot.x = cursor_info.hotspot.x(); custom_cursor_info.hotspot.x = ui_cursor.custom_hotspot().x();
custom_cursor_info.hotspot.y = cursor_info.hotspot.y(); custom_cursor_info.hotspot.y = ui_cursor.custom_hotspot().y();
custom_cursor_info.image_scale_factor = cursor_info.image_scale_factor; custom_cursor_info.image_scale_factor = ui_cursor.image_scale_factor();
custom_cursor_info.buffer = cursor_info.custom_image.getPixels(); custom_cursor_info.buffer = ui_cursor.custom_bitmap().getPixels();
custom_cursor_info.size.width = cursor_info.custom_image.width(); custom_cursor_info.size.width = ui_cursor.custom_bitmap().width();
custom_cursor_info.size.height = cursor_info.custom_image.height(); custom_cursor_info.size.height = ui_cursor.custom_bitmap().height();
} }
#if defined(USE_AURA) #if defined(USE_AURA)
content::WebCursor web_cursor(cursor_info); content::WebCursor web_cursor(ui_cursor);
ui::PlatformCursor platform_cursor; ui::PlatformCursor platform_cursor;
if (cursor_info.type == ui::CursorType::kCustom) { if (ui_cursor.type() == ui::mojom::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);
// |web_cursor| owns the resulting |platform_cursor|. // |web_cursor| owns the resulting |platform_cursor|.
platform_cursor = web_cursor.GetPlatformCursor(ui_cursor); platform_cursor = web_cursor.GetPlatformCursor(ui_cursor);
} else { } else {
platform_cursor = GetPlatformCursor(cursor_info.type); platform_cursor = GetPlatformCursor(ui_cursor.type());
} }
handler->OnCursorChange(browser_impl_.get(), platform_cursor, cursor_type, handler->OnCursorChange(browser_impl_.get(), platform_cursor, cursor_type,
@ -1065,8 +1049,8 @@ void CefRenderWidgetHostViewOSR::SendExternalBeginFrame() {
if (render_widget_host_) if (render_widget_host_)
render_widget_host_->ProgressFlingIfNeeded(frame_time); render_widget_host_->ProgressFlingIfNeeded(frame_time);
compositor_->context_factory_private()->IssueExternalBeginFrame( compositor_->IssueExternalBeginFrame(
compositor_.get(), begin_frame_args, /* force= */ true, begin_frame_args, /* force= */ true,
base::BindOnce(&CefRenderWidgetHostViewOSR::OnFrameComplete, base::BindOnce(&CefRenderWidgetHostViewOSR::OnFrameComplete,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));

View File

@ -28,7 +28,7 @@
#include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/browser/renderer_host/text_input_manager.h" #include "content/browser/renderer_host/text_input_manager.h"
#include "content/public/common/widget_type.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/compositor/compositor.h"
#include "ui/events/base_event_utils.h" #include "ui/events/base_event_utils.h"
#include "ui/events/gesture_detection/filtered_gesture_provider.h" #include "ui/events/gesture_detection/filtered_gesture_provider.h"
@ -49,7 +49,6 @@
#endif #endif
#if defined(USE_AURA) #if defined(USE_AURA)
#include "third_party/blink/public/platform/web_cursor_info.h"
#include "ui/base/cursor/cursor.h" #include "ui/base/cursor/cursor.h"
#endif #endif
@ -124,7 +123,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
void SetBackgroundColor(SkColor color) override; void SetBackgroundColor(SkColor color) override;
base::Optional<SkColor> GetBackgroundColor() override; base::Optional<SkColor> GetBackgroundColor() override;
void UpdateBackgroundColor() override; void UpdateBackgroundColor() override;
bool LockMouse(bool request_unadjusted_movement) override; blink::mojom::PointerLockResult LockMouse(
bool request_unadjusted_movement) override;
void UnlockMouse() override; void UnlockMouse() override;
void TakeFallbackContentFrom(content::RenderWidgetHostView* view) override; void TakeFallbackContentFrom(content::RenderWidgetHostView* view) override;
@ -321,7 +321,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
void UpdateBackgroundColorFromRenderer(SkColor color); void UpdateBackgroundColorFromRenderer(SkColor color);
#if defined(USE_AURA) #if defined(USE_AURA)
ui::PlatformCursor GetPlatformCursor(ui::CursorType type); ui::PlatformCursor GetPlatformCursor(ui::mojom::CursorType type);
#endif #endif
// The background color of the web content. // The background color of the web content.

View File

@ -5,8 +5,6 @@
#include "libcef/browser/osr/render_widget_host_view_osr.h" #include "libcef/browser/osr/render_widget_host_view_osr.h"
#include "third_party/blink/public/platform/web_cursor_info.h"
#if defined(USE_X11) #if defined(USE_X11)
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/cursorfont.h> #include <X11/cursorfont.h>
@ -23,110 +21,108 @@ namespace {
// Based on ui/base/cursor/cursor_loader_x11.cc. // Based on ui/base/cursor/cursor_loader_x11.cc.
using blink::WebCursorInfo; int ToCursorID(ui::mojom::CursorType type) {
int ToCursorID(ui::CursorType type) {
switch (type) { switch (type) {
case ui::CursorType::kPointer: case ui::mojom::CursorType::kPointer:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kCross: case ui::mojom::CursorType::kCross:
return XC_crosshair; return XC_crosshair;
case ui::CursorType::kHand: case ui::mojom::CursorType::kHand:
return XC_hand2; return XC_hand2;
case ui::CursorType::kIBeam: case ui::mojom::CursorType::kIBeam:
return XC_xterm; return XC_xterm;
case ui::CursorType::kWait: case ui::mojom::CursorType::kWait:
return XC_watch; return XC_watch;
case ui::CursorType::kHelp: case ui::mojom::CursorType::kHelp:
return XC_question_arrow; return XC_question_arrow;
case ui::CursorType::kEastResize: case ui::mojom::CursorType::kEastResize:
return XC_right_side; return XC_right_side;
case ui::CursorType::kNorthResize: case ui::mojom::CursorType::kNorthResize:
return XC_top_side; return XC_top_side;
case ui::CursorType::kNorthEastResize: case ui::mojom::CursorType::kNorthEastResize:
return XC_top_right_corner; return XC_top_right_corner;
case ui::CursorType::kNorthWestResize: case ui::mojom::CursorType::kNorthWestResize:
return XC_top_left_corner; return XC_top_left_corner;
case ui::CursorType::kSouthResize: case ui::mojom::CursorType::kSouthResize:
return XC_bottom_side; return XC_bottom_side;
case ui::CursorType::kSouthEastResize: case ui::mojom::CursorType::kSouthEastResize:
return XC_bottom_right_corner; return XC_bottom_right_corner;
case ui::CursorType::kSouthWestResize: case ui::mojom::CursorType::kSouthWestResize:
return XC_bottom_left_corner; return XC_bottom_left_corner;
case ui::CursorType::kWestResize: case ui::mojom::CursorType::kWestResize:
return XC_left_side; return XC_left_side;
case ui::CursorType::kNorthSouthResize: case ui::mojom::CursorType::kNorthSouthResize:
return XC_sb_v_double_arrow; return XC_sb_v_double_arrow;
case ui::CursorType::kEastWestResize: case ui::mojom::CursorType::kEastWestResize:
return XC_sb_h_double_arrow; return XC_sb_h_double_arrow;
case ui::CursorType::kNorthEastSouthWestResize: case ui::mojom::CursorType::kNorthEastSouthWestResize:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kNorthWestSouthEastResize: case ui::mojom::CursorType::kNorthWestSouthEastResize:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kColumnResize: case ui::mojom::CursorType::kColumnResize:
return XC_sb_h_double_arrow; return XC_sb_h_double_arrow;
case ui::CursorType::kRowResize: case ui::mojom::CursorType::kRowResize:
return XC_sb_v_double_arrow; return XC_sb_v_double_arrow;
case ui::CursorType::kMiddlePanning: case ui::mojom::CursorType::kMiddlePanning:
return XC_fleur; return XC_fleur;
case ui::CursorType::kEastPanning: case ui::mojom::CursorType::kEastPanning:
return XC_sb_right_arrow; return XC_sb_right_arrow;
case ui::CursorType::kNorthPanning: case ui::mojom::CursorType::kNorthPanning:
return XC_sb_up_arrow; return XC_sb_up_arrow;
case ui::CursorType::kNorthEastPanning: case ui::mojom::CursorType::kNorthEastPanning:
return XC_top_right_corner; return XC_top_right_corner;
case ui::CursorType::kNorthWestPanning: case ui::mojom::CursorType::kNorthWestPanning:
return XC_top_left_corner; return XC_top_left_corner;
case ui::CursorType::kSouthPanning: case ui::mojom::CursorType::kSouthPanning:
return XC_sb_down_arrow; return XC_sb_down_arrow;
case ui::CursorType::kSouthEastPanning: case ui::mojom::CursorType::kSouthEastPanning:
return XC_bottom_right_corner; return XC_bottom_right_corner;
case ui::CursorType::kSouthWestPanning: case ui::mojom::CursorType::kSouthWestPanning:
return XC_bottom_left_corner; return XC_bottom_left_corner;
case ui::CursorType::kWestPanning: case ui::mojom::CursorType::kWestPanning:
return XC_sb_left_arrow; return XC_sb_left_arrow;
case ui::CursorType::kMove: case ui::mojom::CursorType::kMove:
return XC_fleur; return XC_fleur;
case ui::CursorType::kVerticalText: case ui::mojom::CursorType::kVerticalText:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kCell: case ui::mojom::CursorType::kCell:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kContextMenu: case ui::mojom::CursorType::kContextMenu:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kAlias: case ui::mojom::CursorType::kAlias:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kProgress: case ui::mojom::CursorType::kProgress:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kNoDrop: case ui::mojom::CursorType::kNoDrop:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kCopy: case ui::mojom::CursorType::kCopy:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kNotAllowed: case ui::mojom::CursorType::kNotAllowed:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kZoomIn: case ui::mojom::CursorType::kZoomIn:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kZoomOut: case ui::mojom::CursorType::kZoomOut:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kGrab: case ui::mojom::CursorType::kGrab:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kGrabbing: case ui::mojom::CursorType::kGrabbing:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kMiddlePanningVertical: case ui::mojom::CursorType::kMiddlePanningVertical:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kMiddlePanningHorizontal: case ui::mojom::CursorType::kMiddlePanningHorizontal:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kDndNone: case ui::mojom::CursorType::kDndNone:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kDndMove: case ui::mojom::CursorType::kDndMove:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kDndCopy: case ui::mojom::CursorType::kDndCopy:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kDndLink: case ui::mojom::CursorType::kDndLink:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kNull: case ui::mojom::CursorType::kNull:
return XC_left_ptr; return XC_left_ptr;
case ui::CursorType::kCustom: case ui::mojom::CursorType::kCustom:
case ui::CursorType::kNone: case ui::mojom::CursorType::kNone:
break; break;
} }
NOTREACHED(); NOTREACHED();
@ -184,9 +180,9 @@ XCursorCache* cursor_cache = nullptr;
#endif // defined(USE_X11) #endif // defined(USE_X11)
ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor( ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor(
ui::CursorType type) { ui::mojom::CursorType type) {
#if defined(USE_X11) #if defined(USE_X11)
if (type == ui::CursorType::kNone) { if (type == ui::mojom::CursorType::kNone) {
if (!invisible_cursor_) { if (!invisible_cursor_) {
invisible_cursor_.reset(new ui::XScopedCursor(ui::CreateInvisibleCursor(), invisible_cursor_.reset(new ui::XScopedCursor(ui::CreateInvisibleCursor(),
gfx::GetXDisplay())); gfx::GetXDisplay()));

View File

@ -10,7 +10,6 @@
#include "libcef/browser/browser_host_impl.h" #include "libcef/browser/browser_host_impl.h"
#include "libcef/browser/content_browser_client.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" #include "ui/resources/grit/ui_unscaled_resources.h"
namespace { namespace {
@ -39,112 +38,110 @@ class CefCompositorHostWin : public gfx::WindowImpl {
// From content/common/cursors/webcursor_win.cc. // From content/common/cursors/webcursor_win.cc.
using blink::WebCursorInfo; LPCWSTR ToCursorID(ui::mojom::CursorType type) {
LPCWSTR ToCursorID(ui::CursorType type) {
switch (type) { switch (type) {
case ui::CursorType::kPointer: case ui::mojom::CursorType::kPointer:
return IDC_ARROW; return IDC_ARROW;
case ui::CursorType::kCross: case ui::mojom::CursorType::kCross:
return IDC_CROSS; return IDC_CROSS;
case ui::CursorType::kHand: case ui::mojom::CursorType::kHand:
return IDC_HAND; return IDC_HAND;
case ui::CursorType::kIBeam: case ui::mojom::CursorType::kIBeam:
return IDC_IBEAM; return IDC_IBEAM;
case ui::CursorType::kWait: case ui::mojom::CursorType::kWait:
return IDC_WAIT; return IDC_WAIT;
case ui::CursorType::kHelp: case ui::mojom::CursorType::kHelp:
return IDC_HELP; return IDC_HELP;
case ui::CursorType::kEastResize: case ui::mojom::CursorType::kEastResize:
return IDC_SIZEWE; return IDC_SIZEWE;
case ui::CursorType::kNorthResize: case ui::mojom::CursorType::kNorthResize:
return IDC_SIZENS; return IDC_SIZENS;
case ui::CursorType::kNorthEastResize: case ui::mojom::CursorType::kNorthEastResize:
return IDC_SIZENESW; return IDC_SIZENESW;
case ui::CursorType::kNorthWestResize: case ui::mojom::CursorType::kNorthWestResize:
return IDC_SIZENWSE; return IDC_SIZENWSE;
case ui::CursorType::kSouthResize: case ui::mojom::CursorType::kSouthResize:
return IDC_SIZENS; return IDC_SIZENS;
case ui::CursorType::kSouthEastResize: case ui::mojom::CursorType::kSouthEastResize:
return IDC_SIZENWSE; return IDC_SIZENWSE;
case ui::CursorType::kSouthWestResize: case ui::mojom::CursorType::kSouthWestResize:
return IDC_SIZENESW; return IDC_SIZENESW;
case ui::CursorType::kWestResize: case ui::mojom::CursorType::kWestResize:
return IDC_SIZEWE; return IDC_SIZEWE;
case ui::CursorType::kNorthSouthResize: case ui::mojom::CursorType::kNorthSouthResize:
return IDC_SIZENS; return IDC_SIZENS;
case ui::CursorType::kEastWestResize: case ui::mojom::CursorType::kEastWestResize:
return IDC_SIZEWE; return IDC_SIZEWE;
case ui::CursorType::kNorthEastSouthWestResize: case ui::mojom::CursorType::kNorthEastSouthWestResize:
return IDC_SIZENESW; return IDC_SIZENESW;
case ui::CursorType::kNorthWestSouthEastResize: case ui::mojom::CursorType::kNorthWestSouthEastResize:
return IDC_SIZENWSE; return IDC_SIZENWSE;
case ui::CursorType::kColumnResize: case ui::mojom::CursorType::kColumnResize:
return MAKEINTRESOURCE(IDC_COLRESIZE); return MAKEINTRESOURCE(IDC_COLRESIZE);
case ui::CursorType::kRowResize: case ui::mojom::CursorType::kRowResize:
return MAKEINTRESOURCE(IDC_ROWRESIZE); return MAKEINTRESOURCE(IDC_ROWRESIZE);
case ui::CursorType::kMiddlePanning: case ui::mojom::CursorType::kMiddlePanning:
return MAKEINTRESOURCE(IDC_PAN_MIDDLE); return MAKEINTRESOURCE(IDC_PAN_MIDDLE);
case ui::CursorType::kEastPanning: case ui::mojom::CursorType::kEastPanning:
return MAKEINTRESOURCE(IDC_PAN_EAST); return MAKEINTRESOURCE(IDC_PAN_EAST);
case ui::CursorType::kNorthPanning: case ui::mojom::CursorType::kNorthPanning:
return MAKEINTRESOURCE(IDC_PAN_NORTH); return MAKEINTRESOURCE(IDC_PAN_NORTH);
case ui::CursorType::kNorthEastPanning: case ui::mojom::CursorType::kNorthEastPanning:
return MAKEINTRESOURCE(IDC_PAN_NORTH_EAST); return MAKEINTRESOURCE(IDC_PAN_NORTH_EAST);
case ui::CursorType::kNorthWestPanning: case ui::mojom::CursorType::kNorthWestPanning:
return MAKEINTRESOURCE(IDC_PAN_NORTH_WEST); return MAKEINTRESOURCE(IDC_PAN_NORTH_WEST);
case ui::CursorType::kSouthPanning: case ui::mojom::CursorType::kSouthPanning:
return MAKEINTRESOURCE(IDC_PAN_SOUTH); return MAKEINTRESOURCE(IDC_PAN_SOUTH);
case ui::CursorType::kSouthEastPanning: case ui::mojom::CursorType::kSouthEastPanning:
return MAKEINTRESOURCE(IDC_PAN_SOUTH_EAST); return MAKEINTRESOURCE(IDC_PAN_SOUTH_EAST);
case ui::CursorType::kSouthWestPanning: case ui::mojom::CursorType::kSouthWestPanning:
return MAKEINTRESOURCE(IDC_PAN_SOUTH_WEST); return MAKEINTRESOURCE(IDC_PAN_SOUTH_WEST);
case ui::CursorType::kWestPanning: case ui::mojom::CursorType::kWestPanning:
return MAKEINTRESOURCE(IDC_PAN_WEST); return MAKEINTRESOURCE(IDC_PAN_WEST);
case ui::CursorType::kMove: case ui::mojom::CursorType::kMove:
return IDC_SIZEALL; return IDC_SIZEALL;
case ui::CursorType::kVerticalText: case ui::mojom::CursorType::kVerticalText:
return MAKEINTRESOURCE(IDC_VERTICALTEXT); return MAKEINTRESOURCE(IDC_VERTICALTEXT);
case ui::CursorType::kCell: case ui::mojom::CursorType::kCell:
return MAKEINTRESOURCE(IDC_CELL); return MAKEINTRESOURCE(IDC_CELL);
case ui::CursorType::kContextMenu: case ui::mojom::CursorType::kContextMenu:
return IDC_ARROW; return IDC_ARROW;
case ui::CursorType::kAlias: case ui::mojom::CursorType::kAlias:
return MAKEINTRESOURCE(IDC_ALIAS); return MAKEINTRESOURCE(IDC_ALIAS);
case ui::CursorType::kProgress: case ui::mojom::CursorType::kProgress:
return IDC_APPSTARTING; return IDC_APPSTARTING;
case ui::CursorType::kNoDrop: case ui::mojom::CursorType::kNoDrop:
return IDC_NO; return IDC_NO;
case ui::CursorType::kCopy: case ui::mojom::CursorType::kCopy:
return MAKEINTRESOURCE(IDC_COPYCUR); return MAKEINTRESOURCE(IDC_COPYCUR);
case ui::CursorType::kNone: case ui::mojom::CursorType::kNone:
return MAKEINTRESOURCE(IDC_CURSOR_NONE); return MAKEINTRESOURCE(IDC_CURSOR_NONE);
case ui::CursorType::kNotAllowed: case ui::mojom::CursorType::kNotAllowed:
return IDC_NO; return IDC_NO;
case ui::CursorType::kZoomIn: case ui::mojom::CursorType::kZoomIn:
return MAKEINTRESOURCE(IDC_ZOOMIN); return MAKEINTRESOURCE(IDC_ZOOMIN);
case ui::CursorType::kZoomOut: case ui::mojom::CursorType::kZoomOut:
return MAKEINTRESOURCE(IDC_ZOOMOUT); return MAKEINTRESOURCE(IDC_ZOOMOUT);
case ui::CursorType::kGrab: case ui::mojom::CursorType::kGrab:
return MAKEINTRESOURCE(IDC_HAND_GRAB); return MAKEINTRESOURCE(IDC_HAND_GRAB);
case ui::CursorType::kGrabbing: case ui::mojom::CursorType::kGrabbing:
return MAKEINTRESOURCE(IDC_HAND_GRABBING); return MAKEINTRESOURCE(IDC_HAND_GRABBING);
case ui::CursorType::kNull: case ui::mojom::CursorType::kNull:
return IDC_NO; return IDC_NO;
case ui::CursorType::kMiddlePanningVertical: case ui::mojom::CursorType::kMiddlePanningVertical:
return MAKEINTRESOURCE(IDC_PAN_MIDDLE_VERTICAL); return MAKEINTRESOURCE(IDC_PAN_MIDDLE_VERTICAL);
case ui::CursorType::kMiddlePanningHorizontal: case ui::mojom::CursorType::kMiddlePanningHorizontal:
return MAKEINTRESOURCE(IDC_PAN_MIDDLE_HORIZONTAL); return MAKEINTRESOURCE(IDC_PAN_MIDDLE_HORIZONTAL);
// TODO(cef): Find better cursors for these things // TODO(cef): Find better cursors for these things
case ui::CursorType::kDndNone: case ui::mojom::CursorType::kDndNone:
return IDC_ARROW; return IDC_ARROW;
case ui::CursorType::kDndMove: case ui::mojom::CursorType::kDndMove:
return IDC_ARROW; return IDC_ARROW;
case ui::CursorType::kDndCopy: case ui::mojom::CursorType::kDndCopy:
return IDC_ARROW; return IDC_ARROW;
case ui::CursorType::kDndLink: case ui::mojom::CursorType::kDndLink:
return IDC_ARROW; return IDC_ARROW;
case ui::CursorType::kCustom: case ui::mojom::CursorType::kCustom:
break; break;
} }
NOTREACHED(); NOTREACHED();
@ -158,7 +155,7 @@ bool IsSystemCursorID(LPCWSTR cursor_id) {
} // namespace } // namespace
ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor( ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor(
ui::CursorType type) { ui::mojom::CursorType type) {
HMODULE module_handle = NULL; HMODULE module_handle = NULL;
const wchar_t* cursor_id = ToCursorID(type); const wchar_t* cursor_id = ToCursorID(type);
if (!IsSystemCursorID(cursor_id)) { if (!IsSystemCursorID(cursor_id)) {

View File

@ -29,8 +29,11 @@ void CefWebContentsViewOSR::WebContentsCreated(
DCHECK(!web_contents_); DCHECK(!web_contents_);
web_contents_ = web_contents; web_contents_ = web_contents;
// Call this again for popup browsers now that the view should exist. auto host = web_contents_->GetRenderViewHost();
RenderViewCreated(web_contents_->GetRenderViewHost()); CefRenderWidgetHostViewOSR* view =
static_cast<CefRenderWidgetHostViewOSR*>(host->GetWidget()->GetView());
if (view)
view->InstallTransparency();
} }
gfx::NativeView CefWebContentsViewOSR::GetNativeView() const { gfx::NativeView CefWebContentsViewOSR::GetNativeView() const {
@ -123,15 +126,6 @@ CefWebContentsViewOSR::CreateViewForChildWidget(
void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {} void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {}
void CefWebContentsViewOSR::RenderViewCreated(content::RenderViewHost* host) {
if (!host)
return;
CefRenderWidgetHostViewOSR* view =
static_cast<CefRenderWidgetHostViewOSR*>(host->GetWidget()->GetView());
if (view)
view->InstallTransparency();
}
void CefWebContentsViewOSR::RenderViewReady() {} void CefWebContentsViewOSR::RenderViewReady() {}
void CefWebContentsViewOSR::RenderViewHostChanged( void CefWebContentsViewOSR::RenderViewHostChanged(

View File

@ -50,7 +50,6 @@ class CefWebContentsViewOSR : public content::WebContentsView,
content::RenderWidgetHostViewBase* CreateViewForChildWidget( content::RenderWidgetHostViewBase* CreateViewForChildWidget(
content::RenderWidgetHost* render_widget_host) override; content::RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override; void SetPageTitle(const base::string16& title) override;
void RenderViewCreated(content::RenderViewHost* host) override;
void RenderViewReady() override; void RenderViewReady() override;
void RenderViewHostChanged(content::RenderViewHost* old_host, void RenderViewHostChanged(content::RenderViewHost* old_host,
content::RenderViewHost* new_host) override; content::RenderViewHost* new_host) override;

View File

@ -784,7 +784,7 @@ void CefMainDelegate::PreSandboxStartup() {
crash_reporting::PreSandboxStartup(*command_line, process_type); crash_reporting::PreSandboxStartup(*command_line, process_type);
InitializeResourceBundle(); InitializeResourceBundle();
InitializePDF(); MaybeInitializeGDI();
} }
void CefMainDelegate::SandboxInitialized(const std::string& process_type) { void CefMainDelegate::SandboxInitialized(const std::string& process_type) {

View File

@ -23,7 +23,6 @@
#include "components/navigation_interception/navigation_params.h" #include "components/navigation_interception/navigation_params.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.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/elements_upload_data_stream.h"
#include "net/base/load_flags.h" #include "net/base/load_flags.h"
#include "net/base/upload_bytes_element_reader.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.h"
#include "services/network/public/cpp/resource_request_body.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/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_security_origin.h"
#include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h" #include "third_party/blink/public/platform/web_url.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. // Type used in UploadDataStream.
typedef std::vector<std::unique_ptr<net::UploadElementReader>> typedef std::vector<std::unique_ptr<net::UploadElementReader>>
UploadElementReaders; UploadElementReaders;
@ -610,63 +599,6 @@ void CefRequestImpl::Set(
static_cast<cef_transition_type_t>(params.transition_type()); static_cast<cef_transition_type_t>(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<CefPostDataImpl*>(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<CefPostDataElementImpl*>(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 // static
void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params, void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params,
blink::WebURLRequest& request) { blink::WebURLRequest& request) {
@ -867,8 +799,7 @@ CefRequestImpl::NetReferrerPolicyToBlinkReferrerPolicy(
case REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE: case REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE:
return network::mojom::ReferrerPolicy::kNoReferrerWhenDowngrade; return network::mojom::ReferrerPolicy::kNoReferrerWhenDowngrade;
case REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN: case REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN:
return network::mojom::ReferrerPolicy:: return network::mojom::ReferrerPolicy::kStrictOriginWhenCrossOrigin;
kNoReferrerWhenDowngradeOriginWhenCrossOrigin;
case REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN: case REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN:
return network::mojom::ReferrerPolicy::kOriginWhenCrossOrigin; return network::mojom::ReferrerPolicy::kOriginWhenCrossOrigin;
case REFERRER_POLICY_NEVER_CLEAR_REFERRER: case REFERRER_POLICY_NEVER_CLEAR_REFERRER:
@ -892,8 +823,7 @@ cef_referrer_policy_t CefRequestImpl::BlinkReferrerPolicyToNetReferrerPolicy(
switch (blink_policy) { switch (blink_policy) {
case network::mojom::ReferrerPolicy::kNoReferrerWhenDowngrade: case network::mojom::ReferrerPolicy::kNoReferrerWhenDowngrade:
return REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE; return REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE;
case network::mojom::ReferrerPolicy:: case network::mojom::ReferrerPolicy::kStrictOriginWhenCrossOrigin:
kNoReferrerWhenDowngradeOriginWhenCrossOrigin:
return REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN; return REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN;
case network::mojom::ReferrerPolicy::kOriginWhenCrossOrigin: case network::mojom::ReferrerPolicy::kOriginWhenCrossOrigin:
return REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN; return REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN;
@ -1182,42 +1112,6 @@ std::unique_ptr<net::UploadDataStream> CefPostDataImpl::Get() const {
std::move(element_readers), 0); std::move(element_readers), 0);
} }
void CefPostDataImpl::Set(const blink::WebHTTPBody& data) {
{
base::AutoLock lock_scope(lock_);
CHECK_READONLY_RETURN_VOID();
}
CefRefPtr<CefPostDataElement> 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<CefPostDataElementImpl*>(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<CefPostDataElementImpl*>(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) { void CefPostDataImpl::SetReadOnly(bool read_only) {
base::AutoLock lock_scope(lock_); base::AutoLock lock_scope(lock_);
if (read_only_ == read_only) if (read_only_ == read_only)
@ -1470,45 +1364,6 @@ std::unique_ptr<net::UploadElementReader> 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<char*>(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) { void CefPostDataElementImpl::SetReadOnly(bool read_only) {
base::AutoLock lock_scope(lock_); base::AutoLock lock_scope(lock_);
if (read_only_ == read_only) if (read_only_ == read_only)

View File

@ -15,7 +15,6 @@
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "net/cookies/site_for_cookies.h" #include "net/cookies/site_for_cookies.h"
#include "services/network/public/mojom/referrer_policy.mojom-shared.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" #include "url/gurl.h"
namespace blink { namespace blink {
@ -109,10 +108,6 @@ class CefRequestImpl : public CefRequest {
void Set(const navigation_interception::NavigationParams& params, void Set(const navigation_interception::NavigationParams& params,
bool is_main_frame); 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|. // Populate the WebURLRequest object based on the contents of |params|.
// Called from CefBrowserImpl::LoadRequest(). // Called from CefBrowserImpl::LoadRequest().
static void Get(const CefMsg_LoadRequest_Params& params, static void Get(const CefMsg_LoadRequest_Params& params,
@ -217,8 +212,6 @@ class CefPostDataImpl : public CefPostData {
void Set(const net::UploadDataStream& data_stream); void Set(const net::UploadDataStream& data_stream);
void Get(net::UploadData& data) const; void Get(net::UploadData& data) const;
std::unique_ptr<net::UploadDataStream> Get() const; std::unique_ptr<net::UploadDataStream> Get() const;
void Set(const blink::WebHTTPBody& data);
void Get(blink::WebHTTPBody& data) const;
void SetReadOnly(bool read_only); void SetReadOnly(bool read_only);
@ -270,8 +263,6 @@ class CefPostDataElementImpl : public CefPostDataElement {
void Set(const net::UploadElementReader& element_reader); void Set(const net::UploadElementReader& element_reader);
void Get(net::UploadElement& element) const; void Get(net::UploadElement& element) const;
std::unique_ptr<net::UploadElementReader> Get() const; std::unique_ptr<net::UploadElementReader> Get() const;
void Set(const blink::WebHTTPBody::Element& element);
void Get(blink::WebHTTPBody::Element& element) const;
void SetReadOnly(bool read_only); void SetReadOnly(bool read_only);

View File

@ -13,6 +13,7 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "base/thread_annotations.h"
#include "base/threading/platform_thread.h" #include "base/threading/platform_thread.h"
// Controller implementation base class. // Controller implementation base class.
@ -142,11 +143,11 @@ class CefValueControllerThreadSafe : public CefValueController {
// CefValueController methods. // CefValueController methods.
bool thread_safe() override { return true; } bool thread_safe() override { return true; }
bool on_correct_thread() override { return true; } bool on_correct_thread() override { return true; }
void lock() override { void lock() override NO_THREAD_SAFETY_ANALYSIS {
lock_.Acquire(); lock_.Acquire();
locked_thread_id_ = base::PlatformThread::CurrentId(); locked_thread_id_ = base::PlatformThread::CurrentId();
} }
void unlock() override { void unlock() override NO_THREAD_SAFETY_ANALYSIS {
locked_thread_id_ = 0; locked_thread_id_ = 0;
lock_.Release(); lock_.Release();
} }

View File

@ -378,7 +378,7 @@ CefValueController* CefValueImpl::GetValueController() const {
return nullptr; return nullptr;
} }
void CefValueImpl::AcquireLock() { void CefValueImpl::AcquireLock() NO_THREAD_SAFETY_ANALYSIS {
lock_.Acquire(); lock_.Acquire();
CefValueController* controller = GetValueController(); CefValueController* controller = GetValueController();
@ -386,7 +386,7 @@ void CefValueImpl::AcquireLock() {
controller->lock(); controller->lock();
} }
void CefValueImpl::ReleaseLock() { void CefValueImpl::ReleaseLock() NO_THREAD_SAFETY_ANALYSIS {
CefValueController* controller = GetValueController(); CefValueController* controller = GetValueController();
if (controller) { if (controller) {
controller->AssertLockAcquired(); controller->AssertLockAcquired();

View File

@ -152,7 +152,8 @@ v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
if (frame && if (frame &&
frame->GetDocument()->CanExecuteScripts(blink::kAboutToExecuteScript)) { frame->GetDocument()->CanExecuteScripts(blink::kAboutToExecuteScript)) {
func_rv = blink::V8ScriptRunner::CallFunction( func_rv = blink::V8ScriptRunner::CallFunction(
function, frame->GetDocument(), receiver, argc, args, isolate); function, frame->GetDocument()->ToExecutionContext(), receiver, argc,
args, isolate);
} }
return func_rv; return func_rv;

View File

@ -95,7 +95,6 @@
#include "third_party/blink/public/platform/platform.h" #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/scheduler/web_renderer_process_type.h"
#include "third_party/blink/public/platform/url_conversion.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_runtime_features.h"
#include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h" #include "third_party/blink/public/platform/web_url.h"
@ -115,15 +114,6 @@
namespace { 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. // Stub implementation of blink::WebPrerendererClient.
class CefPrerendererClient : public content::RenderViewObserver, class CefPrerendererClient : public content::RenderViewObserver,
public blink::WebPrerendererClient { public blink::WebPrerendererClient {
@ -141,7 +131,6 @@ class CefPrerendererClient : public content::RenderViewObserver,
void OnDestruct() override { delete this; } void OnDestruct() override { delete this; }
// WebPrerendererClient methods: // WebPrerendererClient methods:
void WillAddPrerender(blink::WebPrerender* prerender) override {}
bool IsPrefetchOnly() override { return false; } bool IsPrefetchOnly() override { return false; }
}; };
@ -404,8 +393,6 @@ void CefContentRendererClient::RenderThreadStarted() {
base::MessageLoopCurrent::Get()->AddDestructionObserver(this); base::MessageLoopCurrent::Get()->AddDestructionObserver(this);
} }
blink::WebPrerenderingSupport::Initialize(new CefPrerenderingSupport());
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
{ {
base::ScopedCFTypeRef<CFStringRef> key( base::ScopedCFTypeRef<CFStringRef> key(

View File

@ -84,12 +84,6 @@ void CefRenderThreadObserver::SetConfiguration(
void CefRenderThreadObserver::SetContentSettingRules( void CefRenderThreadObserver::SetContentSettingRules(
const RendererContentSettingRules& rules) {} 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( void CefRenderThreadObserver::OnRendererConfigurationAssociatedRequest(
mojo::PendingAssociatedReceiver<chrome::mojom::RendererConfiguration> mojo::PendingAssociatedReceiver<chrome::mojom::RendererConfiguration>
receiver) { receiver) {

View File

@ -46,8 +46,6 @@ class CefRenderThreadObserver : public content::RenderThreadObserver,
void SetConfiguration(chrome::mojom::DynamicParamsPtr params) override; void SetConfiguration(chrome::mojom::DynamicParamsPtr params) override;
void SetContentSettingRules( void SetContentSettingRules(
const RendererContentSettingRules& rules) override; const RendererContentSettingRules& rules) override;
void SetFieldTrialGroup(const std::string& trial_name,
const std::string& group_name) override;
void OnRendererConfigurationAssociatedRequest( void OnRendererConfigurationAssociatedRequest(
mojo::PendingAssociatedReceiver<chrome::mojom::RendererConfiguration> mojo::PendingAssociatedReceiver<chrome::mojom::RendererConfiguration>

View File

@ -14,6 +14,8 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/message_loop/message_loop.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_security_origin.h"
#include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h" #include "third_party/blink/public/platform/web_url.h"
@ -110,15 +112,35 @@ class CefRenderURLRequest::Context
url_client_.reset(new CefWebURLLoaderClient(this, request_->GetFlags())); url_client_.reset(new CefWebURLLoaderClient(this, request_->GetFlags()));
WebURLRequest urlRequest; std::unique_ptr<network::ResourceRequest> resource_request =
std::make_unique<network::ResourceRequest>();
static_cast<CefRequestImpl*>(request_.get()) static_cast<CefRequestImpl*>(request_.get())
->Get(urlRequest, upload_data_size_); ->Get(resource_request.get(), false);
urlRequest.SetPriority(blink::WebURLRequest::Priority::kMedium); resource_request->priority = net::MEDIUM;
// Behave the same as a subresource load.
resource_request->fetch_request_context_type =
static_cast<int>(blink::mojom::RequestContextType::SUBRESOURCE);
resource_request->resource_type =
static_cast<int>(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 // Set the origin to match the request. The requirement for an origin is
// DCHECK'd in ResourceDispatcherHostImpl::ContinuePendingBeginRequest. // DCHECK'd in ResourceDispatcherHostImpl::ContinuePendingBeginRequest.
urlRequest.SetRequestorOrigin( resource_request->request_initiator = url::Origin::Create(url);
blink::WebSecurityOrigin::Create(urlRequest.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; blink::WebURLLoaderFactory* factory = nullptr;
if (frame_) { if (frame_) {
@ -131,9 +153,13 @@ class CefRenderURLRequest::Context
} }
loader_ = factory->CreateURLLoader( loader_ = factory->CreateURLLoader(
urlRequest, blink::scheduler::WebResourceLoadingTaskRunnerHandle:: blink::WebURLRequest(),
CreateUnprioritized(task_runner_.get())); blink::scheduler::WebResourceLoadingTaskRunnerHandle::
loader_->LoadAsynchronously(urlRequest, url_client_.get()); 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; return true;
} }
@ -316,8 +342,7 @@ class CefRenderURLRequest::Context
// Upload notifications are sent using a timer and may not occur if the // Upload notifications are sent using a timer and may not occur if the
// request completes too quickly. We therefore send the notification here // request completes too quickly. We therefore send the notification here
// if necessary. // if necessary.
client_->OnUploadProgress(url_request_.get(), upload_data_size_, url_client_->DidSendData(upload_data_size_, upload_data_size_);
upload_data_size_);
got_upload_progress_complete_ = true; got_upload_progress_complete_ = true;
} }
} }

View File

@ -15,6 +15,7 @@
#include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame.h"
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h" #include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h"
#include "services/network/public/cpp/features.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" #include "third_party/blink/public/platform/web_url.h"
CefURLLoaderThrottleProviderImpl::CefURLLoaderThrottleProviderImpl( CefURLLoaderThrottleProviderImpl::CefURLLoaderThrottleProviderImpl(
@ -42,22 +43,25 @@ CefURLLoaderThrottleProviderImpl::Clone() {
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
CefURLLoaderThrottleProviderImpl::CreateThrottles( CefURLLoaderThrottleProviderImpl::CreateThrottles(
int render_frame_id, int render_frame_id,
const blink::WebURLRequest& request, const blink::WebURLRequest& request) {
content::ResourceType resource_type) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles; std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
const network::mojom::RequestDestination request_destination =
request.GetRequestDestination();
// Some throttles have already been added in the browser for frame resources. // Some throttles have already been added in the browser for frame resources.
// Don't add them for frame requests. // 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 || DCHECK(!is_frame_resource ||
type_ == content::URLLoaderThrottleProviderType::kFrame); type_ == content::URLLoaderThrottleProviderType::kFrame);
if (extensions::ExtensionsEnabled() && if (extensions::ExtensionsEnabled() &&
type_ == content::URLLoaderThrottleProviderType::kFrame && type_ == content::URLLoaderThrottleProviderType::kFrame &&
resource_type == content::ResourceType::kObject) { request_destination == network::mojom::RequestDestination::kObject) {
content::RenderFrame* render_frame = content::RenderFrame* render_frame =
content::RenderFrame::FromRoutingID(render_frame_id); content::RenderFrame::FromRoutingID(render_frame_id);
auto mime_handlers = auto mime_handlers =
@ -73,7 +77,6 @@ CefURLLoaderThrottleProviderImpl::CreateThrottles(
} }
throttles.push_back(std::make_unique<GoogleURLLoaderThrottle>( throttles.push_back(std::make_unique<GoogleURLLoaderThrottle>(
CefRenderThreadObserver::is_incognito_process(),
CefRenderThreadObserver::GetDynamicParams())); CefRenderThreadObserver::GetDynamicParams()));
return throttles; return throttles;

View File

@ -25,8 +25,7 @@ class CefURLLoaderThrottleProviderImpl
std::unique_ptr<content::URLLoaderThrottleProvider> Clone() override; std::unique_ptr<content::URLLoaderThrottleProvider> Clone() override;
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles( std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
int render_frame_id, int render_frame_id,
const blink::WebURLRequest& request, const blink::WebURLRequest& request) override;
content::ResourceType resource_type) override;
void SetOnline(bool is_online) override; void SetOnline(bool is_online) override;
private: private:

View File

@ -327,11 +327,6 @@ patches = [
# https://bitbucket.org/chromiumembedded/cef/issues/2470 # https://bitbucket.org/chromiumembedded/cef/issues/2470
'name': 'build', '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 # Changes necessary to support for chrome extensions. Add a new
# ExtensionHost constructor that allows CEF to create the WebContents. # 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. # for the cef_sandbox build, and which is no longer required.
# https://bugs.chromium.org/p/chromium/issues/detail?id=646113#c173 # https://bugs.chromium.org/p/chromium/issues/detail?id=646113#c173
# https://chromium.googlesource.com/chromium/src/+/2f28731c17 # 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', 'name': 'win_base_msvc_sandbox',
}, },
{ {
@ -493,19 +483,6 @@ patches = [
# https://chromium-review.googlesource.com/c/chromium/src/+/1884750 # https://chromium-review.googlesource.com/c/chromium/src/+/1884750
'name': 'libxml_visibility', '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. # Fix ScreenlockMonitorDeviceSource window creation error.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1058556 # https://bugs.chromium.org/p/chromium/issues/detail?id=1058556

View File

@ -1,8 +1,8 @@
diff --git base/BUILD.gn base/BUILD.gn diff --git base/BUILD.gn base/BUILD.gn
index 447280ffe5e3..ddff00ac1a69 100644 index b47b0ec88dde..d3554dd7ef6e 100644
--- base/BUILD.gn --- base/BUILD.gn
+++ 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/config/ui.gni")
import("//build/nocompile.gni") import("//build/nocompile.gni")
import("//build/timestamp.gni") import("//build/timestamp.gni")
@ -10,7 +10,7 @@ index 447280ffe5e3..ddff00ac1a69 100644
import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni") import("//testing/test.gni")
import("//third_party/icu/config.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/md5_constexpr_internal.h",
"hash/sha1.h", "hash/sha1.h",
] ]

View File

@ -12,7 +12,7 @@ index af7b3249d421..1483a48f9074 100644
// Force a new surface id to be allocated. Returns true if the // Force a new surface id to be allocated. Returns true if the
// RenderWidgetHostImpl sent the resulting surface id to the renderer. // 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 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
+++ 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() { @@ -85,6 +85,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {

View File

@ -1,8 +1,8 @@
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc 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
+++ 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 // static
void BrowserTaskExecutor::Shutdown() { void BrowserTaskExecutor::Shutdown() {

View File

@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index eef1140e8006..0e222de2a9a6 100644 index 9573394d28b8..eb3663551a62 100644
--- build/config/compiler/BUILD.gn --- build/config/compiler/BUILD.gn
+++ 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_clang_coverage && !(is_android && use_order_profiling) &&
(use_lld || (use_lld ||
(use_gold && (use_gold &&
@ -11,7 +11,7 @@ index eef1140e8006..0e222de2a9a6 100644
!(current_cpu == "x86" || current_cpu == "x64")))) !(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). # archive names to 16 characters, which is not what we want).
if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) {
arflags = [ "-T" ] arflags = [ "-T" ]

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 477e30a34cd2..7a24ff410e7e 100644 index 021b133ee20e..3282a16ad86c 100644
--- chrome/browser/BUILD.gn --- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/features.gni") @@ -11,6 +11,7 @@ import("//build/config/features.gni")
@ -8,9 +8,9 @@ index 477e30a34cd2..7a24ff410e7e 100644
import("//build/config/ui.gni") import("//build/config/ui.gni")
+import("//cef/libcef/features/features.gni") +import("//cef/libcef/features/features.gni")
import("//chrome/browser/buildflags.gni") import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//components/captive_portal/core/features.gni") @@ -1975,6 +1976,7 @@ jumbo_static_library("browser") {
@@ -1956,6 +1957,7 @@ jumbo_static_library("browser") {
"//base/util/values:values_util", "//base/util/values:values_util",
"//build:branding_buildflags", "//build:branding_buildflags",
"//cc", "//cc",
@ -18,7 +18,7 @@ index 477e30a34cd2..7a24ff410e7e 100644
"//chrome:extra_resources", "//chrome:extra_resources",
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
@@ -2275,6 +2277,10 @@ jumbo_static_library("browser") { @@ -2296,6 +2298,10 @@ jumbo_static_library("browser") {
] ]
} }

View File

@ -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 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
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -7,6 +7,7 @@ @@ -8,6 +8,7 @@
#include <utility>
#include "base/feature_list.h" #include "base/feature_list.h"
#include "build/buildflag.h"
+#include "cef/libcef/features/features.h" +#include "cef/libcef/features/features.h"
#include "chrome/browser/profiles/off_the_record_profile_impl.h" #include "chrome/browser/profiles/off_the_record_profile_impl.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.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 "content/public/browser/browser_thread.h"
#include "extensions/buildflags/buildflags.h" #include "extensions/buildflags/buildflags.h"
@ -21,7 +21,7 @@ index 1610e0ecc707..f231d5033983 100644
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_service.h"
#include "extensions/browser/extension_system.h" #include "extensions/browser/extension_system.h"
@@ -45,8 +50,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() @@ -47,8 +52,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance()); DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
#endif #endif
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
@ -36,8 +36,8 @@ index 1610e0ecc707..f231d5033983 100644
#endif #endif
} }
@@ -86,10 +97,16 @@ scoped_refptr<RefcountedKeyedService> @@ -89,10 +100,16 @@ scoped_refptr<RefcountedKeyedService>
base::FeatureList::IsEnabled(features::kPermissionDelegation))); permissions::features::kPermissionDelegation)));
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_CEF) +#if BUILDFLAG(ENABLE_CEF)

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index c820df8447f0..58cb1279b7bf 100644 index c2920a353de1..1b5a3b70b276 100644
--- chrome/browser/ui/BUILD.gn --- chrome/browser/ui/BUILD.gn
+++ 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/jumbo.gni")
import("//build/config/linux/gtk/gtk.gni") import("//build/config/linux/gtk/gtk.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
@ -10,7 +10,7 @@ index c820df8447f0..58cb1279b7bf 100644
import("//chrome/browser/buildflags.gni") import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//chromeos/assistant/assistant.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", "//build/config/compiler:wexit_time_destructors",
] ]
@ -21,7 +21,7 @@ index c820df8447f0..58cb1279b7bf 100644
# Since browser and browser_ui actually depend on each other, # Since browser and browser_ui actually depend on each other,
# we must omit the dependency from browser_ui to browser. # we must omit the dependency from browser_ui to browser.
# However, this means browser_ui and browser should more or less # 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", "//base/allocator:buildflags",
"//build:branding_buildflags", "//build:branding_buildflags",
"//cc/paint", "//cc/paint",
@ -29,7 +29,7 @@ index c820df8447f0..58cb1279b7bf 100644
"//chrome:extra_resources", "//chrome:extra_resources",
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
@@ -1438,6 +1444,7 @@ jumbo_static_library("ui") { @@ -1460,6 +1466,7 @@ jumbo_static_library("ui") {
"//components/keep_alive_registry", "//components/keep_alive_registry",
"//components/network_session_configurator/common", "//components/network_session_configurator/common",
"//components/page_load_metrics/browser", "//components/page_load_metrics/browser",

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc 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
+++ 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) { void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) {
// |allowlist| combines pref/policy + cmdline switch in the browser process. // |allowlist| combines pref/policy + cmdline switch in the browser process.
// For renderer and utility (e.g. NetworkService) processes the switch is the // 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 } // namespace
@ -29,10 +29,10 @@ index 6cdca1affb9f..f875ba1a5d75 100644
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUserAgent)) { if (command_line->HasSwitch(switches::kUserAgent)) {
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h 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
+++ 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 ChromeHidDelegate;
class ChromeSerialDelegate; class ChromeSerialDelegate;

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 3c43cc752511..fbc476cc9023 100644 index bd8f77e07208..325f4ba698ec 100644
--- chrome/browser/profiles/profile_manager.cc --- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc
@@ -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, registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
content::NotificationService::AllSources()); 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 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
+++ chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h
@@ -101,7 +101,7 @@ class ProfileManager : public content::NotificationObserver, @@ -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 // Get the path of the last used profile, or if that's undefined, the default
// profile. // profile.
diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc 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
+++ chrome/browser/profiles/renderer_updater.cc +++ chrome/browser/profiles/renderer_updater.cc
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
@ -67,12 +67,3 @@ index ce50c9ee3f92..eba0894ee2b4 100644
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
oauth2_login_manager_ = oauth2_login_manager_ =
chromeos::OAuth2LoginManagerFactory::GetForProfile(profile_); 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_));
}

View File

@ -1,12 +1,12 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn 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
+++ 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/common/safe_browsing:download_type_util",
"//chrome/services/file_util/public/cpp", "//chrome/services/file_util/public/cpp",
"//components/content_settings/core/browser", "//components/content_settings/core/browser",
+ "//components/gcm_driver:gcm_buildflags", + "//components/gcm_driver:gcm_buildflags",
"//components/language/core/common", "//components/language/core/common",
"//components/prefs", "//components/prefs",
"//components/safe_browsing/core/db", "//components/safe_browsing/core:webprotect_proto",

View File

@ -165,16 +165,16 @@ index 4e64db143b8a..71322b0261a1 100644
Profile* profile = Profile::FromBrowserContext(browser_context); Profile* profile = Profile::FromBrowserContext(browser_context);
std::vector<std::string> whitelist = MimeTypesHandler::GetMIMETypeWhitelist(); std::vector<std::string> whitelist = MimeTypesHandler::GetMIMETypeWhitelist();
diff --git chrome/common/google_url_loader_throttle.cc chrome/common/google_url_loader_throttle.cc 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
+++ 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 "chrome/common/google_url_loader_throttle.h"
#include "build/build_config.h"
+#include "cef/libcef/features/features.h" +#include "cef/libcef/features/features.h"
#include "chrome/common/net/safe_search_util.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" #include "services/network/public/mojom/url_response_head.mojom.h"
+#if BUILDFLAG(ENABLE_CEF) +#if BUILDFLAG(ENABLE_CEF)
@ -184,7 +184,7 @@ index a7e5caea5add..f9d11b317946 100644
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
#include "extensions/common/extension_urls.h" #include "extensions/common/extension_urls.h"
#endif #endif
@@ -96,6 +101,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse( @@ -116,6 +121,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse(
const GURL& response_url, const GURL& response_url,
network::mojom::URLResponseHead* response_head, network::mojom::URLResponseHead* response_head,
bool* defer) { bool* defer) {
@ -197,7 +197,7 @@ index a7e5caea5add..f9d11b317946 100644
GURL webstore_url(extension_urls::GetWebstoreLaunchURL()); GURL webstore_url(extension_urls::GetWebstoreLaunchURL());
if (response_url.SchemeIsHTTPOrHTTPS() && if (response_url.SchemeIsHTTPOrHTTPS() &&
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index e03ad3a5a115..12adcae6cf84 100644 index 6600de77c3f6..dece49ca3455 100644
--- chrome/renderer/chrome_content_renderer_client.cc --- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc
@@ -811,6 +811,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -811,6 +811,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@ -208,7 +208,7 @@ index e03ad3a5a115..12adcae6cf84 100644
content_settings_agent->IsPluginTemporarilyAllowed(identifier)) { content_settings_agent->IsPluginTemporarilyAllowed(identifier)) {
status = chrome::mojom::PluginStatus::kAllowed; status = chrome::mojom::PluginStatus::kAllowed;
} }
@@ -1009,7 +1010,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1013,7 +1014,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface( render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -218,7 +218,7 @@ index e03ad3a5a115..12adcae6cf84 100644
break; break;
} }
case chrome::mojom::PluginStatus::kBlocked: { 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)); l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading(); placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -228,7 +228,7 @@ index e03ad3a5a115..12adcae6cf84 100644
break; break;
} }
case chrome::mojom::PluginStatus::kBlockedByPolicy: { case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1028,7 +1031,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1032,7 +1035,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name)); group_name));
RenderThread::Get()->RecordAction( RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy")); UserMetricsAction("Plugin_BlockedByPolicy"));
@ -238,7 +238,7 @@ index e03ad3a5a115..12adcae6cf84 100644
break; break;
} }
case chrome::mojom::PluginStatus::kBlockedNoLoading: { case chrome::mojom::PluginStatus::kBlockedNoLoading: {
@@ -1036,7 +1040,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1040,7 +1044,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML, IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
group_name)); group_name));
@ -249,7 +249,7 @@ index e03ad3a5a115..12adcae6cf84 100644
} }
case chrome::mojom::PluginStatus::kComponentUpdateRequired: { case chrome::mojom::PluginStatus::kComponentUpdateRequired: {
diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc 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
+++ chrome/renderer/plugins/chrome_plugin_placeholder.cc +++ chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -359,8 +359,11 @@ void ChromePluginPlaceholder::OnBlockedContent( @@ -359,8 +359,11 @@ void ChromePluginPlaceholder::OnBlockedContent(

View File

@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index b2eaaf2b29fd..842e99c37e95 100644 index 9b93e72eee7b..5d7c3d7fb2ab 100644
--- chrome/renderer/BUILD.gn --- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
@ -10,7 +10,7 @@ index b2eaaf2b29fd..842e99c37e95 100644
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//components/nacl/features.gni") import("//components/nacl/features.gni")
import("//components/offline_pages/buildflags/features.gni") import("//components/offline_pages/buildflags/features.gni")
@@ -129,6 +130,7 @@ jumbo_static_library("renderer") { @@ -127,6 +128,7 @@ jumbo_static_library("renderer") {
defines = [] defines = []
deps = [ deps = [
@ -18,7 +18,7 @@ index b2eaaf2b29fd..842e99c37e95 100644
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
"//chrome/common", "//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" ] configs += [ "//build/config/compiler:wexit_time_destructors" ]

View File

@ -1,5 +1,5 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h 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
+++ content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc 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
+++ 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* plugin_service =
content::PluginService::GetInstance(); content::PluginService::GetInstance();
bool plugin_found = plugin_service->GetPluginInfo( bool plugin_found = plugin_service->GetPluginInfo(
@ -36,10 +36,10 @@ index 937d3d5bc84f..ac327392dcf3 100644
content::WebPluginInfo* plugin) override; content::WebPluginInfo* plugin) override;
diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
index 8d7b5276955d..787f338e7ca6 100644 index 5b780f8bf34c..a75d0da983b4 100644
--- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc --- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
+++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc +++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
@@ -68,7 +68,7 @@ bool IsPDFPluginEnabled(content::NavigationHandle* navigation_handle, @@ -65,7 +65,7 @@ bool IsPDFPluginEnabled(content::NavigationHandle* navigation_handle,
content::WebPluginInfo plugin_info; content::WebPluginInfo plugin_info;
return content::PluginService::GetInstance()->GetPluginInfo( return content::PluginService::GetInstance()->GetPluginInfo(
@ -49,10 +49,10 @@ index 8d7b5276955d..787f338e7ca6 100644
false /* allow_wildcard */, is_stale, &plugin_info, false /* allow_wildcard */, is_stale, &plugin_info,
nullptr /* actual_mime_type */); nullptr /* actual_mime_type */);
diff --git chrome/browser/ui/views/frame/browser_root_view.cc chrome/browser/ui/views/frame/browser_root_view.cc 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
+++ 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) #if BUILDFLAG(ENABLE_PLUGINS)
content::WebPluginInfo plugin; content::WebPluginInfo plugin;
result = result || content::PluginService::GetInstance()->GetPluginInfo( result = result || content::PluginService::GetInstance()->GetPluginInfo(
@ -62,7 +62,7 @@ index e622e8099e95..2b08fc4e3727 100644
#endif #endif
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc 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
+++ content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc
@@ -571,7 +571,7 @@ void DevToolsHttpHandler::OnJsonRequest( @@ -571,7 +571,7 @@ void DevToolsHttpHandler::OnJsonRequest(
@ -75,10 +75,10 @@ index 6518a57a5f16..e88984c8150c 100644
GetContentClient()->browser()->GetUserAgent()); GetContentClient()->browser()->GetUserAgent());
version.SetString("V8-Version", V8_VERSION_STRING); 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 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
+++ 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( void RenderFrameMessageFilter::OnGetPluginInfo(
int render_frame_id, int render_frame_id,
const GURL& url, const GURL& url,
@ -86,7 +86,7 @@ index c80e4075de69..7bc702749974 100644
const url::Origin& main_frame_origin, const url::Origin& main_frame_origin,
const std::string& mime_type, const std::string& mime_type,
bool* found, bool* found,
@@ -315,8 +316,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo( @@ -305,8 +306,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
std::string* actual_mime_type) { std::string* actual_mime_type) {
bool allow_wildcard = true; bool allow_wildcard = true;
*found = plugin_service_->GetPluginInfo( *found = plugin_service_->GetPluginInfo(
@ -99,10 +99,10 @@ index c80e4075de69..7bc702749974 100644
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin( void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h 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
+++ 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) #if BUILDFLAG(ENABLE_PLUGINS)
void OnGetPluginInfo(int render_frame_id, void OnGetPluginInfo(int render_frame_id,
const GURL& url, const GURL& url,
@ -111,10 +111,10 @@ index 9ce9487ef40c..78421b32149c 100644
const std::string& mime_type, const std::string& mime_type,
bool* found, bool* found,
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index 7f322176a102..9301825b8b59 100644 index f9125290d783..e7558300bbe3 100644
--- content/browser/loader/navigation_url_loader_impl.cc --- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc
@@ -716,6 +716,13 @@ class NavigationURLLoaderImpl::URLLoaderRequestController @@ -718,6 +718,13 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
resource_request_->has_user_gesture, resource_request_->has_user_gesture,
resource_request_->request_initiator, &loader_factory); resource_request_->request_initiator, &loader_factory);
@ -128,7 +128,7 @@ index 7f322176a102..9301825b8b59 100644
if (loader_factory) { if (loader_factory) {
factory = factory =
base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>( base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
@@ -924,7 +931,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController @@ -929,7 +936,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
frame_tree_node->current_frame_host()->GetProcess()->GetID(); frame_tree_node->current_frame_host()->GetProcess()->GetID();
int routing_id = frame_tree_node->current_frame_host()->GetRoutingID(); int routing_id = frame_tree_node->current_frame_host()->GetRoutingID();
bool has_plugin = PluginService::GetInstance()->GetPluginInfo( bool has_plugin = PluginService::GetInstance()->GetPluginInfo(
@ -138,10 +138,10 @@ index 7f322176a102..9301825b8b59 100644
if (stale) { if (stale) {
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
index 848431a0cad6..9001ad4c9e68 100644 index 8f0f145f9760..49f0698c89f5 100644
--- content/browser/plugin_service_impl.cc --- content/browser/plugin_service_impl.cc
+++ content/browser/plugin_service_impl.cc +++ content/browser/plugin_service_impl.cc
@@ -311,6 +311,7 @@ bool PluginServiceImpl::GetPluginInfoArray( @@ -340,6 +340,7 @@ bool PluginServiceImpl::GetPluginInfoArray(
bool PluginServiceImpl::GetPluginInfo(int render_process_id, bool PluginServiceImpl::GetPluginInfo(int render_process_id,
int render_frame_id, int render_frame_id,
const GURL& url, const GURL& url,
@ -149,7 +149,7 @@ index 848431a0cad6..9001ad4c9e68 100644
const url::Origin& main_frame_origin, const url::Origin& main_frame_origin,
const std::string& mime_type, const std::string& mime_type,
bool allow_wildcard, bool allow_wildcard,
@@ -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) { for (size_t i = 0; i < plugins.size(); ++i) {
if (!filter_ || if (!filter_ ||
filter_->IsPluginAvailable(render_process_id, render_frame_id, url, filter_->IsPluginAvailable(render_process_id, render_frame_id, url,
@ -224,10 +224,10 @@ index 632ae86c6fd6..55b749ec1242 100644
const std::vector<WebPluginInfo>& all_plugins); const std::vector<WebPluginInfo>& all_plugins);
diff --git content/common/frame_messages.h content/common/frame_messages.h diff --git content/common/frame_messages.h content/common/frame_messages.h
index 4370f99c9a51..8dc0736e2b59 100644 index c71e15cc41c6..420d581c04e1 100644
--- content/common/frame_messages.h --- content/common/frame_messages.h
+++ 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. // type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the // |actual_mime_type| is the actual mime type supported by the
// found plugin. // found plugin.
@ -239,8 +239,21 @@ index 4370f99c9a51..8dc0736e2b59 100644
url::Origin /* main_frame_origin */, url::Origin /* main_frame_origin */,
std::string /* mime_type */, std::string /* mime_type */,
bool /* found */, 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 <utility>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 51f31b2c7e43..85faf2c0486b 100644 index a13172df620d..16c1e118e7df 100644
--- content/public/browser/content_browser_client.h --- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
@ -251,7 +264,7 @@ index 51f31b2c7e43..85faf2c0486b 100644
#include "content/public/common/page_visibility_state.h" #include "content/public/common/page_visibility_state.h"
#include "content/public/common/previews_state.h" #include "content/public/common/previews_state.h"
#include "content/public/common/window_container_type.mojom-forward.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<url::Origin>& initiating_origin, const base::Optional<url::Origin>& initiating_origin,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory); mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@ -266,7 +279,7 @@ index 51f31b2c7e43..85faf2c0486b 100644
// Creates an OverlayWindow to be used for Picture-in-Picture. This window // 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 // will house the content shown when in Picture-in-Picture mode. This will
// return a new OverlayWindow. // 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. // Used as part of the user agent string.
virtual std::string GetProduct(); virtual std::string GetProduct();
@ -302,7 +315,7 @@ index 98c59005599e..69752184745d 100644
WebPluginInfo* plugin) = 0; WebPluginInfo* plugin) = 0;
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index 87df60c52d1e..c3841a7845dd 100644 index 56062bb2680a..246c965ed375 100644
--- content/public/renderer/content_renderer_client.h --- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h
@@ -80,6 +80,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -80,6 +80,9 @@ class CONTENT_EXPORT ContentRendererClient {
@ -315,7 +328,7 @@ index 87df60c52d1e..c3841a7845dd 100644
// Notifies that a new RenderFrame has been created. // Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {} virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -321,6 +324,10 @@ class CONTENT_EXPORT ContentRendererClient { @@ -305,6 +308,10 @@ class CONTENT_EXPORT ContentRendererClient {
// This method may invalidate the frame. // This method may invalidate the frame.
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
@ -327,10 +340,10 @@ index 87df60c52d1e..c3841a7845dd 100644
// started. // started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index 00bbbdc9b82d..a3c923fcc442 100644 index 813fd92481d5..4f609d11f92e 100644
--- content/renderer/render_frame_impl.cc --- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc
@@ -3796,7 +3796,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( @@ -3754,7 +3754,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
std::string mime_type; std::string mime_type;
bool found = false; bool found = false;
Send(new FrameHostMsg_GetPluginInfo( Send(new FrameHostMsg_GetPluginInfo(
@ -341,10 +354,10 @@ index 00bbbdc9b82d..a3c923fcc442 100644
if (!found) if (!found)
return nullptr; return nullptr;
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index ae1a77a219f1..f91dd6477bf3 100644 index 1ba5936414aa..7595a5279c1c 100644
--- content/renderer/render_thread_impl.cc --- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc
@@ -620,6 +620,8 @@ void RenderThreadImpl::Init() { @@ -623,6 +623,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
URLLoaderThrottleProviderType::kFrame); URLLoaderThrottleProviderType::kFrame);
@ -354,10 +367,10 @@ index ae1a77a219f1..f91dd6477bf3 100644
&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this))); &RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 58c1b0e78a66..e8efa7277f33 100644 index 8c641e6e3a6f..d2d1a7c2b6de 100644
--- content/renderer/renderer_blink_platform_impl.cc --- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc
@@ -914,6 +914,15 @@ RendererBlinkPlatformImpl::GetGpuFactories() { @@ -899,6 +899,15 @@ RendererBlinkPlatformImpl::GetGpuFactories() {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -374,10 +387,10 @@ index 58c1b0e78a66..e8efa7277f33 100644
if (!code_cache_host_) { if (!code_cache_host_) {
code_cache_host_ = mojo::SharedRemote<blink::mojom::CodeCacheHost>( code_cache_host_ = mojo::SharedRemote<blink::mojom::CodeCacheHost>(
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 096cd162c7d5..c409b6eb08ca 100644 index 80490f5b8d52..8c07dc87edbb 100644
--- content/renderer/renderer_blink_platform_impl.h --- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h
@@ -197,6 +197,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -198,6 +198,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
media::GpuVideoAcceleratorFactories* GetGpuFactories() override; media::GpuVideoAcceleratorFactories* GetGpuFactories() override;

View File

@ -1,5 +1,5 @@
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc 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
+++ content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc
@@ -43,6 +43,7 @@ @@ -43,6 +43,7 @@
@ -10,7 +10,7 @@ index 3b37ef6a284e..466c0331311e 100644
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "components/discardable_memory/service/discardable_shared_memory_manager.h" #include "components/discardable_memory/service/discardable_shared_memory_manager.h"
#include "components/download/public/common/download_task_runner.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; is_shutdown_ = true;
} }
@ -23,10 +23,10 @@ index 3b37ef6a284e..466c0331311e 100644
ContentMainRunner* ContentMainRunner::Create() { ContentMainRunner* ContentMainRunner::Create() {
return ContentMainRunnerImpl::Create(); return ContentMainRunnerImpl::Create();
diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h 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
+++ 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; int Run(bool start_service_manager_only) override;
void Shutdown() override; void Shutdown() override;

View File

@ -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 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
+++ 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. // will construct a bad path and could provide access to the wrong files.
// In this case, |plugin_data_directory_| will remain unset and // In this case, |plugin_data_directory_| will remain unset and
// |ValidateAndConvertPepperFilePath| will fail. // |ValidateAndConvertPepperFilePath| will fail.

View File

@ -1,5 +1,5 @@
diff --git chrome/chrome_elf/BUILD.gn chrome/chrome_elf/BUILD.gn 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
+++ chrome/chrome_elf/BUILD.gn +++ chrome/chrome_elf/BUILD.gn
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
@ -244,7 +244,7 @@ index 6e95af6ca7f5..061fb189d60f 100644
extern void InitCrashKeysForTesting(); extern void InitCrashKeysForTesting();
diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc 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
+++ components/crash/content/app/crash_reporter_client.cc +++ components/crash/content/app/crash_reporter_client.cc
@@ -88,7 +88,7 @@ int CrashReporterClient::GetResultCodeRespawnFailed() { @@ -88,7 +88,7 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
@ -305,7 +305,7 @@ index 4d2b6ad68d80..728ffd9e7b4c 100644
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
unsigned int CrashReporterClient::GetCrashDumpPercentage() { unsigned int CrashReporterClient::GetCrashDumpPercentage() {
return 100; return 100;
@@ -195,9 +223,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() { @@ -200,9 +228,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
return false; return false;
} }
@ -321,7 +321,7 @@ index 4d2b6ad68d80..728ffd9e7b4c 100644
} // namespace crash_reporter } // namespace crash_reporter
diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h 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
+++ components/crash/content/app/crash_reporter_client.h +++ components/crash/content/app/crash_reporter_client.h
@@ -5,7 +5,9 @@ @@ -5,7 +5,9 @@
@ -359,7 +359,7 @@ index d46bcc2a39b4..390654dd76fd 100644
#endif #endif
// The location where minidump files should be written. Returns true if // 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. // Returns true if breakpad should run in the given process type.
virtual bool EnableBreakpadForProcess(const std::string& process_type); virtual bool EnableBreakpadForProcess(const std::string& process_type);
@ -391,16 +391,16 @@ index d46bcc2a39b4..390654dd76fd 100644
} // namespace crash_reporter } // namespace crash_reporter
diff --git components/crash/content/app/crashpad.cc components/crash/content/app/crashpad.cc 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
+++ 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 // 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 // browser process, because the system's crash reporter can take a very long
// time to chew on symbols. // time to chew on symbols.
- if (!browser_process || is_debug_build) { - if (!browser_process || is_debug_build) {
+ if (!browser_process || is_debug_build || + if (!browser_process || is_debug_build ||
+ !crash_reporter_client->EnableBrowserCrashForwarding()) { + !GetCrashReporterClient()->EnableBrowserCrashForwarding()) {
crashpad::CrashpadInfo::GetCrashpadInfo() crashpad::CrashpadInfo::GetCrashpadInfo()
->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled); ->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled);
} }

View File

@ -130,10 +130,10 @@ index db9dface43f8..e5bdfebf8403 100644
Settings::ScopedLockedFileHandle Settings::MakeScopedLockedFileHandle( Settings::ScopedLockedFileHandle Settings::MakeScopedLockedFileHandle(
FileHandle file, FileHandle file,
diff --git third_party/crashpad/crashpad/client/settings.h third_party/crashpad/crashpad/client/settings.h 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
+++ 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. //! error logged.
bool SetLastUploadAttemptTime(time_t time); bool SetLastUploadAttemptTime(time_t time);
@ -146,7 +146,7 @@ index a2b0c74636f4..01370fdc20d9 100644
struct Data; struct Data;
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn 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
+++ third_party/crashpad/crashpad/handler/BUILD.gn +++ third_party/crashpad/crashpad/handler/BUILD.gn
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
@ -248,7 +248,7 @@ index 2ec1147d2620..8ff9a72e0bd7 100644
//! \brief Calls ProcessPendingReports() in response to ReportPending() having //! \brief Calls ProcessPendingReports() in response to ReportPending() having
//! been called on any thread, as well as periodically on a timer. //! 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 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
+++ third_party/crashpad/crashpad/handler/handler_main.cc +++ third_party/crashpad/crashpad/handler/handler_main.cc
@@ -36,8 +36,10 @@ @@ -36,8 +36,10 @@
@ -273,7 +273,7 @@ index 1cf655aec466..50ff7ed6fdbf 100644
namespace crashpad { namespace crashpad {
namespace { namespace {
@@ -204,6 +210,9 @@ struct Options { @@ -215,6 +221,9 @@ struct Options {
bool periodic_tasks; bool periodic_tasks;
bool rate_limit; bool rate_limit;
bool upload_gzip; bool upload_gzip;
@ -283,7 +283,7 @@ index 1cf655aec466..50ff7ed6fdbf 100644
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
bool use_cros_crash_reporter = false; bool use_cros_crash_reporter = false;
base::FilePath minidump_dir_for_tests; base::FilePath minidump_dir_for_tests;
@@ -563,6 +572,9 @@ int HandlerMain(int argc, @@ -577,6 +586,9 @@ int HandlerMain(int argc,
kOptionTraceParentWithException, kOptionTraceParentWithException,
#endif #endif
kOptionURL, kOptionURL,
@ -293,8 +293,8 @@ index 1cf655aec466..50ff7ed6fdbf 100644
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
kOptionUseCrosCrashReporter, kOptionUseCrosCrashReporter,
kOptionMinidumpDirForTests, kOptionMinidumpDirForTests,
@@ -649,6 +661,9 @@ int HandlerMain(int argc, @@ -675,6 +687,9 @@ int HandlerMain(int argc,
#endif // OS_CHROMEOS #endif // OS_ANDROID
{"help", no_argument, nullptr, kOptionHelp}, {"help", no_argument, nullptr, kOptionHelp},
{"version", no_argument, nullptr, kOptionVersion}, {"version", no_argument, nullptr, kOptionVersion},
+ {"max-uploads", required_argument, nullptr, kOptionMaxUploads}, + {"max-uploads", required_argument, nullptr, kOptionMaxUploads},
@ -303,7 +303,7 @@ index 1cf655aec466..50ff7ed6fdbf 100644
{nullptr, 0, nullptr, 0}, {nullptr, 0, nullptr, 0},
}; };
@@ -788,6 +803,27 @@ int HandlerMain(int argc, @@ -823,6 +838,27 @@ int HandlerMain(int argc,
options.url = optarg; options.url = optarg;
break; break;
} }
@ -331,7 +331,7 @@ index 1cf655aec466..50ff7ed6fdbf 100644
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
case kOptionUseCrosCrashReporter: { case kOptionUseCrosCrashReporter: {
options.use_cros_crash_reporter = true; 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.upload_gzip = options.upload_gzip;
upload_thread_options.watch_pending_reports = options.periodic_tasks; upload_thread_options.watch_pending_reports = options.periodic_tasks;
@ -346,7 +346,7 @@ index 1cf655aec466..50ff7ed6fdbf 100644
upload_thread.Get()->Start(); upload_thread.Get()->Start();
} }
@@ -984,7 +1026,8 @@ int HandlerMain(int argc, @@ -1043,7 +1085,8 @@ int HandlerMain(int argc,
ScopedStoppable prune_thread; ScopedStoppable prune_thread;
if (options.periodic_tasks) { if (options.periodic_tasks) {
prune_thread.Reset(new PruneCrashReportThread( prune_thread.Reset(new PruneCrashReportThread(

View File

@ -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 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
+++ chrome/browser/extensions/api/streams_private/streams_private_api.cc +++ chrome/browser/extensions/api/streams_private/streams_private_api.cc
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
@ -9,8 +9,8 @@ index 3841b7adf65d..41ca32ea5e2f 100644
+#include "cef/libcef/features/features.h" +#include "cef/libcef/features/features.h"
#include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/prerender/prerender_contents.h" #include "chrome/browser/prerender/prerender_contents.h"
#include "content/public/browser/browser_thread.h" #include "components/sessions/core/session_id.h"
@@ -40,6 +41,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( @@ -41,6 +42,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
if (!web_contents) if (!web_contents)
return; return;
@ -18,7 +18,7 @@ index 3841b7adf65d..41ca32ea5e2f 100644
// If the request was for a prerender, abort the prerender and do not // If the request was for a prerender, abort the prerender and do not
// continue. This is because plugins cancel prerender, see // continue. This is because plugins cancel prerender, see
// http://crbug.com/343590. // 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); prerender_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD);
return; return;
} }
@ -132,7 +132,7 @@ index 093fb25589a9..3e6247802c52 100644
// A weak pointer to the current or pending RenderViewHost. We don't access // A weak pointer to the current or pending RenderViewHost. We don't access
// this through the host_contents because we want to deal with the pending // this through the host_contents because we want to deal with the pending
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
index e697984786c5..dc84cfd92669 100644 index c2d64706c1db..4d5c75dd035f 100644
--- extensions/browser/extensions_browser_client.h --- extensions/browser/extensions_browser_client.h
+++ extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h
@@ -56,6 +56,7 @@ class ComponentExtensionResourceManager; @@ -56,6 +56,7 @@ class ComponentExtensionResourceManager;

View File

@ -1,8 +1,8 @@
diff --git .gn .gn diff --git .gn .gn
index 1bd5722a6ca5..c8919a7b4ab2 100644 index 7ad6b3bc6298..6dc25b644f2b 100644
--- .gn --- .gn
+++ .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", "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
@ -12,10 +12,10 @@ index 1bd5722a6ca5..c8919a7b4ab2 100644
# https://crbug.com/474506. # https://crbug.com/474506.
"//clank/java/BUILD.gn", "//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn diff --git BUILD.gn BUILD.gn
index d4c2158d938c..b58ce91305fe 100644 index 6791cf2464d3..a00f33f5987f 100644
--- BUILD.gn --- BUILD.gn
+++ BUILD.gn +++ BUILD.gn
@@ -219,6 +219,7 @@ group("gn_all") { @@ -222,6 +222,7 @@ group("gn_all") {
if (!is_ios && !is_fuchsia) { if (!is_ios && !is_fuchsia) {
deps += [ deps += [
@ -56,10 +56,10 @@ index 982fbe8d3f0d..e757be4688f1 100644
+ "studio path") + "studio path")
} }
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni 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
+++ 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 input_locales = locales
@ -69,7 +69,7 @@ index 5121fa721a06..b5ab128722f0 100644
if (is_mac) { if (is_mac) {
output_locales = locales_as_mac_outputs output_locales = locales_as_mac_outputs
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn 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
+++ chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn
@@ -134,7 +134,7 @@ template("generate_mini_installer") { @@ -134,7 +134,7 @@ template("generate_mini_installer") {

View File

@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec 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
+++ 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. # Please read the header and find the right section above instead.
# Resource ids starting at 31000 are reserved for projects built on Chromium. # Resource ids starting at 31000 are reserved for projects built on Chromium.

View File

@ -1,5 +1,5 @@
diff --git ui/base/ime/win/input_method_win_base.cc ui/base/ime/win/input_method_win_base.cc 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
+++ 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 { @@ -263,8 +263,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const {

View File

@ -1,5 +1,5 @@
diff --git content/browser/child_process_launcher_helper_linux.cc content/browser/child_process_launcher_helper_linux.cc 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
+++ content/browser/child_process_launcher_helper_linux.cc +++ content/browser/child_process_launcher_helper_linux.cc
@@ -164,7 +164,7 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( @@ -164,7 +164,7 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread(
@ -25,7 +25,7 @@ index 0aaed76c1dda..517c3d8b5772 100644
if (base::PathExists(sandbox_candidate)) if (base::PathExists(sandbox_candidate))
sandbox_binary = sandbox_candidate; sandbox_binary = sandbox_candidate;
diff --git ui/gl/init/gl_initializer_x11.cc ui/gl/init/gl_initializer_x11.cc 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
+++ ui/gl/init/gl_initializer_x11.cc +++ ui/gl/init/gl_initializer_x11.cc
@@ -86,7 +86,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { @@ -86,7 +86,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {

View File

@ -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" ]

View File

@ -1,5 +1,5 @@
diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc 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
+++ base/files/file_path_watcher_linux.cc +++ base/files/file_path_watcher_linux.cc
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
@ -18,7 +18,7 @@ index 51cecad2eb04..004054491187 100644
#include <fstream> #include <fstream>
#include <map> #include <map>
#include <memory> #include <memory>
@@ -263,22 +265,15 @@ void InotifyReaderThreadDelegate::ThreadMain() { @@ -263,8 +265,10 @@ void InotifyReaderThreadDelegate::ThreadMain() {
PlatformThread::SetName("inotify_reader"); PlatformThread::SetName("inotify_reader");
// Make sure the file descriptors are good for use with select(). // Make sure the file descriptors are good for use with select().
@ -30,14 +30,11 @@ index 51cecad2eb04..004054491187 100644
+ } }; + } };
while (true) { while (true) {
- fd_set rfds; fd_set rfds;
- FD_ZERO(&rfds); @@ -272,10 +276,9 @@ void InotifyReaderThreadDelegate::ThreadMain() {
- FD_SET(inotify_fd_, &rfds); FD_SET(inotify_fd_, &rfds);
-
- ScopedBlockingCall scoped_blocking_call(FROM_HERE, // Wait until some inotify events are available.
- BlockingType::WILL_BLOCK);
-
- // Wait until some inotify events are available.
- int select_result = - int select_result =
- HANDLE_EINTR(select(inotify_fd_ + 1, &rfds, nullptr, nullptr, nullptr)); - HANDLE_EINTR(select(inotify_fd_ + 1, &rfds, nullptr, nullptr, nullptr));
- if (select_result < 0) { - if (select_result < 0) {

View File

@ -1,5 +1,5 @@
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
index e486fb0d16e3..312ff3d3703c 100644 index 0deebafe135f..fdbd9a7ecf17 100644
--- ui/gl/init/gl_initializer_mac.cc --- ui/gl/init/gl_initializer_mac.cc
+++ ui/gl/init/gl_initializer_mac.cc +++ ui/gl/init/gl_initializer_mac.cc
@@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() { @@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() {

View File

@ -43,7 +43,7 @@ index 61b8c6fcc42d..d439b00a87bb 100644
#if !defined(OS_NACL) #if !defined(OS_NACL)
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
index 3e9562cc4cc5..cf4a700364d3 100644 index 8f6258f7644a..9c356dea5234 100644
--- base/message_loop/message_pump_win.cc --- base/message_loop/message_pump_win.cc
+++ base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@

View File

@ -1,5 +1,5 @@
diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h 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
+++ content/browser/web_contents/web_contents_view.h +++ content/browser/web_contents/web_contents_view.h
@@ -23,7 +23,7 @@ struct DropData; @@ -23,7 +23,7 @@ struct DropData;

View File

@ -41,10 +41,10 @@ index cc4b13a7b9c6..84f3b9ed7cf4 100644
} // namespace content } // namespace content
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc 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
+++ 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); view_->set_is_currently_scrolling_viewport(true);
} }
@ -57,10 +57,10 @@ index 954011b5d562..da67cd106cec 100644
const WebInputEvent& event) { const WebInputEvent& event) {
if ((base::FeatureList::IsEnabled( if ((base::FeatureList::IsEnabled(
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h 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
+++ 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 ProgressFlingIfNeeded(base::TimeTicks current_time);
void StopFling(); void StopFling();

View File

@ -1,8 +1,8 @@
diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h
index fe4ca0fafd45..025424a1654c 100644 index 1df0ec456eca..ca472453aef2 100644
--- content/public/common/common_param_traits_macros.h --- content/public/common/common_param_traits_macros.h
+++ content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h
@@ -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(main_frame_resizes_are_orientation_changes)
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
@ -11,7 +11,7 @@ index fe4ca0fafd45..025424a1654c 100644
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop) IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc
index b982618bef48..075efffc1ad7 100644 index 8d1b50f56adf..1e1ad9227ce0 100644
--- content/public/common/web_preferences.cc --- content/public/common/web_preferences.cc
+++ content/public/common/web_preferences.cc +++ content/public/common/web_preferences.cc
@@ -165,6 +165,7 @@ WebPreferences::WebPreferences() @@ -165,6 +165,7 @@ WebPreferences::WebPreferences()
@ -23,10 +23,10 @@ index b982618bef48..075efffc1ad7 100644
record_whole_document(false), record_whole_document(false),
cookie_enabled(true), cookie_enabled(true),
diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h
index 04c03cfcb774..4f5488ef1699 100644 index 76cb05a11674..355c32dd6c55 100644
--- content/public/common/web_preferences.h --- content/public/common/web_preferences.h
+++ content/public/common/web_preferences.h +++ content/public/common/web_preferences.h
@@ -180,6 +180,7 @@ struct CONTENT_EXPORT WebPreferences { @@ -181,6 +181,7 @@ struct CONTENT_EXPORT WebPreferences {
bool spatial_navigation_enabled; bool spatial_navigation_enabled;
bool caret_browsing_enabled; bool caret_browsing_enabled;
bool navigate_on_drag_drop; bool navigate_on_drag_drop;
@ -35,10 +35,10 @@ index 04c03cfcb774..4f5488ef1699 100644
bool record_whole_document; bool record_whole_document;
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
index bd44565e78aa..dcb7bbd6d875 100644 index 9c452f46c9a1..018190efd2b4 100644
--- content/renderer/render_view_impl.cc --- content/renderer/render_view_impl.cc
+++ content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc
@@ -968,6 +968,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, @@ -962,6 +962,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
#endif #endif
WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available); WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available);

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc 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
+++ chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
@ -34,7 +34,7 @@ index c880e6ba1766..d168a5fb44bb 100644
bool DownloadPrefs::IsFromTrustedSource(const download::DownloadItem& item) { 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 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
+++ chrome/browser/printing/print_preview_dialog_controller.cc +++ chrome/browser/printing/print_preview_dialog_controller.cc
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
@ -45,7 +45,7 @@ index 8c2609b8447c..f113149a30e8 100644
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
#include "chrome/browser/printing/print_view_manager.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()) content::HostZoomMap::Get(preview_dialog->GetSiteInstance())
->SetZoomLevelForHostAndScheme(print_url.scheme(), print_url.host(), 0); ->SetZoomLevelForHostAndScheme(print_url.scheme(), print_url.host(), 0);
PrintViewManager::CreateForWebContents(preview_dialog); PrintViewManager::CreateForWebContents(preview_dialog);
@ -112,10 +112,10 @@ index b59728f623e3..6fd443962836 100644
ConstrainedWebDialogUI::~ConstrainedWebDialogUI() { ConstrainedWebDialogUI::~ConstrainedWebDialogUI() {
diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc 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
+++ 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) {} sticky_settings_(sticky_settings) {}
PdfPrinterHandler::~PdfPrinterHandler() { PdfPrinterHandler::~PdfPrinterHandler() {
@ -126,7 +126,7 @@ index c87e8694d1fa..af5f4126fd3d 100644
} }
void PdfPrinterHandler::Reset() { void PdfPrinterHandler::Reset() {
@@ -227,12 +229,14 @@ void PdfPrinterHandler::StartPrint( @@ -226,12 +228,14 @@ void PdfPrinterHandler::StartPrint(
return; return;
} }
@ -141,7 +141,7 @@ index c87e8694d1fa..af5f4126fd3d 100644
DCHECK(!print_callback_); DCHECK(!print_callback_);
print_callback_ = std::move(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 // If the directory is empty there is no reason to create it or use the
// default location. // default location.
if (path.empty()) { if (path.empty()) {
@ -153,9 +153,9 @@ index c87e8694d1fa..af5f4126fd3d 100644
return; return;
} }
@@ -383,8 +391,14 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename, @@ -380,8 +388,14 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
FROM_HERE, base::ThreadPool::PostTaskAndReplyWithResult(
{base::ThreadPool(), base::MayBlock(), base::TaskPriority::BEST_EFFORT}, FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT},
base::BindOnce(&SelectSaveDirectory, path, default_path), base::BindOnce(&SelectSaveDirectory, path, default_path),
+#if !BUILDFLAG(ENABLE_CEF) +#if !BUILDFLAG(ENABLE_CEF)
base::BindOnce(&PdfPrinterHandler::OnDirectorySelected, base::BindOnce(&PdfPrinterHandler::OnDirectorySelected,
@ -168,7 +168,7 @@ index c87e8694d1fa..af5f4126fd3d 100644
} }
void PdfPrinterHandler::PostPrintToPdfTask() { 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); FileSelected(path, 0, nullptr);
} }
@ -176,7 +176,7 @@ index c87e8694d1fa..af5f4126fd3d 100644
void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename, void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
const base::FilePath& directory) { const base::FilePath& directory) {
base::FilePath path = directory.Append(filename); 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(), &file_type_info, 0, base::FilePath::StringType(),
platform_util::GetTopLevel(preview_web_contents_->GetNativeView()), NULL); platform_util::GetTopLevel(preview_web_contents_->GetNativeView()), NULL);
} }
@ -262,7 +262,7 @@ index 0881b3dd9303..4df6883d4d05 100644
Profile* const profile_; Profile* const profile_;
PrintPreviewStickySettings* const sticky_settings_; 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 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
+++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
@ -273,7 +273,7 @@ index b5370dedff93..e9966c08b4f8 100644
#include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/bad_message.h" #include "chrome/browser/bad_message.h"
#include "chrome/browser/browser_process.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)); initial_settings.SetKey(kPolicies, std::move(policies));
if (IsCloudPrintEnabled() && if (IsCloudPrintEnabled() &&
@ -282,7 +282,7 @@ index b5370dedff93..e9966c08b4f8 100644
initial_settings.SetStringKey( initial_settings.SetStringKey(
kCloudPrintURL, GURL(cloud_devices::GetCloudPrintURL()).spec()); 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(); return privet_printer_handler_.get();
} }
@ -292,7 +292,7 @@ index b5370dedff93..e9966c08b4f8 100644
#endif #endif
if (printer_type == PrinterType::kPdfPrinter) { if (printer_type == PrinterType::kPdfPrinter) {
if (!pdf_printer_handler_) { if (!pdf_printer_handler_) {
@@ -1433,7 +1437,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( @@ -1430,7 +1434,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
if (printer_type == PrinterType::kCloudPrinter) { if (printer_type == PrinterType::kCloudPrinter) {
// This printer handler is currently experimental. Ensure it is never // This printer handler is currently experimental. Ensure it is never
// created unless the flag is enabled. // created unless the flag is enabled.
@ -301,7 +301,7 @@ index b5370dedff93..e9966c08b4f8 100644
if (!cloud_printer_handler_) if (!cloud_printer_handler_)
cloud_printer_handler_ = PrinterHandler::CreateForCloudPrinters(); cloud_printer_handler_ = PrinterHandler::CreateForCloudPrinters();
return cloud_printer_handler_.get(); 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() { void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
@ -309,7 +309,7 @@ index b5370dedff93..e9966c08b4f8 100644
DCHECK(!identity_manager_); DCHECK(!identity_manager_);
cloud_print_enabled_ = cloud_print_enabled_ =
!base::Contains(printer_type_deny_list_, kCloudPrinter) && !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_ = IdentityManagerFactory::GetForProfile(profile);
identity_manager_->AddObserver(this); identity_manager_->AddObserver(this);
@ -318,7 +318,7 @@ index b5370dedff93..e9966c08b4f8 100644
void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { 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 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
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
@ -329,7 +329,7 @@ index 758f61539d5e..37cd13836464 100644
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part.h" #include "chrome/browser/browser_process_platform_part.h"
#include "chrome/browser/printing/background_printing_manager.h" #include "chrome/browser/printing/background_printing_manager.h"
@@ -77,12 +78,16 @@ namespace printing { @@ -76,12 +77,16 @@ namespace printing {
namespace { namespace {
@ -346,7 +346,7 @@ index 758f61539d5e..37cd13836464 100644
#if !BUILDFLAG(OPTIMIZE_WEBUI) #if !BUILDFLAG(OPTIMIZE_WEBUI)
constexpr char kGeneratedPath[] = 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); source->AddBoolean("isEnterpriseManaged", enterprise_managed);
bool cloud_printer_handler_enabled = bool cloud_printer_handler_enabled =

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc 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
+++ 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())), PrintingContext::Create(printing_context_delegate_.get())),
thread_("Printing_Worker") { thread_("Printing_Worker") {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK_CURRENTLY_ON(content::BrowserThread::IO);

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc 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
+++ chrome/browser/renderer_preferences_util.cc +++ chrome/browser/renderer_preferences_util.cc
@@ -31,7 +31,8 @@ @@ -31,7 +31,8 @@

View File

@ -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 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
+++ 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() { void RenderWidgetHostViewAura::UpdateBackgroundColor() {
DCHECK(GetBackgroundColor()); DCHECK(GetBackgroundColor());
@ -19,7 +19,7 @@ index 80c67b78d9f6..6ca0fb1aaf85 100644
} }
void RenderWidgetHostViewAura::WindowTitleChanged() { 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. // Init(), because it needs to have the layer.
if (frame_sink_id_.is_valid()) if (frame_sink_id_.is_valid())
window_->SetEmbedFrameSinkId(frame_sink_id_); window_->SetEmbedFrameSinkId(frame_sink_id_);

View File

@ -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 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
+++ 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; return 0;
} }
@ -43,7 +56,7 @@ index 53e9e0aafc49..20b13ebc17b5 100644
// A flag to indicate whether Main() has been called before. On Android, we // A flag to indicate whether Main() has been called before. On Android, we
// may re-run Main() without restarting the browser process. This flag // 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; MainDelegate::InitializeParams init_params;
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
@ -57,7 +70,7 @@ index 53e9e0aafc49..20b13ebc17b5 100644
InitializeMac(); InitializeMac();
#endif #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) { switch (process_type) {
case ProcessType::kDefault: case ProcessType::kDefault:
NOTREACHED(); NOTREACHED();
@@ -424,6 +431,8 @@ int Main(const MainParams& params) { @@ -456,6 +463,8 @@ int Main(const MainParams& params) {
break; break;
} }
@ -94,7 +107,7 @@ index 53e9e0aafc49..20b13ebc17b5 100644
if (tracker) { if (tracker) {
if (exit_code == 0) { if (exit_code == 0) {
tracker->SetProcessPhaseIfEnabled( tracker->SetProcessPhaseIfEnabled(
@@ -435,13 +444,38 @@ int Main(const MainParams& params) { @@ -467,13 +476,38 @@ int Main(const MainParams& params) {
} }
} }

View File

@ -1,16 +1,16 @@
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc 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
+++ chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc
@@ -17,6 +17,7 @@ @@ -18,6 +18,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_split.h" #include "base/strings/string_split.h"
#include "base/task/post_task.h" #include "base/task/post_task.h"
#include "base/task/thread_pool.h"
+#include "cef/libcef/features/features.h" +#include "cef/libcef/features/features.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/browser/content_settings/host_content_settings_map_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 = network_context_params->cookie_manager_params =
CreateCookieManagerParams(profile_, *cookie_settings_); CreateCookieManagerParams(profile_, *cookie_settings_);
@ -33,7 +33,7 @@ index 75981a42a314..d29366145453 100644
PrefService* local_state = g_browser_process->local_state(); PrefService* local_state = g_browser_process->local_state();
// Configure the HTTP cache path and size. // Configure the HTTP cache path and size.
base::FilePath base_cache_path; base::FilePath base_cache_path;
@@ -693,6 +707,7 @@ ProfileNetworkContextService::CreateNetworkContextParams( @@ -696,6 +710,7 @@ ProfileNetworkContextService::CreateNetworkContextParams(
base_cache_path.Append(chrome::kCacheDirname); base_cache_path.Append(chrome::kCacheDirname);
network_context_params->http_cache_max_size = network_context_params->http_cache_max_size =
local_state->GetInteger(prefs::kDiskCacheSize); local_state->GetInteger(prefs::kDiskCacheSize);
@ -42,10 +42,10 @@ index 75981a42a314..d29366145453 100644
// Currently this just contains HttpServerProperties, but that will likely // Currently this just contains HttpServerProperties, but that will likely
// change. // change.
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h 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
+++ 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 ShouldRestoreOldSessionCookies();
virtual bool ShouldPersistSessionCookies(); virtual bool ShouldPersistSessionCookies();
@ -117,7 +117,7 @@ index 996ad7d14dfb..5c8e43c1d29c 100644
virtual void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, virtual void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd,
const std::string& parent_absolute_name) const; const std::string& parent_absolute_name) const;
diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc 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
+++ services/network/cookie_manager.cc +++ services/network/cookie_manager.cc
@@ -228,14 +228,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { @@ -228,14 +228,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) {
@ -139,10 +139,10 @@ index 5dbc9d2dfcfb..1c31d97825c2 100644
void CookieManager::SetForceKeepSessionState() { void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc 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
+++ 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<SessionCleanupCookieStore> session_cleanup_cookie_store; scoped_refptr<SessionCleanupCookieStore> session_cleanup_cookie_store;
@ -150,7 +150,7 @@ index e5dfb9c6fd20..07578a987dd9 100644
if (params_->cookie_path) { if (params_->cookie_path) {
scoped_refptr<base::SequencedTaskRunner> client_task_runner = scoped_refptr<base::SequencedTaskRunner> client_task_runner =
base::ThreadTaskRunnerHandle::Get(); base::ThreadTaskRunnerHandle::Get();
@@ -1792,18 +1793,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( @@ -1811,18 +1812,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
session_cleanup_cookie_store = session_cleanup_cookie_store =
base::MakeRefCounted<SessionCleanupCookieStore>(sqlite_store); base::MakeRefCounted<SessionCleanupCookieStore>(sqlite_store);
@ -165,27 +165,26 @@ index e5dfb9c6fd20..07578a987dd9 100644
} else { } else {
DCHECK(!params_->restore_old_session_cookies); DCHECK(!params_->restore_old_session_cookies);
DCHECK(!params_->persist_session_cookies); DCHECK(!params_->persist_session_cookies);
+
+ cookie_store = + cookie_store =
+ std::make_unique<net::CookieMonster>(nullptr /* store */, net_log); + std::make_unique<net::CookieMonster>(nullptr /* store */, net_log);
} + }
+
+ if (params_->cookieable_schemes.has_value()) { + if (params_->cookieable_schemes.has_value()) {
+ cookie_store->SetCookieableSchemes( + cookie_store->SetCookieableSchemes(
+ *params_->cookieable_schemes, + *params_->cookieable_schemes,
+ net::CookieStore::SetCookieableSchemesCallback()); + net::CookieStore::SetCookieableSchemesCallback());
+ } }
+
+ builder.SetCookieStore(std::move(cookie_store)); + builder.SetCookieStore(std::move(cookie_store));
+ +
std::unique_ptr<net::StaticHttpUserAgentSettings> user_agent_settings = #if BUILDFLAG(IS_TRUST_TOKENS_SUPPORTED)
std::make_unique<net::StaticHttpUserAgentSettings>( if (base::FeatureList::IsEnabled(features::kTrustTokens)) {
params_->accept_language, params_->user_agent); if (params_->trust_token_path) {
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom 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
+++ 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. // cookies. Otherwise it should be false.
bool persist_session_cookies = false; bool persist_session_cookies = false;

View File

@ -1,8 +1,8 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc 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
+++ 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(); WebContents* web_contents = web_contents_getter_.Run();
@ -13,7 +13,7 @@ index 5283293ac557..407de9a5e23a 100644
// WeakPtr is not strictly necessary here due to OnRequestCancelled. // WeakPtr is not strictly necessary here due to OnRequestCancelled.
creating_login_delegate_ = true; creating_login_delegate_ = true;
@@ -729,12 +725,6 @@ void OnAuthRequiredContinuation( @@ -840,12 +836,6 @@ void OnAuthRequiredContinuation(
web_contents_getter = web_contents_getter =
base::BindRepeating(GetWebContents, process_id, routing_id); base::BindRepeating(GetWebContents, process_id, routing_id);
} }
@ -26,7 +26,7 @@ index 5283293ac557..407de9a5e23a 100644
new LoginHandlerDelegate(std::move(auth_challenge_responder), new LoginHandlerDelegate(std::move(auth_challenge_responder),
std::move(web_contents_getter), auth_info, std::move(web_contents_getter), auth_info,
is_request_for_main_frame, process_id, routing_id, is_request_for_main_frame, process_id, routing_id,
@@ -2411,15 +2401,21 @@ void StoragePartitionImpl::GetQuotaSettings( @@ -2573,15 +2563,21 @@ void StoragePartitionImpl::GetQuotaSettings(
return; return;
} }

View File

@ -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;

View File

@ -39,10 +39,10 @@ index 2a6cfc54d866..48623ab5d672 100644
}; };
diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc 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
+++ 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(); MaybeEnableAutoResize();
} }
@ -54,10 +54,10 @@ index 982ab4872532..e24c59e4e363 100644
if (crashed_overlay_view_ == crashed_overlay_view) if (crashed_overlay_view_ == crashed_overlay_view)
return; return;
diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h 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
+++ 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, void EnableSizingFromWebContents(const gfx::Size& min_size,
const gfx::Size& max_size); const gfx::Size& max_size);

View File

@ -1,22 +1,22 @@
diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc
index 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
+++ 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 // If we're not incognito mode, schedule all of our file tasks to enable
// disk on the storage context. // disk on the storage context.
- if (!context->IsOffTheRecord() && io_thread_valid) { - if (!context->IsOffTheRecord() && io_thread_valid) {
+ if (!context->GetPath().empty() && !context->IsOffTheRecord() && + if (!context->GetPath().empty() && !context->IsOffTheRecord() &&
+ io_thread_valid) { + io_thread_valid) {
file_task_runner = base::CreateTaskRunner( file_task_runner = base::ThreadPool::CreateTaskRunner(
{base::ThreadPool(), base::MayBlock(), {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
base::TaskPriority::USER_VISIBLE, base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
diff --git content/browser/browser_context.cc content/browser/browser_context.cc 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
+++ 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/content_switches.h"
#include "content/public/common/service_manager_connection.h" #include "content/public/common/service_manager_connection.h"
#include "content/public/common/service_names.mojom.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/base/media_switches.h"
#include "media/capabilities/in_memory_video_decode_stats_db_impl.h" #include "media/capabilities/in_memory_video_decode_stats_db_impl.h"
#include "media/capabilities/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 = StoragePartitionImplMap* partition_map =
GetStoragePartitionMap(browser_context); GetStoragePartitionMap(browser_context);
@ -33,7 +33,7 @@ index 44e6a961112b..f1f3e1af7f16 100644
in_memory = true; in_memory = true;
return partition_map->Get(partition_domain, partition_name, in_memory, 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); kUseInMemoryDBDefault);
std::unique_ptr<media::VideoDecodeStatsDB> stats_db; std::unique_ptr<media::VideoDecodeStatsDB> stats_db;
@ -43,10 +43,10 @@ index 44e6a961112b..f1f3e1af7f16 100644
std::make_unique<media::InMemoryVideoDecodeStatsDBImpl>(nullptr); std::make_unique<media::InMemoryVideoDecodeStatsDBImpl>(nullptr);
} else { } else {
diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc
index d4cb25f0b5c5..46a145e175e6 100644 index 41dc6c9ac188..b125c1d2bcc8 100644
--- storage/browser/database/database_tracker.cc --- storage/browser/database/database_tracker.cc
+++ storage/browser/database/database_tracker.cc +++ storage/browser/database/database_tracker.cc
@@ -509,7 +509,7 @@ bool DatabaseTracker::LazyInit() { @@ -506,7 +506,7 @@ bool DatabaseTracker::LazyInit() {
meta_table_.reset(new sql::MetaTable()); meta_table_.reset(new sql::MetaTable());
is_initialized_ = is_initialized_ =

View File

@ -1,5 +1,5 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h 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
+++ base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h
@@ -52,6 +52,8 @@ @@ -52,6 +52,8 @@

View File

@ -39,10 +39,10 @@ index 5bcc6204c2b5..1bf18609d150 100644
virtual void MenuWillShow() {} virtual void MenuWillShow() {}
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc 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
+++ ui/gfx/render_text.cc +++ ui/gfx/render_text.cc
@@ -611,6 +611,14 @@ void RenderText::SetWhitespaceElision(base::Optional<bool> whitespace_elision) { @@ -609,6 +609,14 @@ void RenderText::SetWhitespaceElision(base::Optional<bool> whitespace_elision) {
} }
} }
@ -57,7 +57,7 @@ index 6a97b1501d3d..3ac88ea133fc 100644
void RenderText::SetDisplayRect(const Rect& r) { void RenderText::SetDisplayRect(const Rect& r) {
if (r != display_rect_) { if (r != display_rect_) {
display_rect_ = r; display_rect_ = r;
@@ -1964,6 +1972,19 @@ void RenderText::OnTextAttributeChanged() { @@ -1987,6 +1995,19 @@ void RenderText::OnTextAttributeChanged() {
layout_text_up_to_date_ = false; 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 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
+++ ui/gfx/render_text.h +++ ui/gfx/render_text.h
@@ -324,6 +324,10 @@ class GFX_EXPORT RenderText { @@ -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 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
+++ 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. // this isn't necessary anymore.
virtual InkDrop* GetInkDrop(); virtual InkDrop* GetInkDrop();
@ -115,10 +115,10 @@ index 846a4a7f09de..aded39658834 100644
// Size used for the default SquareInkDropRipple. // Size used for the default SquareInkDropRipple.
static constexpr gfx::Size kDefaultInkDropSize = gfx::Size(24, 24); 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 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
+++ 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(); SchedulePaint();
} }
@ -132,10 +132,10 @@ index 12c05efa8c12..eb9c49125501 100644
const gfx::Size previous_image_size(image_->GetPreferredSize()); const gfx::Size previous_image_size(image_->GetPreferredSize());
UpdateImage(); UpdateImage();
diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h 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
+++ 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::State GetForegroundThemeState(
ui::NativeTheme::ExtraParams* params) const override; ui::NativeTheme::ExtraParams* params) const override;
@ -146,7 +146,7 @@ index ba9f5f8cd8c7..f1ab98728425 100644
ImageView* image() const { return image_; } ImageView* image() const { return image_; }
Label* label() const { return label_; } Label* label() const { return label_; }
diff --git ui/views/controls/label.cc ui/views/controls/label.cc 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
+++ ui/views/controls/label.cc +++ ui/views/controls/label.cc
@@ -53,6 +53,20 @@ bool IsOpaque(SkColor color) { @@ -53,6 +53,20 @@ bool IsOpaque(SkColor color) {
@ -170,7 +170,7 @@ index be8d8e8dddf9..6e5efacde451 100644
} // namespace } // namespace
namespace views { namespace views {
@@ -309,6 +323,14 @@ base::string16 Label::GetTooltipText() const { @@ -310,6 +324,14 @@ base::string16 Label::GetTooltipText() const {
return tooltip_text_; return tooltip_text_;
} }
@ -185,7 +185,7 @@ index be8d8e8dddf9..6e5efacde451 100644
void Label::SetTooltipText(const base::string16& tooltip_text) { void Label::SetTooltipText(const base::string16& tooltip_text) {
DCHECK(handles_tooltips_); DCHECK(handles_tooltips_);
if (tooltip_text_ == tooltip_text) if (tooltip_text_ == tooltip_text)
@@ -583,7 +605,19 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const { @@ -587,7 +609,19 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
render_text->SetFontList(font_list()); render_text->SetFontList(font_list());
render_text->set_shadows(GetShadows()); render_text->set_shadows(GetShadows());
render_text->SetCursorEnabled(false); render_text->SetCursorEnabled(false);
@ -207,10 +207,10 @@ index be8d8e8dddf9..6e5efacde451 100644
render_text->SetMultiline(multiline); render_text->SetMultiline(multiline);
render_text->SetMaxLines(multiline ? GetMaxLines() : 0); render_text->SetMaxLines(multiline ? GetMaxLines() : 0);
diff --git ui/views/controls/label.h ui/views/controls/label.h 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
+++ 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; gfx::ElideBehavior GetElideBehavior() const;
void SetElideBehavior(gfx::ElideBehavior elide_behavior); 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 // 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 // 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 // overrides the default behavior and lets you set a custom tooltip. To
@@ -412,6 +416,7 @@ class VIEWS_EXPORT Label : public View, @@ -413,6 +417,7 @@ class VIEWS_EXPORT Label : public View,
bool collapse_when_hidden_; bool collapse_when_hidden_ = false;
int fixed_width_; int fixed_width_ = 0;
int max_width_; int max_width_ = 0;
+ int draw_strings_flags_ = 0; + int draw_strings_flags_ = 0;
std::unique_ptr<SelectionController> selection_controller_; std::unique_ptr<SelectionController> selection_controller_;
@ -261,7 +261,7 @@ index 36e7f97887fd..940fb3d8a338 100644
SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); SetSelection(item, SELECTION_UPDATE_IMMEDIATELY);
else if (item->GetParentMenuItem()->GetParentMenuItem()) else if (item->GetParentMenuItem()->GetParentMenuItem())
diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h
index bdbd9c7e37b8..86138fd1d21c 100644 index 2a03ff43f4a6..c12d68eb212c 100644
--- ui/views/controls/menu/menu_delegate.h --- ui/views/controls/menu/menu_delegate.h
+++ ui/views/controls/menu/menu_delegate.h +++ ui/views/controls/menu/menu_delegate.h
@@ -81,6 +81,22 @@ class VIEWS_EXPORT MenuDelegate { @@ -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 // The tooltip shown for the menu item. This is invoked when the user
// hovers over the item, and no tooltip text has been set for that item. // hovers over the item, and no tooltip text has been set for that item.
virtual base::string16 GetTooltipText(int id, virtual base::string16 GetTooltipText(int id,
@@ -208,6 +224,11 @@ class VIEWS_EXPORT MenuDelegate { @@ -207,6 +223,11 @@ class VIEWS_EXPORT MenuDelegate {
bool* has_mnemonics, bool* has_mnemonics,
MenuButton** button); MenuButton** button);
@ -300,10 +300,10 @@ index bdbd9c7e37b8..86138fd1d21c 100644
virtual int GetMaxWidthForMenu(MenuItemView* menu); virtual int GetMaxWidthForMenu(MenuItemView* menu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index 07fc2153d8ad..f3fce1b3fd88 100644 index c67fc8503db7..604c8e29f5e3 100644
--- ui/views/controls/menu/menu_item_view.cc --- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc
@@ -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_y(spilling_rect.y() - corner_radius_);
spilling_rect.set_height(spilling_rect.height() + corner_radius_); spilling_rect.set_height(spilling_rect.height() + corner_radius_);
canvas->DrawRoundRect(spilling_rect, corner_radius_, flags); canvas->DrawRoundRect(spilling_rect, corner_radius_, flags);
@ -319,7 +319,7 @@ index 07fc2153d8ad..f3fce1b3fd88 100644
} else if (render_selection) { } else if (render_selection) {
gfx::Rect item_bounds = GetLocalBounds(); gfx::Rect item_bounds = GetLocalBounds();
if (type_ == Type::kActionableSubMenu) { 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 { SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const {
@ -334,10 +334,10 @@ index 07fc2153d8ad..f3fce1b3fd88 100644
GetMenuController() && GetMenuController()->use_touchable_layout() GetMenuController() && GetMenuController()->use_touchable_layout()
? style::CONTEXT_TOUCH_MENU ? style::CONTEXT_TOUCH_MENU
diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc
index 792b864594b3..58015004ac44 100644 index 373ea41937fe..8d13cab6916b 100644
--- ui/views/controls/menu/menu_model_adapter.cc --- ui/views/controls/menu/menu_model_adapter.cc
+++ ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc
@@ -229,6 +229,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const { @@ -228,6 +228,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const {
return false; return false;
} }
@ -441,10 +441,10 @@ index 78f832fd3acf..cb030c991614 100644
void WillHideMenu(MenuItemView* menu) override; void WillHideMenu(MenuItemView* menu) override;
void OnMenuClosed(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 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
+++ 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_ = scroll_down_button_ =
AddChildView(std::make_unique<MenuScrollButton>(content_view, false)); AddChildView(std::make_unique<MenuScrollButton>(content_view, false));
@ -457,10 +457,10 @@ index 2bd5d97fccea..996b94916a15 100644
content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition()); 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 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
+++ 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); aura::test::QueryLatestMousePositionRequestInHost(host);
host->ConvertPixelsToDIP(&root_current_location); host->ConvertPixelsToDIP(&root_current_location);
@ -472,22 +472,22 @@ index 6e69e4018a3b..f44fadcbb4c1 100644
// Move the cursor because EnterNotify/LeaveNotify are generated with the // Move the cursor because EnterNotify/LeaveNotify are generated with the
// current mouse position as a result of XGrabPointer() // current mouse position as a result of XGrabPointer()
diff --git ui/views/view.h ui/views/view.h diff --git ui/views/view.h ui/views/view.h
index be4814ab5df3..dcddea54b813 100644 index b1dfe17e2b28..87480a766437 100644
--- ui/views/view.h --- ui/views/view.h
+++ ui/views/view.h +++ ui/views/view.h
@@ -22,6 +22,7 @@ @@ -23,6 +23,7 @@
#include "base/i18n/rtl.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/ptr_util.h"
+#include "base/supports_user_data.h" +#include "base/supports_user_data.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkPath.h"
#include "ui/accessibility/ax_enums.mojom-forward.h" #include "ui/accessibility/ax_enums.mojom-forward.h"
@@ -273,6 +274,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, @@ -273,6 +274,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::EventTarget,
public ui::EventHandler, public ui::EventHandler,
public ui::PropertyHandler, public ui::PropertyHandler,
public metadata::MetaDataProvider,
+ public base::SupportsUserData, + public base::SupportsUserData,
public virtual WidgetGetter { public views::metadata::MetaDataProvider {
public: public:
using Views = std::vector<View*>; using Views = std::vector<View*>;

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 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
+++ 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; return screen_info.device_scale_factor;
} }
@ -18,10 +18,10 @@ index 95724e75d7c9..1b39dd036bc1 100644
return renderer_frame_number_; return renderer_frame_number_;
} }
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index 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
+++ 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 MouseWheelPhaseHandler;
class RenderWidgetHostImpl; class RenderWidgetHostImpl;
class RenderWidgetHostViewBaseObserver; class RenderWidgetHostViewBaseObserver;
@ -29,7 +29,7 @@ index 226e7c96a2b7..a00d3a66d913 100644
class SyntheticGestureTarget; class SyntheticGestureTarget;
class TextInputManager; class TextInputManager;
class TouchSelectionControllerClientManager; class TouchSelectionControllerClientManager;
@@ -83,6 +84,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase @@ -82,6 +83,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
float current_device_scale_factor() const { float current_device_scale_factor() const {
return current_device_scale_factor_; return current_device_scale_factor_;
} }
@ -39,7 +39,7 @@ index 226e7c96a2b7..a00d3a66d913 100644
// Returns the focused RenderWidgetHost inside this |view|'s RWH. // Returns the focused RenderWidgetHost inside this |view|'s RWH.
RenderWidgetHostImpl* GetFocusedWidget() const; RenderWidgetHostImpl* GetFocusedWidget() const;
@@ -117,6 +121,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase @@ -116,6 +120,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
void DisableAutoResize(const gfx::Size& new_size) override; void DisableAutoResize(const gfx::Size& new_size) override;
bool IsScrollOffsetAtTop() override; bool IsScrollOffsetAtTop() override;
float GetDeviceScaleFactor() final; float GetDeviceScaleFactor() final;
@ -73,7 +73,7 @@ index 226e7c96a2b7..a00d3a66d913 100644
FRIEND_TEST_ALL_PREFIXES( FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest, 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 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
+++ 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 @@ @@ -33,6 +33,10 @@
@ -86,8 +86,8 @@ index eeb44c8c3e99..74d1130ab509 100644
+ +
#if defined(OS_WIN) #if defined(OS_WIN)
#include "content/browser/frame_host/render_frame_host_impl.h" #include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/public/common/context_menu_params.h" #include "ui/aura/window_tree_host.h"
@@ -898,6 +902,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { @@ -896,6 +900,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
::SetFocus(hwnd); ::SetFocus(hwnd);
} }
} }
@ -103,10 +103,10 @@ index eeb44c8c3e99..74d1130ab509 100644
// TODO(wjmaclean): can host_ ever be null? // TODO(wjmaclean): can host_ ever be null?
if (host_ && set_focus_on_mouse_down_or_key_event_) { if (host_ && set_focus_on_mouse_down_or_key_event_) {
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
index 15cdc228387e..e469ae6063c9 100644 index d7631d9b2246..853692333f9d 100644
--- content/public/browser/render_widget_host_view.h --- content/public/browser/render_widget_host_view.h
+++ content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h
@@ -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. // This must always return the same device scale factor as GetScreenInfo.
virtual float GetDeviceScaleFactor() = 0; virtual float GetDeviceScaleFactor() = 0;
@ -122,10 +122,10 @@ index 15cdc228387e..e469ae6063c9 100644
// Set the view's active state (i.e., tint state of controls). // Set the view's active state (i.e., tint state of controls).
virtual void SetActive(bool active) = 0; virtual void SetActive(bool active) = 0;
diff --git ui/base/x/x11_window.cc ui/base/x/x11_window.cc 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
+++ 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; attribute_mask |= CWBorderPixel;
swa.border_pixel = 0; swa.border_pixel = 0;
@ -140,10 +140,10 @@ index 639174bb1a3c..2472a61b33e2 100644
bounds_in_pixels_.height(), bounds_in_pixels_.height(),
0, // border width 0, // border width
diff --git ui/base/x/x11_window.h ui/base/x/x11_window.h 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
+++ 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/rect.h"
#include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/size_f.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.h"
#include "ui/gfx/x/x11_types.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_name;
std::string wm_class_class; std::string wm_class_class;
std::string wm_role_name; std::string wm_role_name;
@ -160,10 +160,10 @@ index 3045c434cfa5..c6a626933f4c 100644
XWindow(); XWindow();
diff --git ui/platform_window/x11/x11_window.cc ui/platform_window/x11/x11_window.cc 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
+++ 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_class_class = properties.wm_class_class;
config.wm_role_name = properties.wm_role_name; config.wm_role_name = properties.wm_role_name;
config.activatable = properties.activatable; config.activatable = properties.activatable;
@ -198,7 +198,7 @@ index 6030f29ac64f..d7a679c4a1b8 100644
properties->x11_extension_delegate = this; 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 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
+++ 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) { @@ -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; remove_standard_frame_ = params.remove_standard_frame;
has_non_client_view_ = Widget::RequiresNonClientView(params.type); 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) { void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
@ -234,7 +234,7 @@ index e772d98f95d0..ac8f59c8d180 100644
bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index 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
+++ 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 @@ -288,6 +288,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@ -249,10 +249,10 @@ index b195b582fe58..f189bd083982 100644
// a reference. // a reference.
corewm::TooltipWin* tooltip_; corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 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
+++ 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: // DesktopWindowTreeHostX11, DesktopWindowTreeHost implementation:
void DesktopWindowTreeHostX11::Init(const Widget::InitParams& params) { void DesktopWindowTreeHostX11::Init(const Widget::InitParams& params) {
@ -262,7 +262,7 @@ index 955a3a3bbe3d..77cfe052ed63 100644
DesktopWindowTreeHostLinux::Init(params); DesktopWindowTreeHostLinux::Init(params);
// Set XEventDelegate to receive selection, drag&drop and raw key events. // 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: // DesktopWindowTreeHostX11 implementation:
@ -329,10 +329,10 @@ index 53da309c14d3..7a50560c8abc 100644
}; };
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 750f064c58fb..1e44f073d1d8 100644 index 734e988c5a9a..02e30f2f8b7f 100644
--- ui/views/widget/widget.cc --- ui/views/widget/widget.cc
+++ 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.name = params.delegate->GetContentsView()->GetClassName();
params.child |= (params.type == InitParams::TYPE_CONTROL); params.child |= (params.type == InitParams::TYPE_CONTROL);
@ -342,7 +342,7 @@ index 750f064c58fb..1e44f073d1d8 100644
if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred && if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred &&
params.type != views::Widget::InitParams::TYPE_WINDOW) { 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) { } else if (delegate) {
SetContentsView(delegate->GetContentsView()); SetContentsView(delegate->GetContentsView());
@ -354,9 +354,9 @@ index 750f064c58fb..1e44f073d1d8 100644
+ SetInitialBoundsForFramelessWindow(bounds); + SetInitialBoundsForFramelessWindow(bounds);
+ } + }
} }
// TODO(https://crbug.com/953978): Use GetNativeTheme() for all platforms.
#if defined(OS_MACOSX) || defined(OS_WIN) observer_manager_.Add(GetNativeTheme());
@@ -1180,10 +1186,16 @@ void Widget::OnNativeWidgetDestroyed() { @@ -1147,10 +1153,16 @@ void Widget::OnNativeWidgetDestroyed() {
} }
gfx::Size Widget::GetMinimumSize() const { 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 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
+++ 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; gfx::NativeView parent = nullptr;
@ -387,10 +387,10 @@ index 108a170a7aaa..034a5fe6deef 100644
// the NativeWidget may specify a default size. If the parent is specified, // the NativeWidget may specify a default size. If the parent is specified,
// |bounds| is in the parent's coordinate system. If the parent is not // |bounds| is in the parent's coordinate system. If the parent is not
diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h
index 66cc515a670e..57d7bf241cb8 100644 index a3ec229f11cb..714f608b7b58 100644
--- ui/views/widget/widget_delegate.h --- ui/views/widget/widget_delegate.h
+++ ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h
@@ -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. // be cycled through with keyboard focus.
virtual void GetAccessiblePanes(std::vector<View*>* panes) {} virtual void GetAccessiblePanes(std::vector<View*>* panes) {}
@ -415,10 +415,10 @@ index 40e66a212e3e..08ee8523ab15 100644
if (native_widget_delegate->IsDialogBox()) { if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME; *style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index 5bfd12452008..8289108b7acf 100644 index 10f39e919d56..787a92fefdce 100644
--- ui/views/win/hwnd_message_handler.cc --- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc
@@ -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) { } else if (event.type() == ui::ET_MOUSEWHEEL) {
ui::MouseWheelEvent mouse_wheel_event(msg); ui::MouseWheelEvent mouse_wheel_event(msg);
// Reroute the mouse wheel to the window under the pointer if applicable. // Reroute the mouse wheel to the window under the pointer if applicable.

View File

@ -80,7 +80,7 @@ index 1026b739d283..fe562ab60ce9 100644
private: private:
const HWND hwnd_; const HWND hwnd_;
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn 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
+++ components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn
@@ -13,7 +13,10 @@ config("viz_service_implementation") { @@ -13,7 +13,10 @@ config("viz_service_implementation") {
@ -95,7 +95,7 @@ index 7a1277ad28ed..4a426441e505 100644
"display/bsp_tree.h", "display/bsp_tree.h",
"display/bsp_walk_action.cc", "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 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
+++ components/viz/service/display_embedder/output_surface_provider_impl.cc +++ components/viz/service/display_embedder/output_surface_provider_impl.cc
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
@ -106,7 +106,7 @@ index 97feccc71b94..4388a702977f 100644
#include "components/viz/common/display/renderer_settings.h" #include "components/viz/common/display/renderer_settings.h"
#include "components/viz/common/frame_sinks/begin_frame_source.h" #include "components/viz/common/frame_sinks/begin_frame_source.h"
#include "components/viz/service/display_embedder/gl_output_surface.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_) if (headless_)
return std::make_unique<SoftwareOutputDevice>(); return std::make_unique<SoftwareOutputDevice>();
@ -128,7 +128,7 @@ index 97feccc71b94..4388a702977f 100644
return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_, return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_,
display_client); display_client);
diff --git components/viz/service/display_embedder/software_output_device_win.cc components/viz/service/display_embedder/software_output_device_win.cc 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
+++ 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( @@ -268,8 +268,9 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
@ -143,11 +143,31 @@ index bb07c338fac5..60441480f981 100644
waiting_on_draw_ack_ = true; waiting_on_draw_ack_ = true;
TRACE_EVENT_ASYNC_BEGIN0("viz", "SoftwareOutputDeviceWinProxy::Draw", this); 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<HostDisplayClient>(compositor);
+ if (compositor->delegate()) {
+ compositor_data.display_client =
+ compositor->delegate()->CreateHostDisplayClient();
+ } else {
+ compositor_data.display_client =
+ std::make_unique<HostDisplayClient>(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 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
+++ 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 { namespace viz {
class HostFrameSinkManager; class HostFrameSinkManager;
@ -158,17 +178,17 @@ index ac94eab98fd0..b89d52a0c869 100644
@@ -82,6 +83,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions { @@ -82,6 +83,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions {
// For preventing frame swaps of wrong size during resize on Windows. // For preventing frame swaps of wrong size during resize on Windows.
// (https://crbug.com/811945) // (https://crbug.com/811945)
friend class ui::HostContextFactoryPrivate; friend class ui::Compositor;
+ // For query of whether to use SoftwareOutputDevice or not + // For query of whether to use SoftwareOutputDevice or not.
+ friend class viz::GpuDisplayProvider; + friend class viz::GpuDisplayProvider;
// END ALLOWED USAGE. // END ALLOWED USAGE.
#if ENABLE_SYNC_CALL_RESTRICTIONS #if ENABLE_SYNC_CALL_RESTRICTIONS
diff --git services/viz/privileged/mojom/compositing/display_private.mojom services/viz/privileged/mojom/compositing/display_private.mojom 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
+++ 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 { interface DisplayClient {
@ -196,7 +216,7 @@ index 6b7fbb6cf13d..e2af75168cb9 100644
+ Draw(gfx.mojom.Rect damage_rect) => (); + Draw(gfx.mojom.Rect damage_rect) => ();
}; };
diff --git ui/compositor/compositor.h ui/compositor/compositor.h 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
+++ ui/compositor/compositor.h +++ ui/compositor/compositor.h
@@ -23,7 +23,9 @@ @@ -23,7 +23,9 @@
@ -209,8 +229,8 @@ index 443406844ecf..b7a48194e9d9 100644
#include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/pending_remote.h"
#include "services/viz/privileged/mojom/compositing/vsync_parameter_observer.mojom-forward.h" #include "services/viz/privileged/mojom/compositing/vsync_parameter_observer.mojom-forward.h"
#include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkColor.h"
@@ -166,6 +168,14 @@ class COMPOSITOR_EXPORT ContextFactory { @@ -122,6 +124,14 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
}; };
+class COMPOSITOR_EXPORT CompositorDelegate { +class COMPOSITOR_EXPORT CompositorDelegate {
@ -224,7 +244,7 @@ index 443406844ecf..b7a48194e9d9 100644
// Compositor object to take care of GPU painting. // Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final // A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an // 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. // Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw(); void ScheduleDraw();
@ -234,32 +254,12 @@ index 443406844ecf..b7a48194e9d9 100644
// Sets the root of the layer tree drawn by this Compositor. The root layer // 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 // 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 // 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, @@ -390,6 +403,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
ui::ContextFactory* context_factory_;
ui::ContextFactoryPrivate* context_factory_private_; std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
+ CompositorDelegate* delegate_ = nullptr; + CompositorDelegate* delegate_ = nullptr;
+ +
// The root of the Layer tree drawn by this compositor. // The root of the Layer tree drawn by this compositor.
Layer* root_layer_ = nullptr; 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<HostDisplayClient>(compositor);
+ if (compositor->delegate()) {
+ compositor_data.display_client =
+ compositor->delegate()->CreateHostDisplayClient();
+ } else {
+ compositor_data.display_client =
+ std::make_unique<HostDisplayClient>(compositor);
+ }
root_params->display_client =
compositor_data.display_client->GetBoundRemote(resize_task_runner_);

View File

@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index ea2e52bf16dd..d77c3f7b991a 100644 index b57520fe4254..0aa0a4a7c058 100644
--- content/browser/web_contents/web_contents_impl.cc --- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc
@@ -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; std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, 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(render_view_host_delegate_view_);
CHECK(view_.get()); CHECK(view_.get());
@@ -2881,6 +2888,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( @@ -2894,6 +2901,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
// objects. // objects.
create_params.renderer_initiated_creation = !is_new_browsing_instance; create_params.renderer_initiated_creation = !is_new_browsing_instance;
@ -46,10 +46,10 @@ index ea2e52bf16dd..d77c3f7b991a 100644
+ &create_params.delegate_view); + &create_params.delegate_view);
+ } + }
+ +
// If |is_new_browsing_instance| is true, defer routing_id allocation std::unique_ptr<WebContentsImpl> new_contents;
// to the WebContentsImpl::Create() call. This is required because with if (!is_guest) {
// a new browsing instance, WebContentsImpl::Create() may elect a different create_params.context = view_->GetNativeView();
@@ -6308,6 +6324,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, @@ -6356,6 +6372,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
// This is an outermost WebContents. // This is an outermost WebContents.
SetAsFocusedWebContentsIfNecessary(); SetAsFocusedWebContentsIfNecessary();
} }
@ -60,23 +60,23 @@ index ea2e52bf16dd..d77c3f7b991a 100644
void WebContentsImpl::DidCallFocus() { void WebContentsImpl::DidCallFocus() {
diff --git content/public/browser/web_contents.cc content/public/browser/web_contents.cc 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
+++ 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), renderer_initiated_creation(false),
desired_renderer_state(kOkayToHaveRendererProcess), desired_renderer_state(kOkayToHaveRendererProcess),
starting_sandbox_flags(blink::WebSandboxFlags::kNone), starting_sandbox_flags(blink::mojom::WebSandboxFlags::kNone),
+ view(nullptr), + view(nullptr),
+ delegate_view(nullptr), + delegate_view(nullptr),
is_never_visible(false) {} is_never_visible(false) {}
WebContents::CreateParams::CreateParams(const CreateParams& other) = default; WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 40e1e940f87b..e08b16c26327 100644 index cf98180740c4..c4eba9a42702 100644
--- content/public/browser/web_contents.h --- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h +++ content/public/browser/web_contents.h
@@ -79,9 +79,11 @@ class BrowserPluginGuestDelegate; @@ -82,9 +82,11 @@ class BrowserPluginGuestDelegate;
class InterstitialPage; class InterstitialPage;
class RenderFrameHost; class RenderFrameHost;
class RenderViewHost; class RenderViewHost;
@ -85,12 +85,12 @@ index 40e1e940f87b..e08b16c26327 100644
class RenderWidgetHostView; class RenderWidgetHostView;
class WebContentsDelegate; class WebContentsDelegate;
+class WebContentsView; +class WebContentsView;
class WebUI;
struct CustomContextMenuContext; struct CustomContextMenuContext;
struct DropData; struct DropData;
struct FaviconURL; @@ -212,6 +214,10 @@ class WebContents : public PageNavigator,
@@ -217,6 +219,10 @@ class WebContents : public PageNavigator,
// Sandboxing flags set on the new WebContents. // Sandboxing flags set on the new WebContents.
blink::WebSandboxFlags starting_sandbox_flags; blink::mojom::WebSandboxFlags starting_sandbox_flags;
+ // Optionally specify the view and delegate view. + // Optionally specify the view and delegate view.
+ content::WebContentsView* view; + content::WebContentsView* view;
@ -100,7 +100,7 @@ index 40e1e940f87b..e08b16c26327 100644
// the value that'll be returned by GetLastActiveTime(). If this is left // the value that'll be returned by GetLastActiveTime(). If this is left
// default initialized then the value is not passed on to the WebContents // 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 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
+++ content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h
@@ -57,10 +57,12 @@ class ColorChooser; @@ -57,10 +57,12 @@ class ColorChooser;
@ -132,7 +132,7 @@ index c2ff64f8b998..d4eb13585b71 100644
// typically happens when popups are created. // typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents, virtual void WebContentsCreated(WebContents* source_contents,
diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h 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
+++ 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 { @@ -585,6 +585,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener {

View File

@ -1,16 +1,16 @@
diff --git content/renderer/loader/web_url_loader_impl.h content/renderer/loader/web_url_loader_impl.h 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
+++ 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 { @@ -88,6 +88,7 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader {
blink::WebBlobInfo& downloaded_blob) override; bool download_to_network_cache_only,
void LoadAsynchronously(const blink::WebURLRequest& request, bool no_mime_sniffing,
blink::WebURLLoaderClient* client) override; blink::WebURLLoaderClient* client) override;
+ void Cancel() override; + void Cancel() override;
void SetDefersLoading(bool value) override; void SetDefersLoading(bool value) override;
void DidChangePriority(blink::WebURLRequest::Priority new_priority, void DidChangePriority(blink::WebURLRequest::Priority new_priority,
int intra_priority_value) override; 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 RequestPeerImpl;
class SinkPeer; class SinkPeer;
@ -20,12 +20,12 @@ index b694b8a2629f..ac1ba364175d 100644
DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); 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 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
+++ third_party/blink/public/platform/web_url_loader.h +++ third_party/blink/public/platform/web_url_loader.h
@@ -75,6 +75,10 @@ class WebURLLoader { @@ -91,6 +91,10 @@ class WebURLLoader {
virtual void LoadAsynchronously(const WebURLRequest&, bool no_mime_sniffing,
WebURLLoaderClient*) = 0; WebURLLoaderClient*) = 0;
+ // Cancels an asynchronous load. This will appear as a load error to + // Cancels an asynchronous load. This will appear as a load error to
+ // the client. + // the client.

View File

@ -10,10 +10,10 @@ index ff7a8ed89e94..77f44956ff22 100644
+ GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array<PluginInfo> plugins); + GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array<PluginInfo> plugins);
}; };
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
index 8690ec1fdd21..010156ed9dbc 100644 index c7bc68000ad0..45798fbcf914 100644
--- third_party/blink/public/platform/platform.h --- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h
@@ -679,6 +679,11 @@ class BLINK_PLATFORM_EXPORT Platform { @@ -667,6 +667,11 @@ class BLINK_PLATFORM_EXPORT Platform {
// runs during Chromium's build step). // runs during Chromium's build step).
virtual bool IsTakingV8ContextSnapshot() { return false; } virtual bool IsTakingV8ContextSnapshot() { return false; }
@ -26,10 +26,10 @@ index 8690ec1fdd21..010156ed9dbc 100644
static void InitializeCommon(Platform* platform, static void InitializeCommon(Platform* platform,
std::unique_ptr<Thread> main_thread); std::unique_ptr<Thread> main_thread);
diff --git third_party/blink/renderer/core/dom/document_init.cc third_party/blink/renderer/core/dom/document_init.cc 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
+++ 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()) { if (GetFrame()->IsMainFrame()) {
scoped_refptr<const SecurityOrigin> origin = scoped_refptr<const SecurityOrigin> origin =
SecurityOrigin::Create(Url()); 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 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
+++ 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 { PluginData* LocalFrame::GetPluginData() const {
if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin))
return nullptr; 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 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
+++ third_party/blink/renderer/core/inspector/devtools_session.cc +++ third_party/blink/renderer/core/inspector/devtools_session.cc
@@ -8,6 +8,7 @@ @@ -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/bindings/core/v8/script_controller.h"
#include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/inspector/devtools_agent.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++) for (wtf_size_t i = 0; i < agents_.size(); i++)
agents_[i]->Restore(); agents_[i]->Restore();
} }
@ -76,7 +76,7 @@ index ba54df90e309..a902a0d31221 100644
} }
DevToolsSession::~DevToolsSession() { DevToolsSession::~DevToolsSession() {
@@ -191,6 +193,7 @@ void DevToolsSession::Detach() { @@ -180,6 +182,7 @@ void DevToolsSession::Detach() {
agents_.clear(); agents_.clear();
v8_session_.reset(); v8_session_.reset();
agent_->client_->DebuggerTaskFinished(); agent_->client_->DebuggerTaskFinished();
@ -85,10 +85,10 @@ index ba54df90e309..a902a0d31221 100644
void DevToolsSession::FlushProtocolNotifications() { void DevToolsSession::FlushProtocolNotifications() {
diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc
index 569cfb844dfc..29d5d6940c44 100644 index e25cee72e6d8..306b2b721a71 100644
--- third_party/blink/renderer/core/page/page.cc --- third_party/blink/renderer/core/page/page.cc
+++ third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc
@@ -194,7 +194,8 @@ Page::Page(PageClients& page_clients) @@ -199,7 +199,8 @@ Page::Page(PageClients& page_clients)
MakeGarbageCollected<OverscrollController>(GetVisualViewport(), MakeGarbageCollected<OverscrollController>(GetVisualViewport(),
GetChromeClient())), GetChromeClient())),
link_highlight_(MakeGarbageCollected<LinkHighlight>(*this)), link_highlight_(MakeGarbageCollected<LinkHighlight>(*this)),
@ -98,7 +98,7 @@ index 569cfb844dfc..29d5d6940c44 100644
// TODO(pdr): Initialize |validation_message_client_| lazily. // TODO(pdr): Initialize |validation_message_client_| lazily.
validation_message_client_( validation_message_client_(
MakeGarbageCollected<ValidationMessageClientImpl>(*this)), MakeGarbageCollected<ValidationMessageClientImpl>(*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(); 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(link_highlight_);
visitor->Trace(spatial_navigation_controller_); visitor->Trace(spatial_navigation_controller_);
visitor->Trace(main_frame_); visitor->Trace(main_frame_);
@ -160,7 +160,7 @@ index 569cfb844dfc..29d5d6940c44 100644
visitor->Trace(agent_metrics_collector_); visitor->Trace(agent_metrics_collector_);
visitor->Trace(plugins_changed_observers_); visitor->Trace(plugins_changed_observers_);
diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h
index f71d15a750a5..a4b901152085 100644 index 442eb4c493d9..196017276cdb 100644
--- third_party/blink/renderer/core/page/page.h --- third_party/blink/renderer/core/page/page.h
+++ third_party/blink/renderer/core/page/page.h +++ third_party/blink/renderer/core/page/page.h
@@ -144,7 +144,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>, @@ -144,7 +144,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
@ -173,7 +173,7 @@ index f71d15a750a5..a4b901152085 100644
// Resets the plugin data for all pages in the renderer process and notifies // Resets the plugin data for all pages in the renderer process and notifies
// PluginsChangedObservers. // PluginsChangedObservers.
@@ -393,7 +394,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>, @@ -404,7 +405,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
const Member<LinkHighlight> link_highlight_; const Member<LinkHighlight> link_highlight_;
Member<SpatialNavigationController> spatial_navigation_controller_; Member<SpatialNavigationController> spatial_navigation_controller_;
@ -184,7 +184,7 @@ index f71d15a750a5..a4b901152085 100644
Member<ValidationMessageClient> validation_message_client_; Member<ValidationMessageClient> validation_message_client_;
diff --git third_party/blink/renderer/core/page/plugin_data.cc third_party/blink/renderer/core/page/plugin_data.cc 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
+++ 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() { @@ -91,10 +91,12 @@ void PluginData::RefreshBrowserSidePluginCache() {
@ -212,7 +212,7 @@ index 987ed360e0ae..382c833b39d0 100644
auto* plugin_info = MakeGarbageCollected<PluginInfo>( auto* plugin_info = MakeGarbageCollected<PluginInfo>(
plugin->name, FilePathToWebString(plugin->filename), 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 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
+++ 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<PluginData> { @@ -97,7 +97,8 @@ class CORE_EXPORT PluginData final : public GarbageCollected<PluginData> {

View File

@ -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 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
+++ 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( @@ -310,7 +310,7 @@ void PointerEventManager::HandlePointerInterruption(

View File

@ -1,8 +1,8 @@
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h 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
+++ 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. // Sets whether select popup menus should be rendered by the browser.
BLINK_EXPORT static void SetUseExternalPopupMenus(bool); BLINK_EXPORT static void SetUseExternalPopupMenus(bool);
@ -11,7 +11,7 @@ index a6d03eca18db..d84e8615150c 100644
// Cancels and hides the current popup (datetime, select...) if any. // Cancels and hides the current popup (datetime, select...) if any.
virtual void CancelPagePopup() = 0; 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 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
+++ 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) { @@ -216,8 +216,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@ -30,19 +30,19 @@ index 7f58ed742695..2149f7815d57 100644
} }
namespace { namespace {
@@ -275,6 +280,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, @@ -280,6 +285,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)), chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)),
minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)), minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)),
maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)), maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)),
+ should_use_external_popup_menus_(g_should_use_external_popup_menus), + should_use_external_popup_menus_(g_should_use_external_popup_menus),
does_composite_(does_composite), does_composite_(does_composite),
fullscreen_controller_(std::make_unique<FullscreenController>(this)) { fullscreen_controller_(std::make_unique<FullscreenController>(this)),
if (!AsView().client) { receiver_(this,
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
index 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
+++ 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<WebViewImpl*>& AllInstances(); static HashSet<WebViewImpl*>& AllInstances();
// Returns true if popup menus should be rendered by the browser, false if // Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default). // they should be rendered by WebKit (which is the default).
@ -52,7 +52,7 @@ index 710607bd9112..829d2f55d79d 100644
// Returns whether frames under this WebView are backed by a compositor. // Returns whether frames under this WebView are backed by a compositor.
bool does_composite() const { return does_composite_; } 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; float fake_page_scale_animation_page_scale_factor_ = 0.f;
bool fake_page_scale_animation_use_anchor_ = false; bool fake_page_scale_animation_use_anchor_ = false;
@ -62,10 +62,10 @@ index 710607bd9112..829d2f55d79d 100644
TransformationMatrix device_emulation_transform_; TransformationMatrix device_emulation_transform_;
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
index 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
+++ 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, PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
HTMLSelectElement& select) { HTMLSelectElement& select) {
NotifyPopupOpeningObservers(); NotifyPopupOpeningObservers();

View File

@ -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 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
+++ 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/profiles/profile_manager.h"
#include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/common/channel_info.h" #include "chrome/common/channel_info.h"
@ -10,7 +10,7 @@ index f68789fe4c05..089800c7a26a 100644
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/sync/driver/about_sync_util.h" #include "components/sync/driver/about_sync_util.h"
#include "components/sync/driver/sync_service.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) { 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. // We are only interested in sync logs for the primary user profile.
Profile* profile = ProfileManager::GetPrimaryUserProfile(); Profile* profile = ProfileManager::GetPrimaryUserProfile();
if (!profile || !ProfileSyncServiceFactory::HasSyncService(profile)) if (!profile || !ProfileSyncServiceFactory::HasSyncService(profile))
@@ -365,6 +370,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( @@ -364,6 +369,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
if (!profile) if (!profile)
return; return;
@ -34,7 +34,7 @@ index f68789fe4c05..089800c7a26a 100644
extensions::ExtensionRegistry* extension_registry = extensions::ExtensionRegistry* extension_registry =
extensions::ExtensionRegistry::Get(profile); extensions::ExtensionRegistry::Get(profile);
std::string extensions_list; std::string extensions_list;
@@ -454,6 +465,8 @@ void ChromeInternalLogSource::PopulateArcPolicyStatus( @@ -453,6 +464,8 @@ void ChromeInternalLogSource::PopulateArcPolicyStatus(
#if defined(OS_WIN) #if defined(OS_WIN)
void ChromeInternalLogSource::PopulateUsbKeyboardDetected( void ChromeInternalLogSource::PopulateUsbKeyboardDetected(
SystemLogsResponse* response) { SystemLogsResponse* response) {
@ -44,18 +44,18 @@ index f68789fe4c05..089800c7a26a 100644
bool result = bool result =
base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason); base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason);
diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc
index a75f82d26388..19ddd09cc379 100644 index d42895d9db3f..74a6d407bbcd 100644
--- chrome/browser/memory_details.cc --- chrome/browser/memory_details.cc
+++ chrome/browser/memory_details.cc +++ chrome/browser/memory_details.cc
@@ -17,6 +17,7 @@ @@ -18,6 +18,7 @@
#include "base/task/post_task.h" #include "base/task/thread_pool.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
+#include "chrome/common/chrome_switches.h" +#include "chrome/common/chrome_switches.h"
#include "components/nacl/common/nacl_process_type.h" #include "components/nacl/common/nacl_process_type.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#include "content/public/browser/browser_child_process_host_iterator.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) #if BUILDFLAG(ENABLE_EXTENSIONS)
// Determine if this is an extension process. // Determine if this is an extension process.

View File

@ -1,8 +1,8 @@
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
index 30da9de5bf78..29366b337312 100644 index 007d476f22ce..106ddd21a532 100644
--- chrome/app/generated_resources.grd --- chrome/app/generated_resources.grd
+++ 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
</message> </message>
</if> </if>
<message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy."> <message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy.">

View File

@ -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<value_type&>(as_const(*this).at(i));
+ return const_cast<value_type&>(
+ const_cast<const circular_deque*>(this)->at(i));
}
- value_type& operator[](size_type i) {
- return const_cast<value_type&>(as_const(*this)[i]);
+ value_type& operator[](size_type i) { return at(i); }
+ const value_type& operator[](size_type i) const {
+ return const_cast<circular_deque*>(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 <type_traits>
#include <vector>
-#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 <class Key, class Value, class GetKeyFromValue, class KeyCompare>
template <typename K>
auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::find(const K& key)
-> iterator {
- return const_cast_it(as_const(*this).find(key));
+ return const_cast_it(as_const().find(key));
}
template <class Key, class Value, class GetKeyFromValue, class KeyCompare>
@@ -799,7 +800,7 @@ template <class Key, class Value, class GetKeyFromValue, class KeyCompare>
template <typename K>
auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::equal_range(
const K& key) -> std::pair<iterator, iterator> {
- 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 <class Key, class Value, class GetKeyFromValue, class KeyCompare>
template <typename K>
auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::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 <class Key, class Value, class GetKeyFromValue, class KeyCompare>
@@ -841,7 +842,7 @@ template <class Key, class Value, class GetKeyFromValue, class KeyCompare>
template <typename K>
auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::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 <class Key, class Value, class GetKeyFromValue, class KeyCompare>
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<T, N>& 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 <typename T>
-constexpr std::add_const_t<T>& as_const(T& t) noexcept {
- return t;
-}
-
-template <typename T>
-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 <class A>
diff --git base/values.cc base/values.cc diff --git base/values.cc base/values.cc
index fbc859c6518d..95e8fc815067 100644 index ecca445840a8..9cde6ece0000 100644
--- base/values.cc --- base/values.cc
+++ base/values.cc +++ base/values.cc
@@ -24,20 +24,6 @@ @@ -24,20 +24,6 @@
@ -134,209 +23,3 @@ index fbc859c6518d..95e8fc815067 100644
static_assert(sizeof(Value::DoubleStorage) == sizeof(double), static_assert(sizeof(Value::DoubleStorage) == sizeof(double),
"The double and DoubleStorage types should have the same size"); "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<Value*>(as_const(*this).FindKey(key));
+ return const_cast<Value*>(static_cast<const Value*>(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<Value*>(as_const(*this).FindKeyOfType(key, type));
+ return const_cast<Value*>(
+ static_cast<const Value*>(this)->FindKeyOfType(key, type));
}
const Value* Value::FindKeyOfType(StringPiece key, Type type) const {
@@ -569,7 +556,7 @@ Optional<Value> Value::ExtractKey(StringPiece key) {
}
Value* Value::FindPath(StringPiece path) {
- return const_cast<Value*>(as_const(*this).FindPath(path));
+ return const_cast<Value*>(const_cast<const Value*>(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<Value*>(as_const(*this).FindPathOfType(path, type));
+ return const_cast<Value*>(
+ const_cast<const Value*>(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<std::string*>(as_const(*this).FindStringPath(path));
+ return const_cast<std::string*>(
+ static_cast<const Value*>(this)->FindStringPath(path));
}
const Value::BlobStorage* Value::FindBlobPath(StringPiece path) const {
@@ -713,11 +702,11 @@ Optional<Value> Value::ExtractPath(StringPiece path) {
// DEPRECATED METHODS
Value* Value::FindPath(std::initializer_list<StringPiece> path) {
- return const_cast<Value*>(as_const(*this).FindPath(path));
+ return const_cast<Value*>(const_cast<const Value*>(this)->FindPath(path));
}
Value* Value::FindPath(span<const StringPiece> path) {
- return const_cast<Value*>(as_const(*this).FindPath(path));
+ return const_cast<Value*>(const_cast<const Value*>(this)->FindPath(path));
}
const Value* Value::FindPath(std::initializer_list<StringPiece> path) const {
@@ -736,11 +725,13 @@ const Value* Value::FindPath(span<const StringPiece> path) const {
Value* Value::FindPathOfType(std::initializer_list<StringPiece> path,
Type type) {
- return const_cast<Value*>(as_const(*this).FindPathOfType(path, type));
+ return const_cast<Value*>(
+ const_cast<const Value*>(this)->FindPathOfType(path, type));
}
Value* Value::FindPathOfType(span<const StringPiece> path, Type type) {
- return const_cast<Value*>(as_const(*this).FindPathOfType(path, type));
+ return const_cast<Value*>(
+ const_cast<const Value*>(this)->FindPathOfType(path, type));
}
const Value* Value::FindPathOfType(std::initializer_list<StringPiece> 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<const Value*>(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<const Value**>(out_value));
+ return static_cast<const DictionaryValue&>(*this).Get(
+ path,
+ const_cast<const Value**>(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<const Value**>(out_value));
+ return static_cast<const DictionaryValue&>(*this).GetBinary(
+ path, const_cast<const Value**>(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<const DictionaryValue**>(out_value));
+ return static_cast<const DictionaryValue&>(*this).GetDictionary(
+ path,
+ const_cast<const DictionaryValue**>(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<const ListValue**>(out_value));
+ return static_cast<const DictionaryValue&>(*this).GetList(
+ path,
+ const_cast<const ListValue**>(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<const Value**>(out_value));
+ return static_cast<const DictionaryValue&>(*this).GetWithoutPathExpansion(
+ key,
+ const_cast<const Value**>(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<const DictionaryValue**>(out_value));
+ const DictionaryValue& const_this =
+ static_cast<const DictionaryValue&>(*this);
+ return const_this.GetDictionaryWithoutPathExpansion(
+ key,
+ const_cast<const DictionaryValue**>(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<const ListValue**>(out_value));
+ return
+ static_cast<const DictionaryValue&>(*this).GetListWithoutPathExpansion(
+ key,
+ const_cast<const ListValue**>(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<const Value**>(out_value));
+ return static_cast<const ListValue&>(*this).Get(
+ index,
+ const_cast<const Value**>(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<const DictionaryValue**>(out_value));
+ return static_cast<const ListValue&>(*this).GetDictionary(
+ index,
+ const_cast<const DictionaryValue**>(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<const ListValue**>(out_value));
+ return static_cast<const ListValue&>(*this).GetList(
+ index,
+ const_cast<const ListValue**>(out_value));
}
bool ListValue::Remove(size_t index, std::unique_ptr<Value>* out_value) {

View File

@ -1,8 +1,8 @@
diff --git services/service_manager/sandbox/win/sandbox_win.cc services/service_manager/sandbox/win/sandbox_win.cc 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
+++ 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 // TODO(wfh): Relax strict handle checks for network process until root cause
// for this crash can be resolved. See https://crbug.com/939590. // for this crash can be resolved. See https://crbug.com/939590.

View File

@ -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 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
+++ 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) { if (message == WM_WTSSESSION_CHANGE) {
ProcessWTSSessionLockMessage(wparam); ProcessWTSSessionLockMessage(wparam);
} }

View File

@ -38,7 +38,7 @@ const int kOsrHeight = 400;
#if defined(OS_WIN) #if defined(OS_WIN)
const CefRect kExpandedSelectRect(462, 42, 81, 334); const CefRect kExpandedSelectRect(462, 42, 81, 334);
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
const CefRect kExpandedSelectRect(462, 42, 75, 286); const CefRect kExpandedSelectRect(462, 42, 75, 334);
#elif defined(OS_LINUX) #elif defined(OS_LINUX)
const CefRect kExpandedSelectRect(462, 42, 79, 334); const CefRect kExpandedSelectRect(462, 42, 79, 334);
#else #else

View File

@ -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)) raise Exception("Not a valid CEF Git checkout: %s" % (cef_dir))
# Determine the CEF download URL to use. # Determine the CEF download URL to use.
if options.url == '': cef_url = options.url.strip()
if cef_url == '':
cef_url = cef_git_url cef_url = cef_git_url
else:
cef_url = options.url
# Verify that the requested CEF URL matches the existing checkout. # Verify that the requested CEF URL matches the existing checkout.
if not options.nocefupdate and os.path.exists(cef_dir): if not options.nocefupdate and os.path.exists(cef_dir):