Update to Chromium revision bc084a8b (#530369)

This commit is contained in:
Marshall Greenblatt
2018-02-14 19:12:09 -05:00
parent ac86b61139
commit 9e644b7538
113 changed files with 1930 additions and 1797 deletions

View File

@@ -1,27 +0,0 @@
diff --git build/toolchain/win/rc/linux64/rc.sha1 build/toolchain/win/rc/linux64/rc.sha1
index 76f7627..11440ae 100644
--- build/toolchain/win/rc/linux64/rc.sha1
+++ build/toolchain/win/rc/linux64/rc.sha1
@@ -1 +1 @@
-a6d75f015275c8a65ff855e8b78437dd03a9bb7d
\ No newline at end of file
+e642170ce663c75a44822c3bffb1579068ab6f17
\ No newline at end of file
diff --git build/toolchain/win/rc/mac/rc.sha1 build/toolchain/win/rc/mac/rc.sha1
index 8a817c5..ff0c32e 100644
--- build/toolchain/win/rc/mac/rc.sha1
+++ build/toolchain/win/rc/mac/rc.sha1
@@ -1 +1 @@
-3ccc7a61fc5368e8db33364093e42a92de874a26
\ No newline at end of file
+58489426ecea29e276c94529201bc6a0cc1da027
\ No newline at end of file
diff --git build/toolchain/win/rc/win/rc.exe.sha1 build/toolchain/win/rc/win/rc.exe.sha1
index c74dce41..165e4688 100644
--- build/toolchain/win/rc/win/rc.exe.sha1
+++ build/toolchain/win/rc/win/rc.exe.sha1
@@ -1 +1 @@
-9887dc07d042bf58d20b5557e3f91d18d0254022
\ No newline at end of file
+9de6c3d751b4432a3a7b1cf96f432a21187764e9
\ No newline at end of file

View File

@@ -1,52 +0,0 @@
diff --git third_party/WebKit/Source/core/frame/Deprecation.cpp third_party/WebKit/Source/core/frame/Deprecation.cpp
index db80f4a67b11..f3191313f929 100644
--- third_party/WebKit/Source/core/frame/Deprecation.cpp
+++ third_party/WebKit/Source/core/frame/Deprecation.cpp
@@ -16,8 +16,9 @@
#include "core/page/Page.h"
#include "core/workers/WorkerOrWorkletGlobalScope.h"
#include "platform/runtime_enabled_features.h"
+#include "public/platform/Platform.h"
#include "public/platform/reporting.mojom-blink.h"
-#include "services/service_manager/public/cpp/interface_provider.h"
+#include "services/service_manager/public/cpp/connector.h"
#include "third_party/WebKit/common/feature_policy/feature_policy_feature.h"
using blink::WebFeature;
@@ -796,7 +797,9 @@ void Deprecation::GenerateReport(const LocalFrame* frame, WebFeature feature) {
// Send the deprecation report to the Reporting API.
mojom::blink::ReportingServiceProxyPtr service;
- frame->Client()->GetInterfaceProvider()->GetInterface(&service);
+ Platform* platform = Platform::Current();
+ platform->GetConnector()->BindInterface(platform->GetBrowserServiceName(),
+ &service);
service->QueueDeprecationReport(document->Url(), info.message,
body->sourceFile(), body->lineNumber(),
body->columnNumber());
diff --git third_party/WebKit/Source/core/frame/Intervention.cpp third_party/WebKit/Source/core/frame/Intervention.cpp
index fb342ba765db..089eb6a3d662 100644
--- third_party/WebKit/Source/core/frame/Intervention.cpp
+++ third_party/WebKit/Source/core/frame/Intervention.cpp
@@ -11,8 +11,9 @@
#include "core/frame/Report.h"
#include "core/frame/ReportingContext.h"
#include "core/inspector/ConsoleMessage.h"
+#include "public/platform/Platform.h"
#include "public/platform/reporting.mojom-blink.h"
-#include "services/service_manager/public/cpp/interface_provider.h"
+#include "services/service_manager/public/cpp/connector.h"
namespace blink {
@@ -44,7 +45,9 @@ void Intervention::GenerateReport(const LocalFrame* frame,
// Send the intervention report to the Reporting API.
mojom::blink::ReportingServiceProxyPtr service;
- frame->Client()->GetInterfaceProvider()->GetInterface(&service);
+ Platform* platform = Platform::Current();
+ platform->GetConnector()->BindInterface(platform->GetBrowserServiceName(),
+ &service);
service->QueueInterventionReport(document->Url(), message, body->sourceFile(),
body->lineNumber(), body->columnNumber());
}

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
index 3ed8b18dfabd..f0c30a60376a 100644
index 81376ab57c4b..364305777492 100644
--- content/browser/renderer_host/browser_compositor_view_mac.h
+++ content/browser/renderer_host/browser_compositor_view_mac.h
@@ -53,6 +53,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
@@ -51,11 +51,13 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
// These will not return nullptr until Destroy is called.
DelegatedFrameHost* GetDelegatedFrameHost();
@@ -10,19 +10,17 @@ index 3ed8b18dfabd..f0c30a60376a 100644
// Ensure that the currect compositor frame be cleared (even if it is
// potentially visible).
@@ -60,6 +61,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
void ClearCompositorFrame();
// This may return nullptr, if this has detached itself from its
// ui::Compositor.
+ ui::Compositor* GetCompositor();
ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac();
gfx::AcceleratedWidget GetAcceleratedWidget();
void DidCreateNewRendererCompositorFrameSink(
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 00169dea145c..cb3d2b3175b1 100644
index 8e98fb37c1d4..8dc887eac61b 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -211,6 +211,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
@@ -214,6 +214,12 @@ void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
g_spare_recyclable_compositors.Get().clear();
}
@@ -32,22 +30,40 @@ index 00169dea145c..cb3d2b3175b1 100644
+ return nullptr;
+}
+
ui::AcceleratedWidgetMac* BrowserCompositorMac::GetAcceleratedWidgetMac() {
if (recyclable_compositor_)
return recyclable_compositor_->accelerated_widget_mac();
@@ -441,8 +447,13 @@ SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor(
}
gfx::AcceleratedWidget BrowserCompositorMac::GetAcceleratedWidget() {
if (recyclable_compositor_) {
return recyclable_compositor_->accelerated_widget_mac()
@@ -473,10 +479,16 @@ void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
NSView* ns_view =
accelerated_widget_mac_ns_view_->AcceleratedWidgetGetNSView();
if (bounds_in_dip) {
- NSSize dip_ns_size = [ns_view bounds].size;
- *bounds_in_dip = gfx::Size(dip_ns_size.width, dip_ns_size.height);
+ if (ns_view) {
+ NSSize dip_ns_size = [ns_view bounds].size;
+ *bounds_in_dip = gfx::Size(dip_ns_size.width, dip_ns_size.height);
+ } else {
+ // |ns_view| will be nullptr for CEF.
+ *bounds_in_dip = root_layer_->bounds().size();
+ }
}
if (scale_factor || color_space) {
+ // TODO(cef): Return values from CEF callbacks here.
display::Display display =
display::Screen::GetScreen()->GetDisplayNearestView(ns_view);
if (scale_factor)
diff --git ui/accelerated_widget_mac/accelerated_widget_mac.mm ui/accelerated_widget_mac/accelerated_widget_mac.mm
index 7ff59beee63c..48efe5ac93fa 100644
--- ui/accelerated_widget_mac/accelerated_widget_mac.mm
+++ ui/accelerated_widget_mac/accelerated_widget_mac.mm
@@ -66,6 +66,10 @@ - (void)setContentsChanged;
DCHECK(view && !view_);
view_ = view;
gfx::Size BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP() const {
- NSRect bounds = [client_->BrowserCompositorMacGetNSView() bounds];
- return gfx::Size(bounds.size.width, bounds.size.height);
+ // View will be nil with CEF OSR.
+ NSView* view = client_->BrowserCompositorMacGetNSView();
+ if (view) {
+ NSRect bounds = [view bounds];
+ return gfx::Size(bounds.size.width, bounds.size.height);
+ }
+ return root_layer_->bounds().size();
}
bool BrowserCompositorMac::DelegatedFrameCanCreateResizeLock() const {
+ // Will be nullptr for CEF.
+ if (!view_->AcceleratedWidgetGetNSView())
+ return;
+
CALayer* background_layer = [view_->AcceleratedWidgetGetNSView() layer];
DCHECK(background_layer);
[flipped_layer_ setBounds:[background_layer bounds]];

View File

@@ -1,5 +1,5 @@
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
index ccdafd2e9280..3d3651cf5b26 100644
index c83e5babe405..92efd9e12561 100644
--- content/browser/browser_plugin/browser_plugin_guest.cc
+++ content/browser/browser_plugin/browser_plugin_guest.cc
@@ -339,8 +339,11 @@ void BrowserPluginGuest::InitInternal(
@@ -15,7 +15,7 @@ index ccdafd2e9280..3d3651cf5b26 100644
// Once a BrowserPluginGuest has an embedder WebContents, it's considered to
// be attached.
@@ -837,10 +840,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
@@ -836,10 +839,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
web_contents_view->CreateViewForWidget(
@@ -37,7 +37,7 @@ index ccdafd2e9280..3d3651cf5b26 100644
attached_ = true;
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
index 2f24f1b959d4..5cfb0b3e97c6 100644
index 5a7aa396e372..8f80ed6d340c 100644
--- content/browser/frame_host/interstitial_page_impl.cc
+++ content/browser/frame_host/interstitial_page_impl.cc
@@ -613,7 +613,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
@@ -46,7 +46,7 @@ index 2f24f1b959d4..5cfb0b3e97c6 100644
RenderWidgetHostViewBase* view =
- wcv->CreateViewForWidget(render_view_host_->GetWidget(), false);
+ wcv->CreateViewForWidget(render_view_host_->GetWidget(), nullptr);
RenderWidgetHostImpl::From(render_view_host_->GetWidget())->SetView(view);
render_view_host_->GetWidget()->SetView(view);
render_view_host_->GetMainFrame()->AllowBindings(
BINDINGS_POLICY_DOM_AUTOMATION);
diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h
@@ -79,10 +79,10 @@ index a38a936af6df..5380e09ee023 100644
// Creates a new View that holds a popup and receives messages for it.
virtual RenderWidgetHostViewBase* CreateViewForPopupWidget(
diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc
index ee18b4dd66bd..9e447f7d9511 100644
index c5ce75e10e2b..9968d86d4d48 100644
--- content/browser/web_contents/web_contents_view_aura.cc
+++ content/browser/web_contents/web_contents_view_aura.cc
@@ -886,7 +886,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
@@ -887,7 +887,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
}
RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
@@ -92,7 +92,7 @@ index ee18b4dd66bd..9e447f7d9511 100644
if (render_widget_host->GetView()) {
// During testing, the view will already be set up in most cases to the
// test view, so we don't want to clobber it with a real one. To verify that
@@ -898,6 +899,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
@@ -899,6 +900,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
render_widget_host->GetView());
}
@@ -101,7 +101,7 @@ index ee18b4dd66bd..9e447f7d9511 100644
g_create_render_widget_host_view
? g_create_render_widget_host_view(render_widget_host,
diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h
index 7b2078f53dc4..e65fd914dd0d 100644
index 534f92c4cd6a..6f2ec63f09e6 100644
--- content/browser/web_contents/web_contents_view_aura.h
+++ content/browser/web_contents/web_contents_view_aura.h
@@ -120,7 +120,7 @@ class CONTENT_EXPORT WebContentsViewAura
@@ -140,10 +140,10 @@ index ca3c586f9f8f..5fd0e860a5ff 100644
RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override;
diff --git content/browser/web_contents/web_contents_view_guest.cc content/browser/web_contents/web_contents_view_guest.cc
index f1370d294ef9..d7a451028e64 100644
index 227a66c7c836..f4d47bbed1a8 100644
--- content/browser/web_contents/web_contents_view_guest.cc
+++ content/browser/web_contents/web_contents_view_guest.cc
@@ -73,6 +73,8 @@ void WebContentsViewGuest::GetScreenInfo(ScreenInfo* screen_info) const {
@@ -74,6 +74,8 @@ void WebContentsViewGuest::GetScreenInfo(ScreenInfo* screen_info) const {
void WebContentsViewGuest::OnGuestAttached(WebContentsView* parent_view) {
#if defined(USE_AURA)
@@ -152,16 +152,16 @@ index f1370d294ef9..d7a451028e64 100644
// In aura, ScreenPositionClient doesn't work properly if we do
// not have the native view associated with this WebContentsViewGuest in the
// view hierarchy. We add this view as embedder's child here.
@@ -85,6 +87,8 @@ void WebContentsViewGuest::OnGuestAttached(WebContentsView* parent_view) {
@@ -86,6 +88,8 @@ void WebContentsViewGuest::OnGuestAttached(WebContentsView* parent_view) {
void WebContentsViewGuest::OnGuestDetached(WebContentsView* old_parent_view) {
#if defined(USE_AURA)
+ if (!platform_view_->GetNativeView())
+ return;
if (!IsUsingMus()) {
if (!switches::IsMusHostingViz()) {
old_parent_view->GetNativeView()->RemoveChild(
platform_view_->GetNativeView());
@@ -138,7 +142,8 @@ void WebContentsViewGuest::CreateView(const gfx::Size& initial_size,
@@ -139,7 +143,8 @@ void WebContentsViewGuest::CreateView(const gfx::Size& initial_size,
}
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
@@ -171,7 +171,7 @@ index f1370d294ef9..d7a451028e64 100644
if (render_widget_host->GetView()) {
// During testing, the view will already be set up in most cases to the
// test view, so we don't want to clobber it with a real one. To verify that
@@ -150,11 +155,19 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
@@ -151,11 +156,19 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
render_widget_host->GetView());
}

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 1126d7e63c30..64ecb8982428 100644
index 472d5ea34687..575960cb4a37 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -7,6 +7,7 @@ import("//build/config/crypto.gni")
@@ -10,7 +10,7 @@ index 1126d7e63c30..64ecb8982428 100644
import("//chrome/common/features.gni")
import("//components/feature_engagement/features.gni")
import("//components/nacl/features.gni")
@@ -1551,6 +1552,7 @@ split_static_library("browser") {
@@ -1586,6 +1587,7 @@ split_static_library("browser") {
"//base:i18n",
"//base/allocator:features",
"//cc",
@@ -18,7 +18,7 @@ index 1126d7e63c30..64ecb8982428 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -1797,6 +1799,10 @@ split_static_library("browser") {
@@ -1837,6 +1839,10 @@ split_static_library("browser") {
"//ui/web_dialogs",
]

View File

@@ -71,10 +71,10 @@ index e8e76ce5b954..1dd338dd0142 100644
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context);
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 0fe78f76aaa7..8fb527cc2636 100644
index c5ab3d4e4d7a..69f54123f2cc 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -375,7 +375,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -377,7 +377,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
content::NotificationService::AllSources());
@@ -84,7 +84,7 @@ index 0fe78f76aaa7..8fb527cc2636 100644
this));
}
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
index 538b8458ab9e..169d4e079bf9 100644
index 9c410dc3ba6d..219d42503fa7 100644
--- chrome/browser/profiles/profile_manager.h
+++ chrome/browser/profiles/profile_manager.h
@@ -93,7 +93,7 @@ class ProfileManager : public content::NotificationObserver,

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
index 1afbaf86ac40..c80a499d4dc2 100644
index 312e27d1b562..03eb1fda05cb 100644
--- chrome/browser/plugins/plugin_info_host_impl.cc
+++ chrome/browser/plugins/plugin_info_host_impl.cc
@@ -18,6 +18,7 @@
@@ -17,6 +17,7 @@
#include "base/task_runner_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
@@ -10,9 +10,9 @@ index 1afbaf86ac40..c80a499d4dc2 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
@@ -56,6 +57,11 @@
@@ -55,6 +56,11 @@
#include "url/gurl.h"
#include "url/origin.h"
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
+#if BUILDFLAG(ENABLE_CEF)
+#include "cef/libcef/browser/plugins/plugin_service_filter.h"
@@ -22,37 +22,39 @@ index 1afbaf86ac40..c80a499d4dc2 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "components/guest_view/browser/guest_view_base.h"
#include "extensions/browser/extension_registry.h"
@@ -77,12 +83,10 @@ namespace {
class ShutdownNotifierFactory
@@ -76,12 +82,10 @@ namespace {
class PluginInfoHostImplShutdownNotifierFactory
: public BrowserContextKeyedServiceShutdownNotifierFactory {
public:
- static ShutdownNotifierFactory* GetInstance() {
- return base::Singleton<ShutdownNotifierFactory>::get();
- static PluginInfoHostImplShutdownNotifierFactory* GetInstance() {
- return base::Singleton<PluginInfoHostImplShutdownNotifierFactory>::get();
- }
+ static ShutdownNotifierFactory* GetInstance();
+ static PluginInfoHostImplShutdownNotifierFactory* GetInstance();
private:
- friend struct base::DefaultSingletonTraits<ShutdownNotifierFactory>;
+ friend struct base::LazyInstanceTraitsBase<ShutdownNotifierFactory>;
- friend struct base::DefaultSingletonTraits<
+ friend struct base::LazyInstanceTraitsBase<
PluginInfoHostImplShutdownNotifierFactory>;
ShutdownNotifierFactory()
: BrowserContextKeyedServiceShutdownNotifierFactory(
@@ -93,6 +97,14 @@ class ShutdownNotifierFactory
DISALLOW_COPY_AND_ASSIGN(ShutdownNotifierFactory);
PluginInfoHostImplShutdownNotifierFactory()
@@ -93,6 +97,16 @@ class PluginInfoHostImplShutdownNotifierFactory
DISALLOW_COPY_AND_ASSIGN(PluginInfoHostImplShutdownNotifierFactory);
};
+base::LazyInstance<ShutdownNotifierFactory>::Leaky g_shutdown_notifier_factory =
+ LAZY_INSTANCE_INITIALIZER;
+base::LazyInstance<PluginInfoHostImplShutdownNotifierFactory>::Leaky
+ g_plugin_info_host_impl_shutdown_notifier_factory =
+ LAZY_INSTANCE_INITIALIZER;
+
+// static
+ShutdownNotifierFactory* ShutdownNotifierFactory::GetInstance() {
+ return g_shutdown_notifier_factory.Pointer();
+PluginInfoHostImplShutdownNotifierFactory*
+PluginInfoHostImplShutdownNotifierFactory::GetInstance() {
+ return g_plugin_info_host_impl_shutdown_notifier_factory.Pointer();
+}
+
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
enum PluginAvailabilityStatusForUMA {
@@ -124,6 +136,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
#if BUILDFLAG(ENABLE_EXTENSIONS)
// Returns whether a request from a plugin to load |resource| from a renderer
// with process id |process_id| is a request for an internal resource by an app
@@ -101,6 +115,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
extensions::ExtensionRegistry* extension_registry,
int process_id,
const GURL& resource) {
@@ -62,7 +64,7 @@ index 1afbaf86ac40..c80a499d4dc2 100644
extensions::WebViewRendererState* renderer_state =
extensions::WebViewRendererState::GetInstance();
std::string partition_id;
@@ -153,12 +168,16 @@ bool IsPluginLoadingAccessibleResourceInWebView(
@@ -130,12 +147,16 @@ bool IsPluginLoadingAccessibleResourceInWebView(
PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile)
: render_process_id_(render_process_id),
resource_context_(profile->GetResourceContext()),
@@ -82,7 +84,7 @@ index 1afbaf86ac40..c80a499d4dc2 100644
allow_outdated_plugins_.Init(prefs::kPluginsAllowOutdated,
profile->GetPrefs());
allow_outdated_plugins_.MoveToThread(
@@ -264,6 +283,7 @@ void PluginInfoHostImpl::PluginsLoaded(
@@ -234,6 +255,7 @@ void PluginInfoHostImpl::PluginsLoaded(
plugin_metadata->identifier(), &output->status);
}
@@ -90,7 +92,7 @@ index 1afbaf86ac40..c80a499d4dc2 100644
if (output->status == chrome::mojom::PluginStatus::kNotFound) {
// Check to see if the component updater can fetch an implementation.
base::PostTaskAndReplyWithResult(
@@ -275,7 +295,9 @@ void PluginInfoHostImpl::PluginsLoaded(
@@ -245,7 +267,9 @@ void PluginInfoHostImpl::PluginsLoaded(
base::BindOnce(&PluginInfoHostImpl::ComponentPluginLookupDone, this,
params, std::move(output), std::move(callback),
std::move(plugin_metadata)));
@@ -101,7 +103,7 @@ index 1afbaf86ac40..c80a499d4dc2 100644
GetPluginInfoFinish(params, std::move(output), std::move(callback),
std::move(plugin_metadata));
}
@@ -325,6 +347,14 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
@@ -258,6 +282,14 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
PluginMetadata::SecurityStatus security_status,
const std::string& plugin_identifier,
chrome::mojom::PluginStatus* status) const {
@@ -116,7 +118,7 @@ index 1afbaf86ac40..c80a499d4dc2 100644
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
*status = chrome::mojom::PluginStatus::kAllowed;
return;
@@ -450,16 +480,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
@@ -382,16 +414,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
return false;
}
@@ -155,10 +157,10 @@ index 1afbaf86ac40..c80a499d4dc2 100644
// If we broke out of the loop, we have found an enabled plugin.
bool enabled = i < matching_plugins.size();
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index 5dc888bfb2df..297737be682e 100644
index 47aceed2a513..2f1dae33e865 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -805,6 +805,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -795,6 +795,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) &&
@@ -166,7 +168,7 @@ index 5dc888bfb2df..297737be682e 100644
observer->IsPluginTemporarilyAllowed(identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
}
@@ -992,7 +993,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -982,7 +983,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
&plugin_auth_host);
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@@ -176,7 +178,7 @@ index 5dc888bfb2df..297737be682e 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -1001,7 +1003,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -991,7 +993,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@@ -186,7 +188,7 @@ index 5dc888bfb2df..297737be682e 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1011,7 +1014,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1001,7 +1004,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));
@@ -196,7 +198,7 @@ index 5dc888bfb2df..297737be682e 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
@@ -1019,7 +1023,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1009,7 +1013,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
group_name));
@@ -207,10 +209,10 @@ index 5dc888bfb2df..297737be682e 100644
}
case chrome::mojom::PluginStatus::kComponentUpdateRequired: {
diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 7a814bb072dc..79c7d65118cb 100644
index 63b86138b4fe..4ed38c132efb 100644
--- chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -349,8 +349,11 @@ void ChromePluginPlaceholder::OnBlockedContent(
@@ -350,8 +350,11 @@ void ChromePluginPlaceholder::OnBlockedContent(
if (status ==
content::RenderFrame::PeripheralContentStatus::CONTENT_STATUS_TINY) {

View File

@@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index da3b9d31a05b..78c15d30755d 100644
index 3f68c173d1c2..3906f588c7c2 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -3,6 +3,7 @@
@@ -10,7 +10,7 @@ index da3b9d31a05b..78c15d30755d 100644
import("//chrome/common/features.gni")
import("//components/nacl/features.gni")
import("//components/spellcheck/spellcheck_build_features.gni")
@@ -102,6 +103,7 @@ static_library("renderer") {
@@ -106,6 +107,7 @@ static_library("renderer") {
defines = []
deps = [
@@ -18,7 +18,7 @@ index da3b9d31a05b..78c15d30755d 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/common",
@@ -161,6 +163,10 @@ static_library("renderer") {
@@ -166,6 +168,10 @@ static_library("renderer") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]

View File

@@ -1,8 +1,8 @@
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
index 8171be4d4249..1d437dabd35e 100644
index 3c0ce2e2f701..7b078635d3b9 100644
--- chrome/common/chrome_content_client.cc
+++ chrome/common/chrome_content_client.cc
@@ -90,7 +90,8 @@
@@ -91,7 +91,8 @@
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
#include "media/cdm/cdm_paths.h" // nogncheck

View File

@@ -13,7 +13,7 @@ index 4393a8fac233..860715e86900 100644
explicit ContentServiceManagerMainDelegate(const ContentMainParams& params);
~ContentServiceManagerMainDelegate() override;
diff --git third_party/WebKit/Source/controller/BUILD.gn third_party/WebKit/Source/controller/BUILD.gn
index 714113da5d67..2a8feb621f4b 100644
index d10cff4a0fdd..89673c9c5250 100644
--- third_party/WebKit/Source/controller/BUILD.gn
+++ third_party/WebKit/Source/controller/BUILD.gn
@@ -25,6 +25,7 @@ component("controller") {
@@ -24,8 +24,8 @@ index 714113da5d67..2a8feb621f4b 100644
"//third_party/WebKit/Source:config",
"//third_party/WebKit/Source:inside_blink",
"//third_party/WebKit/Source:non_test_config",
@@ -39,6 +40,8 @@ component("controller") {
"ControllerExport.h",
@@ -41,6 +42,8 @@ component("controller") {
"DevToolsFrontendImpl.h",
"OomInterventionImpl.cpp",
"OomInterventionImpl.h",
+ "//cef/libcef/renderer/webkit_glue.cc",

View File

@@ -1,8 +1,8 @@
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
index cddd17ca8682..c8641e9d0fdc 100644
index 33b9aa78462d..0653e11dbef1 100644
--- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -502,9 +502,19 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
@@ -491,9 +491,19 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
// surfaces as they are not following the correct mode.
DisableGpuCompositing(compositor.get());
}
@@ -24,18 +24,18 @@ index cddd17ca8682..c8641e9d0fdc 100644
} else {
DCHECK(context_provider);
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index 00885cbac420..874ec42e3825 100644
index eb56a103f8cb..ec2a44f1f5d0 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -23,6 +23,7 @@
@@ -24,6 +24,7 @@
#include "components/viz/common/surfaces/local_surface_id.h"
#include "components/viz/common/surfaces/surface_sequence.h"
#include "components/viz/host/host_frame_sink_client.h"
+#include "components/viz/service/display/software_output_device.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/compositor/compositor_animation_observer.h"
#include "ui/compositor/compositor_export.h"
@@ -179,6 +180,17 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -186,6 +187,17 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual void RemoveObserver(ContextFactoryObserver* observer) = 0;
};
@@ -53,7 +53,7 @@ index 00885cbac420..874ec42e3825 100644
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -218,6 +230,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -225,6 +237,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@@ -63,7 +63,7 @@ index 00885cbac420..874ec42e3825 100644
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -436,6 +451,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -445,6 +460,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
ui::ContextFactory* context_factory_;
ui::ContextFactoryPrivate* context_factory_private_;

View File

@@ -14,10 +14,10 @@ index 4f4dadd98fd9..840c1df997dd 100644
// The GetPlugins call causes the plugin list to be refreshed. Once that's
// done we can retry the GetPluginInfo call. We break out of this cycle
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
index 1783a101aa02..b380ef826ff7 100644
index 5b07f3a407bf..7dffe84fc17c 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -179,6 +179,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
@@ -169,6 +169,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
int render_frame_id,
const void* context,
const GURL& plugin_content_url,
@@ -26,10 +26,10 @@ index 1783a101aa02..b380ef826ff7 100644
content::WebPluginInfo* plugin) {
base::AutoLock auto_lock(lock_);
diff --git chrome/browser/plugins/chrome_plugin_service_filter.h chrome/browser/plugins/chrome_plugin_service_filter.h
index f8b651f1ddc4..ec39f8d7dc85 100644
index 133145db74bf..021ab307ee2a 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.h
+++ chrome/browser/plugins/chrome_plugin_service_filter.h
@@ -71,6 +71,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter,
@@ -66,6 +66,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter,
int render_frame_id,
const void* context,
const GURL& plugin_content_url,
@@ -64,7 +64,7 @@ index 6a2122ee1ed7..68831894695a 100644
}
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 34c9855a251e..0e09454569e2 100644
index fcbea93113dd..0cd61aaf0aae 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -596,6 +596,6 @@ void BrowserTabStripController::OnFindURLMimeTypeCompleted(
@@ -76,10 +76,10 @@ index 34c9855a251e..0e09454569e2 100644
mime_type, false, NULL, &plugin, NULL));
}
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
index 73afa8b3908c..c9edab729e94 100644
index 89a41274745c..586864a9d827 100644
--- content/browser/frame_host/navigation_handle_impl.cc
+++ content/browser/frame_host/navigation_handle_impl.cc
@@ -321,12 +321,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
@@ -325,12 +325,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
}
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
@@ -93,7 +93,7 @@ index 73afa8b3908c..c9edab729e94 100644
}
diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc
index 1a4440241992..172190cb3339 100644
index fc3412cb2680..385a7c591689 100644
--- content/browser/frame_host/render_frame_host_impl.cc
+++ content/browser/frame_host/render_frame_host_impl.cc
@@ -1499,6 +1499,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
@@ -104,10 +104,10 @@ index 1a4440241992..172190cb3339 100644
}
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
@@ -3484,9 +3485,9 @@ void RenderFrameHostImpl::CommitNavigation(
@@ -3515,9 +3516,9 @@ void RenderFrameHostImpl::CommitNavigation(
// however only do this for cross-document navigations, because the
// alternative would be redundant effort.
mojom::URLLoaderFactoryPtr default_factory;
network::mojom::URLLoaderFactoryPtr default_factory;
- StoragePartitionImpl* storage_partition =
- static_cast<StoragePartitionImpl*>(BrowserContext::GetStoragePartition(
- GetSiteInstance()->GetBrowserContext(), GetSiteInstance()));
@@ -117,11 +117,24 @@ index 1a4440241992..172190cb3339 100644
if (subresource_loader_params &&
subresource_loader_params->loader_factory_info.is_valid()) {
// If the caller has supplied a default URLLoaderFactory override (for
@@ -3652,9 +3653,9 @@ void RenderFrameHostImpl::FailedNavigation(
// completing an unload handler.
ResetWaitingState();
- StoragePartitionImpl* storage_partition =
- static_cast<StoragePartitionImpl*>(BrowserContext::GetStoragePartition(
- GetSiteInstance()->GetBrowserContext(), GetSiteInstance()));
+ StoragePartition* storage_partition =
+ BrowserContext::GetStoragePartition(
+ GetSiteInstance()->GetBrowserContext(), GetSiteInstance());
network::mojom::URLLoaderFactoryPtr default_factory;
if (g_url_loader_factory_callback_for_test.Get().is_null()) {
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
index 4099c6a7ea9f..5c0d94d6062d 100644
index 6e105e13b6c5..99815c49cbc1 100644
--- content/browser/frame_host/render_frame_message_filter.cc
+++ content/browser/frame_host/render_frame_message_filter.cc
@@ -542,6 +542,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
@@ -540,6 +540,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
void RenderFrameMessageFilter::OnGetPlugins(
bool refresh,
@@ -129,7 +142,7 @@ index 4099c6a7ea9f..5c0d94d6062d 100644
const url::Origin& main_frame_origin,
IPC::Message* reply_msg) {
// Don't refresh if the specified threshold has not been passed. Note that
@@ -563,18 +564,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
@@ -561,18 +562,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
PluginServiceImpl::GetInstance()->GetPlugins(
base::BindOnce(&RenderFrameMessageFilter::GetPluginsCallback, this,
@@ -151,7 +164,7 @@ index 4099c6a7ea9f..5c0d94d6062d 100644
int routing_id = MSG_ROUTING_NONE;
// In this loop, copy the WebPluginInfo (and do not use a reference) because
// the filter might mutate it.
@@ -583,7 +585,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
@@ -581,7 +583,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
if (!filter ||
filter->IsPluginAvailable(child_process_id, routing_id,
resource_context_, main_frame_origin.GetURL(),
@@ -160,7 +173,7 @@ index 4099c6a7ea9f..5c0d94d6062d 100644
plugins.push_back(plugin);
}
}
@@ -595,6 +597,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
@@ -593,6 +595,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
void RenderFrameMessageFilter::OnGetPluginInfo(
int render_frame_id,
const GURL& url,
@@ -168,7 +181,7 @@ index 4099c6a7ea9f..5c0d94d6062d 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool* found,
@@ -603,8 +606,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
@@ -601,8 +604,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
bool allow_wildcard = true;
*found = plugin_service_->GetPluginInfo(
render_process_id_, render_frame_id, resource_context_, url,
@@ -180,7 +193,7 @@ index 4099c6a7ea9f..5c0d94d6062d 100644
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h
index 0b884a7558a9..98ecd1ca2460 100644
index 8c3371209034..ae382bf750c0 100644
--- content/browser/frame_host/render_frame_message_filter.h
+++ content/browser/frame_host/render_frame_message_filter.h
@@ -136,13 +136,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter
@@ -201,10 +214,10 @@ index 0b884a7558a9..98ecd1ca2460 100644
const std::string& mime_type,
bool* found,
diff --git content/browser/loader/mime_sniffing_resource_handler.cc content/browser/loader/mime_sniffing_resource_handler.cc
index 130041fe86c2..90b4e6e21167 100644
index f951a3fd5cad..4740a49d4d38 100644
--- content/browser/loader/mime_sniffing_resource_handler.cc
+++ content/browser/loader/mime_sniffing_resource_handler.cc
@@ -449,8 +449,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
@@ -447,8 +447,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
WebPluginInfo plugin;
bool has_plugin = plugin_service_->GetPluginInfo(
info->GetChildID(), info->GetRenderFrameID(), info->GetContext(),
@@ -216,10 +229,10 @@ index 130041fe86c2..90b4e6e21167 100644
if (stale) {
// Refresh the plugins asynchronously.
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
index 0378ab3c5013..21b7157f7ac8 100644
index 130f4d8e92e8..bade33e04c2e 100644
--- content/browser/plugin_service_impl.cc
+++ content/browser/plugin_service_impl.cc
@@ -260,6 +260,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
@@ -262,6 +262,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
int render_frame_id,
ResourceContext* context,
const GURL& url,
@@ -227,7 +240,7 @@ index 0378ab3c5013..21b7157f7ac8 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool allow_wildcard,
@@ -276,7 +277,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
@@ -278,7 +279,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
for (size_t i = 0; i < plugins.size(); ++i) {
if (!filter_ ||
filter_->IsPluginAvailable(render_process_id, render_frame_id, context,
@@ -238,7 +251,7 @@ index 0378ab3c5013..21b7157f7ac8 100644
if (actual_mime_type)
*actual_mime_type = mime_types[i];
diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h
index fb9226fd1b1c..0e13f2df47a3 100644
index e6de4ca6c8b3..18eea4948e43 100644
--- content/browser/plugin_service_impl.h
+++ content/browser/plugin_service_impl.h
@@ -63,6 +63,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
@@ -250,10 +263,10 @@ index fb9226fd1b1c..0e13f2df47a3 100644
const std::string& mime_type,
bool allow_wildcard,
diff --git content/common/frame_messages.h content/common/frame_messages.h
index 3e00480ee1bc..34421dcd3c20 100644
index 7bce348a78d4..bc27dbcdda37 100644
--- content/common/frame_messages.h
+++ content/common/frame_messages.h
@@ -1359,8 +1359,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
@@ -1342,8 +1342,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
// Used to get the list of plugins. |main_frame_origin| is used to handle
// exceptions for plugin content settings.
@@ -264,7 +277,7 @@ index 3e00480ee1bc..34421dcd3c20 100644
url::Origin /* main_frame_origin */,
std::vector<content::WebPluginInfo> /* plugins */)
@@ -1368,9 +1369,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
@@ -1351,9 +1352,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
// type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the
// found plugin.
@@ -325,7 +338,7 @@ index 3b610b1f554e..7c439e060779 100644
WebPluginInfo* plugin) = 0;
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index 3d34633700dd..b175fff52d6c 100644
index b51a04da8ca0..ca13e9a6a07e 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -73,6 +73,9 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -338,24 +351,22 @@ index 3d34633700dd..b175fff52d6c 100644
// Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -331,6 +334,12 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -327,6 +330,10 @@ class CONTENT_EXPORT ContentRendererClient {
// This method may invalidate the frame.
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
+ // Notifies that a DevTools agent has attached or detached.
+ virtual void DevToolsAgentAttached(RenderFrame* render_frame,
+ int session_id) {}
+ virtual void DevToolsAgentDetached(RenderFrame* render_frame,
+ int session_id) {}
+ virtual void DevToolsAgentAttached() {}
+ virtual void DevToolsAgentDetached() {}
+
// Allows subclasses to enable some runtime features before Blink has
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
index 4f8478bfa87a..52471407518e 100644
index aa77b86eee98..097d26a80aa9 100644
--- content/public/renderer/render_frame_observer.h
+++ content/public/renderer/render_frame_observer.h
@@ -124,6 +124,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -121,6 +121,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
// load. This is used for UseCounter feature metrics.
virtual void DidObserveNewFeatureUsage(blink::mojom::WebFeature feature) {}
@@ -365,54 +376,11 @@ index 4f8478bfa87a..52471407518e 100644
// Called when the focused node has changed to |node|.
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
diff --git content/renderer/devtools/devtools_agent.cc content/renderer/devtools/devtools_agent.cc
index 685c39f6aca2..cee77800770a 100644
--- content/renderer/devtools/devtools_agent.cc
+++ content/renderer/devtools/devtools_agent.cc
@@ -20,7 +20,9 @@
#include "content/child/child_process.h"
#include "content/common/devtools_messages.h"
#include "content/common/frame_messages.h"
+#include "content/public/common/content_client.h"
#include "content/public/common/manifest.h"
+#include "content/public/renderer/content_renderer_client.h"
#include "content/renderer/devtools/devtools_cpu_throttler.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_widget.h"
@@ -218,6 +220,8 @@ void DevToolsAgent::AttachDevToolsSession(
GetWebAgent()->Attach(session_id);
}
+ GetContentClient()->renderer()->DevToolsAgentAttached(frame_, session_id);
+
sessions_[session_id].reset(
new Session(session_id, this, std::move(session)));
@@ -237,6 +241,7 @@ void DevToolsAgent::AttachDevToolsSession(
void DevToolsAgent::DetachSession(int session_id) {
GetWebAgent()->Detach(session_id);
+ GetContentClient()->renderer()->DevToolsAgentDetached(frame_, session_id);
io_sessions_.erase(session_id);
sessions_.erase(session_id);
hosts_.erase(session_id);
@@ -382,8 +387,10 @@ bool DevToolsAgent::IsAttached() {
}
void DevToolsAgent::DetachAllSessions() {
- for (auto& it : hosts_)
+ for (auto& it : hosts_) {
GetWebAgent()->Detach(it.first);
+ GetContentClient()->renderer()->DevToolsAgentDetached(frame_, it.first);
+ }
hosts_.clear();
io_sessions_.clear();
sessions_.clear();
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index 40f9cef599dc..ebbc6078b611 100644
index f341fb4aec24..28f3105f15c0 100644
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
@@ -3210,7 +3210,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
@@ -3468,7 +3468,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
std::string mime_type;
bool found = false;
Send(new FrameHostMsg_GetPluginInfo(
@@ -422,7 +390,7 @@ index 40f9cef599dc..ebbc6078b611 100644
params.mime_type.Utf8(), &found, &info, &mime_type));
if (!found)
return nullptr;
@@ -3552,6 +3553,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
@@ -3824,6 +3825,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
void RenderFrameImpl::FrameFocused() {
Send(new FrameHostMsg_FrameFocused(routing_id_));
@@ -432,10 +400,10 @@ index 40f9cef599dc..ebbc6078b611 100644
void RenderFrameImpl::WillCommitProvisionalLoad() {
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 10b32b1254c6..6ba3dfbe9d15 100644
index f55d956f05ec..ec2292acb1c3 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -819,6 +819,8 @@ void RenderThreadImpl::Init(
@@ -822,6 +822,8 @@ void RenderThreadImpl::Init(
StartServiceManagerConnection();
@@ -445,10 +413,10 @@ index 10b32b1254c6..6ba3dfbe9d15 100644
base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest,
base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 3cd99e14d1d5..96e8d51625d7 100644
index 561593754e91..18273663e17e 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -846,6 +846,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
@@ -842,6 +842,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
void RendererBlinkPlatformImpl::GetPluginList(
bool refresh,
@@ -456,7 +424,7 @@ index 3cd99e14d1d5..96e8d51625d7 100644
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) {
#if BUILDFLAG(ENABLE_PLUGINS)
@@ -853,7 +854,8 @@ void RendererBlinkPlatformImpl::GetPluginList(
@@ -849,7 +850,8 @@ void RendererBlinkPlatformImpl::GetPluginList(
if (!plugin_refresh_allowed_)
refresh = false;
RenderThread::Get()->Send(
@@ -466,11 +434,26 @@ index 3cd99e14d1d5..96e8d51625d7 100644
for (const WebPluginInfo& plugin : plugins) {
builder->AddPlugin(WebString::FromUTF16(plugin.name),
WebString::FromUTF16(plugin.desc),
@@ -1424,6 +1426,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() {
base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory();
}
+void RendererBlinkPlatformImpl::DevToolsAgentAttached() {
+ GetContentClient()->renderer()->DevToolsAgentAttached();
+}
+
+void RendererBlinkPlatformImpl::DevToolsAgentDetached() {
+ GetContentClient()->renderer()->DevToolsAgentDetached();
+}
+
void RendererBlinkPlatformImpl::InitializeWebDatabaseHostIfNeeded() {
if (!web_database_host_) {
web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create(
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 72649102bfcc..6067abc4c8c0 100644
index 65ddfde81aff..d92a0b316270 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -130,6 +130,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -128,6 +128,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
viz::FrameSinkId GenerateFrameSinkId() override;
void GetPluginList(bool refresh,
@@ -478,6 +461,16 @@ index 72649102bfcc..6067abc4c8c0 100644
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) override;
blink::WebPublicSuffixList* PublicSuffixList() override;
@@ -258,6 +259,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
mojo::ScopedDataPipeConsumerHandle handle) override;
void RequestPurgeMemory() override;
+ void DevToolsAgentAttached() override;
+ void DevToolsAgentDetached() override;
+
// Returns non-null.
// It is invalid to call this in an incomplete env where
// RenderThreadImpl::current() returns nullptr (e.g. in some tests).
diff --git content/shell/browser/shell_plugin_service_filter.cc content/shell/browser/shell_plugin_service_filter.cc
index 3a48c59b7e3e..d10ef64adbba 100644
--- content/shell/browser/shell_plugin_service_filter.cc
@@ -527,10 +520,10 @@ index db23a83ed079..57a4c536118c 100644
const std::string& mime_type,
bool allow_wildcard,
diff --git content/test/test_blink_web_unit_test_support.cc content/test/test_blink_web_unit_test_support.cc
index cb545a4ddea4..f21d056e50a2 100644
index ae5e6942fe34..a8fead11a023 100644
--- content/test/test_blink_web_unit_test_support.cc
+++ content/test/test_blink_web_unit_test_support.cc
@@ -318,6 +318,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
@@ -325,6 +325,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
void TestBlinkWebUnitTestSupport::GetPluginList(
bool refresh,
@@ -539,10 +532,10 @@ index cb545a4ddea4..f21d056e50a2 100644
blink::WebPluginListBuilder* builder) {
builder->AddPlugin("pdf", "pdf", "pdf-files");
diff --git content/test/test_blink_web_unit_test_support.h content/test/test_blink_web_unit_test_support.h
index 200f40eb51f5..afba549f0cdf 100644
index 9b5c0a94fa7f..f31678481f0f 100644
--- content/test/test_blink_web_unit_test_support.h
+++ content/test/test_blink_web_unit_test_support.h
@@ -70,6 +70,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {
@@ -72,6 +72,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {
const blink::WebSize& size) override;
void GetPluginList(bool refresh,

View File

@@ -1,5 +1,5 @@
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
index 631772316423..f00a94403c61 100644
index 5e0eabb..f862908 100644
--- chrome/common/crash_keys.cc
+++ chrome/common/crash_keys.cc
@@ -4,6 +4,8 @@
@@ -10,45 +10,17 @@ index 631772316423..f00a94403c61 100644
+
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/format_macros.h"
@@ -84,7 +86,7 @@ const char kViewCount[] = "view-count";
const char kUserCloudPolicyManagerConnectTrace[] =
"user-cloud-policy-manager-connect-trace";
#include "base/logging.h"
@@ -26,7 +28,7 @@
-size_t RegisterChromeCrashKeys() {
+void GetChromeCrashKeys(std::vector<base::debug::CrashKey>& keys) {
// The following keys may be chunked by the underlying crash logging system,
// but ultimately constitute a single key-value pair.
//
@@ -200,10 +202,16 @@ size_t RegisterChromeCrashKeys() {
// This dynamic set of keys is used for sets of key value pairs when gathering
// a collection of data, like command line switches or extension IDs.
- std::vector<base::debug::CrashKey> keys(
- fixed_keys, fixed_keys + arraysize(fixed_keys));
+ keys.reserve(keys.size() + arraysize(fixed_keys));
+ std::copy(fixed_keys, fixed_keys + arraysize(fixed_keys),
+ std::back_inserter(keys));
crash_keys::GetCrashKeysForCommandLineSwitches(&keys);
+}
+
+size_t RegisterChromeCrashKeys() {
+ std::vector<base::debug::CrashKey> keys;
+ GetChromeCrashKeys(keys);
// Register the extension IDs.
{
@@ -237,7 +245,7 @@ size_t RegisterChromeCrashKeys() {
return base::debug::InitCrashKeys(&keys.at(0), keys.size(), kChunkMaxLength);
}
namespace crash_keys {
-static bool IsBoringSwitch(const std::string& flag) {
+bool IsBoringChromeSwitch(const std::string& flag) {
static const char* const kIgnoreSwitches[] = {
switches::kEnableLogging,
switches::kFlagSwitchesBegin,
@@ -292,7 +300,7 @@ static bool IsBoringSwitch(const std::string& flag) {
@@ -81,7 +83,7 @@ static bool IsBoringSwitch(const std::string& flag) {
}
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) {
@@ -58,30 +30,22 @@ index 631772316423..f00a94403c61 100644
void SetActiveExtensions(const std::set<std::string>& extensions) {
diff --git chrome/common/crash_keys.h chrome/common/crash_keys.h
index 38e43f247477..62fe45582661 100644
index a18c8fc..011bcc2 100644
--- chrome/common/crash_keys.h
+++ chrome/common/crash_keys.h
@@ -22,10 +22,18 @@ class CommandLine;
@@ -16,6 +16,10 @@ class CommandLine;
}
namespace crash_keys {
+// Returns the list of potential crash keys that can be sent to the crash
+// server.
+void GetChromeCrashKeys(std::vector<base::debug::CrashKey>& keys);
+
// Registers all of the potential crash keys that can be sent to the crash
// reporting server. Returns the size of the union of all keys.
size_t RegisterChromeCrashKeys();
+
+// Returns true if the specified command-line flag should be excluded from
+// crash reporting.
+bool IsBoringChromeSwitch(const std::string& flag);
+
// Sets the kNumSwitches key and the set of keys named using kSwitchFormat based
// on the given |command_line|.
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
index 60c6636bddf2..7e582f797653 100644
index fd5a28b..df46cb0 100644
--- chrome_elf/BUILD.gn
+++ chrome_elf/BUILD.gn
@@ -7,6 +7,7 @@
@@ -92,7 +56,7 @@ index 60c6636bddf2..7e582f797653 100644
import("//chrome/process_version_rc_template.gni")
import("//testing/test.gni")
@@ -174,9 +175,6 @@ static_library("blacklist") {
@@ -181,9 +182,6 @@ static_library("blacklist") {
static_library("crash") {
sources = [
@@ -102,7 +66,7 @@ index 60c6636bddf2..7e582f797653 100644
"crash/crash_helper.cc",
"crash/crash_helper.h",
]
@@ -184,6 +182,7 @@ static_library("crash") {
@@ -191,6 +189,7 @@ static_library("crash") {
":hook_util",
"//base", # This needs to go. DEP of app, crash_keys, client.
"//base:base_static", # pe_image
@@ -110,8 +74,8 @@ index 60c6636bddf2..7e582f797653 100644
"//chrome/install_static:install_static_util",
"//components/crash/content/app",
"//components/crash/core/common", # crash_keys
@@ -192,6 +191,17 @@ static_library("crash") {
"//gpu/config:crash_keys",
@@ -198,6 +197,17 @@ static_library("crash") {
"//content/public/common:result_codes",
"//third_party/crashpad/crashpad/client", # DumpWithoutCrash
]
+
@@ -129,7 +93,7 @@ index 60c6636bddf2..7e582f797653 100644
static_library("hook_util") {
diff --git chrome_elf/crash/crash_helper.cc chrome_elf/crash/crash_helper.cc
index e8e27dc4ebd7..7cb2149ec41d 100644
index e8e27dc..7cb2149 100644
--- chrome_elf/crash/crash_helper.cc
+++ chrome_elf/crash/crash_helper.cc
@@ -11,12 +11,17 @@
@@ -163,18 +127,18 @@ index e8e27dc4ebd7..7cb2149ec41d 100644
g_crash_helper_enabled = true;
return true;
diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc
index 42a50e8381c1..718f945573a3 100644
index c72cd36..e9a79dd 100644
--- components/crash/content/app/breakpad_linux.cc
+++ components/crash/content/app/breakpad_linux.cc
@@ -29,6 +29,7 @@
@@ -28,6 +28,7 @@
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
+#include "base/debug/leak_annotations.h"
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/linux_util.h"
@@ -89,6 +90,7 @@ namespace {
@@ -88,6 +89,7 @@ namespace {
#if !defined(OS_CHROMEOS)
const char kUploadURL[] = "https://clients2.google.com/cr/report";
@@ -182,7 +146,7 @@ index 42a50e8381c1..718f945573a3 100644
#endif
bool g_is_crash_reporter_enabled = false;
@@ -686,7 +688,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
@@ -685,7 +687,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
info.process_type_length = 7;
info.distro = base::g_linux_distro;
info.distro_length = my_strlen(base::g_linux_distro);
@@ -191,7 +155,7 @@ index 42a50e8381c1..718f945573a3 100644
info.process_start_time = g_process_start_time;
info.oom_size = base::g_oom_size;
info.pid = g_pid;
@@ -1356,7 +1358,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
@@ -1341,7 +1343,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
header_content_encoding,
header_content_type,
post_file,
@@ -200,16 +164,16 @@ index 42a50e8381c1..718f945573a3 100644
"--timeout=10", // Set a timeout so we don't hang forever.
"--tries=1", // Don't retry if the upload fails.
"-O", // Output reply to the file descriptor path.
@@ -1696,10 +1698,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
@@ -1681,10 +1683,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version);
writer.AddBoundary();
- writer.AddPairString("prod", product_name);
+ writer.AddPairString("product", product_name);
writer.AddBoundary();
- writer.AddPairString("ver", version);
+ writer.AddBoundary();
+ writer.AddPairString("version", version);
writer.AddBoundary();
- writer.AddPairString("ver", version);
+
+#if defined(ARCH_CPU_32_BITS)
+ const char* platform = "linux32";
@@ -217,13 +181,35 @@ index 42a50e8381c1..718f945573a3 100644
+ const char* platform = "linux64";
+#endif
+ writer.AddPairString("platform", platform);
+ writer.AddBoundary();
writer.AddBoundary();
+
if (info.pid > 0) {
char pid_value_buf[kUint64StringSize];
uint64_t pid_value_len = my_uint64_len(info.pid);
@@ -2017,6 +2028,17 @@ void InitCrashReporter(const std::string& process_type) {
PostEnableBreakpadInitialization();
@@ -1789,10 +1800,20 @@ void HandleCrashDump(const BreakpadInfo& info) {
crash_reporter::internal::TransitionalCrashKeyStorage;
CrashKeyStorage::Iterator crash_key_iterator(*info.crash_keys);
const CrashKeyStorage::Entry* entry;
+
+ crash_reporter::CrashReporterClient::ParameterMap parameters;
+
while ((entry = crash_key_iterator.Next())) {
if (g_use_crash_key_white_list && !IsInWhiteList(entry->key))
continue;
- writer.AddPairString(entry->key, entry->value);
+ parameters.insert(std::make_pair(entry->key, entry->value));
+ }
+
+ if (!parameters.empty())
+ parameters = GetCrashReporterClient()->FilterParameters(parameters);
+
+ for (const auto& param : parameters) {
+ writer.AddPairString(param.first.c_str(), param.second.c_str());
writer.AddBoundary();
writer.Flush();
}
@@ -2002,6 +2023,17 @@ void SetChannelCrashKey(const std::string& channel) {
channel_key.Set(channel);
}
+void SetCrashServerURL(const std::string& url) {
@@ -241,12 +227,12 @@ index 42a50e8381c1..718f945573a3 100644
void InitNonBrowserCrashReporterForAndroid(const std::string& process_type) {
SanitizationInfo sanitization_info;
diff --git components/crash/content/app/breakpad_linux.h components/crash/content/app/breakpad_linux.h
index 4a2a429fc052..70f3adbc73cf 100644
index 9ee8555..7af55dd 100644
--- components/crash/content/app/breakpad_linux.h
+++ components/crash/content/app/breakpad_linux.h
@@ -16,6 +16,9 @@ namespace breakpad {
// Turns on the crash reporter in any process.
extern void InitCrashReporter(const std::string& process_type);
@@ -19,6 +19,9 @@ extern void InitCrashReporter(const std::string& process_type);
// Sets the product/distribution channel crash key.
void SetChannelCrashKey(const std::string& channel);
+// Set the crash server URL.
+void SetCrashServerURL(const std::string& url);
@@ -255,7 +241,7 @@ index 4a2a429fc052..70f3adbc73cf 100644
extern void InitCrashKeysForTesting();
diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc
index 72849b964f1c..6a78f9b9c832 100644
index a37619c..e13a0f7 100644
--- components/crash/content/app/crash_reporter_client.cc
+++ components/crash/content/app/crash_reporter_client.cc
@@ -88,11 +88,12 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
@@ -280,7 +266,7 @@ index 72849b964f1c..6a78f9b9c832 100644
#if defined(OS_WIN)
bool CrashReporterClient::GetCrashDumpLocation(base::string16* crash_dir) {
@@ -149,6 +151,32 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
@@ -145,6 +147,32 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
}
#endif
@@ -313,29 +299,36 @@ index 72849b964f1c..6a78f9b9c832 100644
#if defined(OS_ANDROID)
int CrashReporterClient::GetAndroidMinidumpDescriptor() {
return 0;
@@ -179,9 +207,4 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
@@ -175,9 +203,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
}
#endif
-bool CrashReporterClient::EnableBreakpadForProcess(
- const std::string& process_type) {
- return false;
-}
-
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
+CrashReporterClient::ParameterMap
+CrashReporterClient::FilterParameters(const ParameterMap& parameters) {
+ return parameters;
}
+#endif
} // namespace crash_reporter
diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h
index d2a805289c0d..25d026583c37 100644
index 75d3d6d..aa86f45 100644
--- components/crash/content/app/crash_reporter_client.h
+++ components/crash/content/app/crash_reporter_client.h
@@ -8,6 +8,7 @@
#include <stddef.h>
@@ -5,7 +5,9 @@
#ifndef COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
#define COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
+#include <map>
#include <string>
+#include <vector>
#include "base/strings/string16.h"
#include "build/build_config.h"
@@ -93,12 +94,13 @@ class CrashReporterClient {
@@ -91,12 +93,13 @@ class CrashReporterClient {
virtual int GetResultCodeRespawnFailed();
#endif
@@ -350,15 +343,15 @@ index d2a805289c0d..25d026583c37 100644
virtual base::FilePath GetReporterLogFilename();
// Custom crash minidump handler after the minidump is generated.
@@ -107,6 +109,7 @@ class CrashReporterClient {
// WARNING: this handler runs in a compromised context. It may not call into
@@ -106,6 +109,7 @@ class CrashReporterClient {
// libc nor allocate memory normally.
virtual bool HandleCrashDump(const char* crashdump_filename);
+#endif
#endif
+#endif
// The location where minidump files should be written. Returns true if
@@ -186,6 +189,23 @@ class CrashReporterClient {
// |crash_dir| was set. Windows has to use base::string16 because this code
@@ -180,6 +184,30 @@ class CrashReporterClient {
// Returns true if breakpad should run in the given process type.
virtual bool EnableBreakpadForProcess(const std::string& process_type);
@@ -378,26 +371,33 @@ index d2a805289c0d..25d026583c37 100644
+ // Returns true if forwarding of crashes to the system crash reporter is
+ // enabled for the browser process.
+ virtual bool EnableBrowserCrashForwarding();
+#endif
+
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
+ // Provides an oportunity to modify the parameters that will be sent with a
+ // crash upload.
+ using ParameterMap = std::map<std::string, std::string>;
+ virtual ParameterMap FilterParameters(const ParameterMap& parameters);
+#endif
};
} // namespace crash_reporter
diff --git components/crash/content/app/crashpad.cc components/crash/content/app/crashpad.cc
index 6949d5e7dcc4..d9b052382a6a 100644
index dde11ea..1a1f8b0 100644
--- components/crash/content/app/crashpad.cc
+++ components/crash/content/app/crashpad.cc
@@ -137,7 +137,8 @@ void InitializeCrashpadImpl(bool initial_client,
@@ -133,7 +133,8 @@ void InitializeCrashpadImpl(bool initial_client,
// fallback. Forwarding is turned off for debug-mode builds even for the
// browser process, because the system's crash reporter can take a very long
// time to chew on symbols.
- if (!browser_process || is_debug_build) {
+ if (!browser_process || is_debug_build ||
+ !crash_reporter_client->EnableBrowserCrashForwarding()) {
crashpad_info->set_system_crash_reporter_forwarding(
crashpad::TriState::kDisabled);
crashpad::CrashpadInfo::GetCrashpadInfo()
->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled);
}
diff --git components/crash/content/app/crashpad_mac.mm components/crash/content/app/crashpad_mac.mm
index 485c2b4b3e98..3b5f3eaa3926 100644
index 6508c2a..f51ce5a 100644
--- components/crash/content/app/crashpad_mac.mm
+++ components/crash/content/app/crashpad_mac.mm
@@ -16,11 +16,14 @@
@@ -415,7 +415,7 @@ index 485c2b4b3e98..3b5f3eaa3926 100644
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
#include "third_party/crashpad/crashpad/client/crashpad_client.h"
#include "third_party/crashpad/crashpad/client/crashpad_info.h"
@@ -42,9 +45,10 @@ base::FilePath PlatformCrashpadInitialization(
@@ -41,9 +44,10 @@ base::FilePath PlatformCrashpadInitialization(
if (initial_client) {
@autoreleasepool {
@@ -429,7 +429,7 @@ index 485c2b4b3e98..3b5f3eaa3926 100644
// Is there a way to recover if this fails?
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
@@ -56,16 +60,27 @@ base::FilePath PlatformCrashpadInitialization(
@@ -55,16 +59,27 @@ base::FilePath PlatformCrashpadInitialization(
// crash server won't have symbols for any other build types.
std::string url = "https://clients2.google.com/cr/report";
#else
@@ -462,7 +462,7 @@ index 485c2b4b3e98..3b5f3eaa3926 100644
#if defined(GOOGLE_CHROME_BUILD)
// Empty means stable.
@@ -81,12 +96,16 @@ base::FilePath PlatformCrashpadInitialization(
@@ -80,12 +95,16 @@ base::FilePath PlatformCrashpadInitialization(
process_annotations["channel"] = "";
}
@@ -484,7 +484,7 @@ index 485c2b4b3e98..3b5f3eaa3926 100644
std::vector<std::string> arguments;
@@ -108,6 +127,12 @@ base::FilePath PlatformCrashpadInitialization(
@@ -107,6 +126,12 @@ base::FilePath PlatformCrashpadInitialization(
"--reset-own-crash-exception-port-to-system-default");
}
@@ -498,7 +498,7 @@ index 485c2b4b3e98..3b5f3eaa3926 100644
handler_path, database_path, metrics_path, url, process_annotations,
arguments, true, false);
diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc
index 3a33c9bb8e92..961d600f7452 100644
index a5d1afc..91815d9 100644
--- components/crash/content/app/crashpad_win.cc
+++ components/crash/content/app/crashpad_win.cc
@@ -34,8 +34,8 @@ void GetPlatformCrashpadAnnotations(
@@ -568,7 +568,7 @@ index 3a33c9bb8e92..961d600f7452 100644
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
index 46954327b9c7..62a7ce8d4e46 100644
index 4695432..62a7ce8 100644
--- content/browser/frame_host/debug_urls.cc
+++ content/browser/frame_host/debug_urls.cc
@@ -139,7 +139,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {

View File

@@ -146,7 +146,7 @@ index b64f74fbaf28..0c3c22e215b6 100644
struct Data;
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
index 05f554b73036..5b6d1a2a98e1 100644
index 71037bb04d5d..61f7e8ca04ca 100644
--- third_party/crashpad/crashpad/handler/BUILD.gn
+++ third_party/crashpad/crashpad/handler/BUILD.gn
@@ -12,6 +12,7 @@
@@ -154,13 +154,13 @@ index 05f554b73036..5b6d1a2a98e1 100644
# limitations under the License.
+import("//cef/libcef/features/features.gni")
import("//testing/test.gni")
import("../build/crashpad_buildconfig.gni")
static_library("handler") {
@@ -56,8 +57,18 @@ static_library("handler") {
@@ -75,8 +76,20 @@ static_library("handler") {
"../third_party/mini_chromium:base",
"../tools:tool_support",
"../util",
"//base",
+ "//cef/libcef/features",
]
@@ -168,19 +168,42 @@ index 05f554b73036..5b6d1a2a98e1 100644
+ sources += [
+ "//cef/libcef/common/cef_crash_report_upload_thread.cc",
+ "//cef/libcef/common/cef_crash_report_upload_thread.h",
+ "//cef/libcef/common/cef_crash_report_utils.cc",
+ "//cef/libcef/common/cef_crash_report_utils.h",
+ ]
+
+ configs += [ "//cef/libcef/features:config" ]
+ }
+
if (is_win) {
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
index 7505524b693b..4f8ceaa43bd6 100644
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
@@ -302,6 +302,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
if (minidump_process_snapshot.Initialize(&minidump_file_reader)) {
parameters =
BreakpadHTTPFormParametersFromMinidump(&minidump_process_snapshot);
+ if (!parameters.empty())
+ parameters = FilterParameters(parameters);
}
if (!minidump_file_reader.SeekSet(start_offset)) {
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.h third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
index cdd1502b7e2f..db47f0a8b559 100644
index cdd1502b7e2f..cb8450a892ba 100644
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
@@ -99,7 +99,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
@@ -15,6 +15,7 @@
#ifndef CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_
#define CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_
+#include <map>
#include <memory>
#include <string>
@@ -99,7 +100,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
//! This method may be called from any thread.
void ReportPending(const UUID& report_uuid);
@@ -189,7 +212,7 @@ index cdd1502b7e2f..db47f0a8b559 100644
//! \brief The result code from UploadReport().
enum class UploadResult {
//! \brief The crash report was uploaded successfully.
@@ -127,7 +127,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
@@ -127,7 +128,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
//! object was constructed with \a watch_pending_reports, it will also scan
//! the crash report database for other pending reports, and process those as
//! well.
@@ -198,7 +221,7 @@ index cdd1502b7e2f..db47f0a8b559 100644
//! \brief Processes a single pending report from the database.
//!
@@ -141,7 +141,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
@@ -141,7 +142,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
//! remain in the “pending” state. If the upload fails and no more retries are
//! desired, or report upload is disabled, it will be marked as “completed” in
//! the database without ever having been uploaded.
@@ -207,8 +230,20 @@ index cdd1502b7e2f..db47f0a8b559 100644
//! \brief Attempts to upload a crash report.
//!
@@ -158,6 +159,11 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
UploadResult UploadReport(const CrashReportDatabase::Report* report,
std::string* response_body);
+ using ParameterMap = std::map<std::string, std::string>;
+ virtual ParameterMap FilterParameters(const ParameterMap& parameters) {
+ return parameters;
+ }
+
// WorkerThread::Delegate:
//! \brief Calls ProcessPendingReports() in response to ReportPending() having
//! been called on any thread, as well as periodically on a timer.
diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc
index 2e46f86a6522..faf4f1072ad0 100644
index f175fddf6084..d6285bbf28bf 100644
--- third_party/crashpad/crashpad/handler/handler_main.cc
+++ third_party/crashpad/crashpad/handler/handler_main.cc
@@ -35,8 +35,10 @@
@@ -222,8 +257,8 @@ index 2e46f86a6522..faf4f1072ad0 100644
#include "client/crash_report_database.h"
#include "client/crashpad_client.h"
#include "client/crashpad_info.h"
@@ -76,6 +78,10 @@
#include "util/win/session_end_watcher.h"
@@ -79,6 +81,10 @@
#include "handler/fuchsia/exception_handler_server.h"
#endif // OS_MACOSX
+#if BUILDFLAG(ENABLE_CEF)
@@ -233,7 +268,7 @@ index 2e46f86a6522..faf4f1072ad0 100644
namespace crashpad {
namespace {
@@ -151,6 +157,9 @@ struct Options {
@@ -154,6 +160,9 @@ struct Options {
bool periodic_tasks;
bool rate_limit;
bool upload_gzip;
@@ -243,7 +278,7 @@ index 2e46f86a6522..faf4f1072ad0 100644
};
// Splits |key_value| on '=' and inserts the resulting key and value into |map|.
@@ -438,6 +447,9 @@ int HandlerMain(int argc,
@@ -451,6 +460,9 @@ int HandlerMain(int argc,
kOptionResetOwnCrashExceptionPortToSystemDefault,
#endif // OS_MACOSX
kOptionURL,
@@ -253,7 +288,7 @@ index 2e46f86a6522..faf4f1072ad0 100644
// Standard options.
kOptionHelp = -2,
@@ -488,6 +500,9 @@ int HandlerMain(int argc,
@@ -501,6 +513,9 @@ int HandlerMain(int argc,
{"url", required_argument, nullptr, kOptionURL},
{"help", no_argument, nullptr, kOptionHelp},
{"version", no_argument, nullptr, kOptionVersion},
@@ -263,7 +298,7 @@ index 2e46f86a6522..faf4f1072ad0 100644
{nullptr, 0, nullptr, 0},
};
@@ -592,6 +607,27 @@ int HandlerMain(int argc,
@@ -605,6 +620,27 @@ int HandlerMain(int argc,
options.url = optarg;
break;
}
@@ -291,7 +326,7 @@ index 2e46f86a6522..faf4f1072ad0 100644
case kOptionHelp: {
Usage(me);
MetricsRecordExit(Metrics::LifetimeMilestone::kExitedEarly);
@@ -757,15 +793,23 @@ int HandlerMain(int argc,
@@ -772,15 +808,23 @@ int HandlerMain(int argc,
upload_thread_options.rate_limit = options.rate_limit;
upload_thread_options.upload_gzip = options.upload_gzip;
upload_thread_options.watch_pending_reports = options.periodic_tasks;

View File

@@ -1,8 +1,8 @@
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
index 72ffe59f522b..dcefb6cd9bb4 100644
index 36525162ff0e..db28486fa6c0 100644
--- content/browser/devtools/devtools_http_handler.cc
+++ content/browser/devtools/devtools_http_handler.cc
@@ -504,7 +504,7 @@ void DevToolsHttpHandler::OnJsonRequest(
@@ -503,7 +503,7 @@ void DevToolsHttpHandler::OnJsonRequest(
version.SetString("Protocol-Version",
DevToolsAgentHost::GetProtocolVersion());
version.SetString("WebKit-Version", GetWebKitVersion());
@@ -12,10 +12,10 @@ index 72ffe59f522b..dcefb6cd9bb4 100644
version.SetString("V8-Version", V8_VERSION_STRING);
std::string host = info.headers["host"];
diff --git content/public/common/content_client.h content/public/common/content_client.h
index 48ca775aa88e..cb268f412f61 100644
index ea3c1ef6bb61..0c7d3199050f 100644
--- content/public/common/content_client.h
+++ content/public/common/content_client.h
@@ -138,6 +138,10 @@ class CONTENT_EXPORT ContentClient {
@@ -145,6 +145,10 @@ class CONTENT_EXPORT ContentClient {
// Used as part of the user agent string.
virtual std::string GetProduct() const;

View File

@@ -1,8 +1,8 @@
diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc
index 0663535e3f81..e0e20722c820 100644
index 3263eb9e324a..b5bde4cea8f7 100644
--- content/browser/frame_host/render_frame_host_manager.cc
+++ content/browser/frame_host/render_frame_host_manager.cc
@@ -1082,10 +1082,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
@@ -890,10 +890,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
// TODO(alexmos): This check should've been enforced earlier in the
// navigation, in chrome::Navigate(). Verify this, and then convert this to
// a CHECK and remove the fallback.
@@ -18,7 +18,7 @@ index 0663535e3f81..e0e20722c820 100644
return true;
}
@@ -1224,7 +1225,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
@@ -1032,7 +1033,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
// Double-check that the new SiteInstance is associated with the right
// BrowserContext.
@@ -26,15 +26,15 @@ index 0663535e3f81..e0e20722c820 100644
+ DCHECK(GetContentClient()->browser()->IsSameBrowserContext(
+ new_instance->GetBrowserContext(), browser_context));
// If |new_instance| is a new SiteInstance for a subframe with an isolated
// origin, set its process reuse policy so that such subframes are
// If |new_instance| is a new SiteInstance for a subframe that requires a
// dedicated process, set its process reuse policy so that such subframes are
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index e56b320170df..26aa6fe50311 100644
index 18767b608ce9..41f5dc26ffdc 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -343,6 +343,13 @@ class CONTENT_EXPORT ContentBrowserClient {
const GURL& current_url,
const GURL& new_url);
@@ -341,6 +341,13 @@ class CONTENT_EXPORT ContentBrowserClient {
const GURL& current_url,
const GURL& new_url);
+ // Returns true if two browser contexts should be considered the same. CEF
+ // uses this to treat *Impl and *Proxy contexts as the same.
@@ -47,10 +47,10 @@ index e56b320170df..26aa6fe50311 100644
// current SiteInstance, if it does not yet have a site.
virtual bool ShouldAssignSiteForURL(const GURL& url);
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
index e85940e1123a..7d4e3c13204b 100644
index d60c12116dcc..70d376348c46 100644
--- extensions/browser/extension_host.cc
+++ extensions/browser/extension_host.cc
@@ -69,11 +69,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@@ -68,11 +68,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
DCHECK(host_type == VIEW_TYPE_EXTENSION_BACKGROUND_PAGE ||
host_type == VIEW_TYPE_EXTENSION_DIALOG ||
host_type == VIEW_TYPE_EXTENSION_POPUP);
@@ -67,7 +67,7 @@ index e85940e1123a..7d4e3c13204b 100644
render_view_host_ = host_contents_->GetRenderViewHost();
@@ -88,6 +89,48 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@@ -87,6 +88,48 @@ ExtensionHost::ExtensionHost(const Extension* extension,
dispatcher()->set_delegate(this);
}
@@ -152,7 +152,7 @@ index 34812c083bf5..1ccfaf6e1c45 100644
// A weak pointer to the current or pending RenderViewHost. We don't access
// this through the host_contents because we want to deal with the pending
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
index 69434c704f2f..f31b65fcd192 100644
index 267a40121d8e..fc68e632465c 100644
--- extensions/browser/extensions_browser_client.h
+++ extensions/browser/extensions_browser_client.h
@@ -53,6 +53,7 @@ class ComponentExtensionResourceManager;
@@ -191,10 +191,10 @@ index 69434c704f2f..f31b65fcd192 100644
// once each time the extensions system is loaded per browser_context. The
// implementation may wish to use the BrowserContext to record the current
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
index 5a06db3d4495..b960853f02b2 100644
index fec28715c0fe..74564954904f 100644
--- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc
@@ -349,9 +349,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
@@ -351,9 +351,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
return true; // TODO(kalman): return false here? It might break things...
DVLOG(1) << "CreateBackgroundHost " << extension->id();

View File

@@ -1,8 +1,8 @@
diff --git .gn .gn
index db85e5f4092f..779c93c07523 100644
index 20f642efb056..7f73f53c70ad 100644
--- .gn
+++ .gn
@@ -230,6 +230,8 @@ exec_script_whitelist =
@@ -234,6 +234,8 @@ exec_script_whitelist =
# in the Chromium repo outside of //build.
"//build_overrides/build.gni",
@@ -12,13 +12,13 @@ index db85e5f4092f..779c93c07523 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index 5c26c723bf8b..fa4994456865 100644
index 92a8578280e6..11eb3b16a812 100644
--- BUILD.gn
+++ BUILD.gn
@@ -179,6 +179,7 @@ group("gn_all") {
@@ -183,6 +183,7 @@ group("gn_all") {
if (!is_ios && !is_fuchsia) {
deps += [
"//cc:cc_unittests",
+ "//cef",
"//chrome/test:telemetry_perf_unittests",
"//chrome/test:unit_tests",
@@ -96,7 +96,7 @@ index a1d2ea4b2394..50514a54e64f 100644
diff --git build/vs_toolchain.py build/vs_toolchain.py
index 7a258ed1dacc..4165c1f9d07b 100755
index 0a54e113f30f..d8ff277fcda6 100755
--- build/vs_toolchain.py
+++ build/vs_toolchain.py
@@ -81,11 +81,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
@@ -132,7 +132,7 @@ index bd0fc70bb87f..79315464c57b 100644
if (is_mac) {
output_locales = locales_as_mac_outputs
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
index 88a6d8627d51..4a25b5d1b713 100644
index 3f65aa27ca38..3227cb17e460 100644
--- chrome/installer/mini_installer/BUILD.gn
+++ chrome/installer/mini_installer/BUILD.gn
@@ -130,7 +130,7 @@ template("generate_mini_installer") {
@@ -143,4 +143,4 @@ index 88a6d8627d51..4a25b5d1b713 100644
+ "$root_out_dir/chrome/locales/en-US.pak",
"$root_out_dir/setup.exe",
"$root_out_dir/v8_context_snapshot.bin",
release_file,
"//chrome/tools/build/win/makecab.py",

View File

@@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids
index e95450a1ff2b..5fee0604be15 100644
index fc1c4aa91190..dfa9e7a43799 100644
--- tools/gritsettings/resource_ids
+++ tools/gritsettings/resource_ids
@@ -390,4 +390,11 @@
@@ -393,4 +393,11 @@
# Please read the header and find the right section above instead.
# Resource ids starting at 31000 are reserved for projects built on Chromium.

View File

@@ -1,8 +1,8 @@
diff --git ui/base/ime/input_method_win.cc ui/base/ime/input_method_win.cc
index 3e33b5a74170..6b425cc0fbee 100644
index 06f8831222dd..68297ba47dd3 100644
--- ui/base/ime/input_method_win.cc
+++ ui/base/ime/input_method_win.cc
@@ -688,8 +688,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
@@ -685,8 +685,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
// receiving keyboard input as long as it is an active window. This works well
// even when the |attached_window_handle| becomes active but has not received
// WM_FOCUS yet.

View File

@@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index fff8488778d7..0443bcace1d4 100644
index 2673c6a79889..ca5726966ac0 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -399,7 +399,7 @@ config("compiler") {
@@ -443,7 +443,7 @@ config("compiler") {
# chromeos binutils has been patched with the fix, so always use icf there.
# The bug only affects x86 and x64, so we can still use ICF when targeting
# other architectures.
@@ -11,53 +11,52 @@ index fff8488778d7..0443bcace1d4 100644
!(current_cpu == "x86" || current_cpu == "x64")) {
ldflags += [ "-Wl,--icf=all" ]
}
diff --git chrome/browser/ui/libgtkui/gtk_ui.cc chrome/browser/ui/libgtkui/gtk_ui.cc
index bf37dd5c3799..ad5693e38487 100644
--- chrome/browser/ui/libgtkui/gtk_ui.cc
+++ chrome/browser/ui/libgtkui/gtk_ui.cc
@@ -404,11 +404,13 @@ SkColor GetToolbarTopSeparatorColor(SkColor header_fg,
diff --git chrome/browser/ui/libgtkui/gtk_util.cc chrome/browser/ui/libgtkui/gtk_util.cc
index fc6ffb9d..f6c22e5 100644
--- chrome/browser/ui/libgtkui/gtk_util.cc
+++ chrome/browser/ui/libgtkui/gtk_util.cc
@@ -56,6 +56,7 @@ void CommonInitFromCommandLine(const base::CommandLine& command_line,
}
}
#endif
+#if GTK_MAJOR_VERSION >= 3
using GdkSetAllowedBackendsFn = void (*)(const gchar*);
// Place this function pointers in read-only memory after being resolved to
// prevent it being tampered with. See crbug.com/771365 for details.
PROTECTED_MEMORY_SECTION base::ProtectedMemory<GdkSetAllowedBackendsFn>
g_gdk_set_allowed_backends;
+#if GTK_MAJOR_VERSION > 2
using GtkSetState = void (*)(GtkWidgetPath*, gint, GtkStateFlags);
PROTECTED_MEMORY_SECTION base::ProtectedMemory<GtkSetState>
_gtk_widget_path_iter_set_state;
@@ -63,6 +64,7 @@ PROTECTED_MEMORY_SECTION base::ProtectedMemory<GtkSetState>
using GtkSetObjectName = void (*)(GtkWidgetPath*, gint, const char*);
PROTECTED_MEMORY_SECTION base::ProtectedMemory<GtkSetObjectName>
_gtk_widget_path_iter_set_object_name;
+#endif
} // namespace
diff --git chrome/browser/ui/libgtkui/native_theme_gtk2.cc chrome/browser/ui/libgtkui/native_theme_gtk2.cc
index af67e8343f5a..1e6d1e5818e4 100644
--- chrome/browser/ui/libgtkui/native_theme_gtk2.cc
+++ chrome/browser/ui/libgtkui/native_theme_gtk2.cc
@@ -348,6 +348,7 @@ SkColor NativeThemeGtk2::GetSystemColor(ColorId color_id) const {
}
@@ -401,10 +403,12 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context,
NOTREACHED();
}
} else {
+#if GTK_MAJOR_VERSION > 2
static base::ProtectedMemory<GtkSetObjectName>::Initializer init(
&_gtk_widget_path_iter_set_object_name,
reinterpret_cast<GtkSetObjectName>(dlsym(
GetGtkSharedLibrary(), "gtk_widget_path_iter_set_object_name")));
+#endif
switch (part_type) {
case CSS_NAME: {
if (GtkVersionCheck(3, 20)) {
@@ -449,6 +453,7 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context,
// widgets specially if they want to.
gtk_widget_path_iter_add_class(path, -1, "chromium");
case kColorId_NumColors:
+ default:
NOTREACHED();
break;
+#if GTK_MAJOR_VERSION > 2
if (GtkVersionCheck(3, 14)) {
static base::ProtectedMemory<GtkSetState>::Initializer init(
&_gtk_widget_path_iter_set_state,
@@ -457,6 +462,7 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context,
DCHECK(*_gtk_widget_path_iter_set_state);
base::UnsanitizedCfiCall(_gtk_widget_path_iter_set_state)(path, -1, state);
}
diff --git ui/accessibility/platform/atk_util_auralinux_gtk2.cc ui/accessibility/platform/atk_util_auralinux_gtk2.cc
index 9c50ead85605..54cbd52c7de0 100644
--- ui/accessibility/platform/atk_util_auralinux_gtk2.cc
+++ ui/accessibility/platform/atk_util_auralinux_gtk2.cc
@@ -56,6 +56,8 @@ void FinishAccessibilityInitOnMainThread(
init_func();
}
+#endif
+namespace ui {
+
bool AtkUtilAuraLinux::PlatformShouldEnableAccessibility() {
std::unique_ptr<base::Environment> env(base::Environment::Create());
std::string gtk_modules;
@@ -78,3 +80,6 @@ void AtkUtilAuraLinux::PlatformInitializeAsync() {
base::Bind(&GetAccessibilityModuleInitFunc),
base::Bind(&FinishAccessibilityInitOnMainThread));
}
+
+} // namespace ui
+
ScopedStyleContext child_context(gtk_style_context_new());
gtk_style_context_set_path(child_context, path);

View File

@@ -1,15 +0,0 @@
diff --git third_party/widevine/cdm/BUILD.gn third_party/widevine/cdm/BUILD.gn
index f35d81872096..d14e71e0319b 100644
--- third_party/widevine/cdm/BUILD.gn
+++ third_party/widevine/cdm/BUILD.gn
@@ -110,7 +110,9 @@ if (widevine_cdm_binary_files != []) {
"//build/config:exe_and_shlib_deps",
]
- if (is_posix && !is_mac) {
+ if (is_mac) {
+ ldflags = [ "-Wl,-install_name,@loader_path/libwidevinecdm.dylib" ]
+ } else if (is_posix) {
cflags = [ "-fvisibility=hidden" ]
}
}

View File

@@ -1,5 +1,5 @@
diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h
index bff60ef11025..33b430dadaf7 100644
index 27ee7fe8155b..353a61c3badd 100644
--- base/message_loop/message_loop.h
+++ base/message_loop/message_loop.h
@@ -266,6 +266,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
@@ -16,10 +16,10 @@ index bff60ef11025..33b430dadaf7 100644
+ }
+#endif // OS_WIN
+
// Returns true if the message loop is "idle". Provided for testing.
bool IsIdleForTesting();
@@ -369,6 +379,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
// Returns true if the message loop is idle (ignoring delayed tasks). This is
// the same condition which triggers DoWork() to return false: i.e.
// out of tasks which can be processed at the current run-level -- there might
@@ -373,6 +383,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
// is known to generate a system-driven nested loop.
bool task_execution_allowed_ = true;

View File

@@ -55,10 +55,10 @@ index fb6f4847cfe9..aa4c1cdafb9f 100644
} // namespace net
diff --git net/http/transport_security_state.cc net/http/transport_security_state.cc
index a433afd02178..ff92489ed243 100644
index 6eaa321ef4b8..9926ea6afc40 100644
--- net/http/transport_security_state.cc
+++ net/http/transport_security_state.cc
@@ -1553,8 +1553,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
@@ -1567,8 +1567,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
sent_expect_ct_reports_cache_.Clear();
}

View File

@@ -1,8 +1,8 @@
diff --git net/url_request/url_request.h net/url_request/url_request.h
index 0635448f00a1..3d91e1d92d7f 100644
index 60fbf78c7886..9597011602ba 100644
--- net/url_request/url_request.h
+++ net/url_request/url_request.h
@@ -684,10 +684,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
@@ -693,10 +693,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
// called with a response from the server.
void SetResponseHeadersCallback(ResponseHeadersCallback callback);

View File

@@ -1,8 +1,8 @@
diff --git BUILD.gn BUILD.gn
index 6fb2bd888..b275bfd2b 100644
index c771b8191..6a5f1f3e4 100644
--- BUILD.gn
+++ BUILD.gn
@@ -229,6 +229,10 @@ static_library("pdfium") {
@@ -230,6 +230,10 @@ jumbo_static_library("pdfium") {
if (pdf_is_complete_lib) {
complete_static_lib = true
}
@@ -12,9 +12,9 @@ index 6fb2bd888..b275bfd2b 100644
+ ]
}
static_library("test_support") {
jumbo_static_library("test_support") {
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
index 2736b8dd6..830f074b7 100644
index 97fc02a23..000b4a7d3 100644
--- fpdfsdk/fpdfview.cpp
+++ fpdfsdk/fpdfview.cpp
@@ -36,6 +36,7 @@
@@ -25,7 +25,7 @@ index 2736b8dd6..830f074b7 100644
#include "fxjs/ijs_runtime.h"
#include "public/fpdf_edit.h"
#include "public/fpdf_ext.h"
@@ -497,6 +498,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
@@ -495,6 +496,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
CPDF_ModuleMgr::Destroy();
CFX_GEModule::Destroy();

View File

@@ -1,8 +1,8 @@
diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h
index 63a73ad504d5..9b8cde03ecf4 100644
index a714130a50d8..2a835d7282b3 100644
--- content/public/common/common_param_traits_macros.h
+++ content/public/common/common_param_traits_macros.h
@@ -195,6 +195,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
@@ -187,6 +187,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
@@ -11,7 +11,7 @@ index 63a73ad504d5..9b8cde03ecf4 100644
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc
index cc20936125f4..a1cde3a9a2b2 100644
index 06069a576dfd..912155ebec7c 100644
--- content/public/common/web_preferences.cc
+++ content/public/common/web_preferences.cc
@@ -178,6 +178,7 @@ WebPreferences::WebPreferences()
@@ -23,10 +23,10 @@ index cc20936125f4..a1cde3a9a2b2 100644
record_whole_document(false),
save_previous_document_resources(SavePreviousDocumentResources::NEVER),
diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h
index 361505babff0..341873d000bc 100644
index 49be57cd2aad..417be7a55184 100644
--- content/public/common/web_preferences.h
+++ content/public/common/web_preferences.h
@@ -197,6 +197,7 @@ struct CONTENT_EXPORT WebPreferences {
@@ -198,6 +198,7 @@ struct CONTENT_EXPORT WebPreferences {
bool spatial_navigation_enabled;
bool use_solid_color_scrollbars;
bool navigate_on_drag_drop;
@@ -35,10 +35,10 @@ index 361505babff0..341873d000bc 100644
bool record_whole_document;
SavePreviousDocumentResources save_previous_document_resources;
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
index 0f5f1d8e1649..ae5c98646619 100644
index 1d136aa56ff4..23c00d73b8ed 100644
--- content/renderer/render_view_impl.cc
+++ content/renderer/render_view_impl.cc
@@ -1250,6 +1250,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
@@ -1261,6 +1261,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
blink::WebView* web_view,
CompositorDependencies* compositor_deps) {
ApplyWebPreferences(prefs, web_view);

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 02b2c4212767..5a89d17b06a4 100644
index 1a43eba4852b..eccb01ca818e 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -344,6 +344,7 @@ split_static_library("ui") {
@@ -81,31 +81,31 @@ index 45644030eb24..c894209e1530 100644
}
} // namespace settings
diff --git chrome/common/chrome_utility_printing_messages.h chrome/common/chrome_utility_printing_messages.h
index cb6092794c46..2db218d9f140 100644
--- chrome/common/chrome_utility_printing_messages.h
+++ chrome/common/chrome_utility_printing_messages.h
@@ -27,7 +27,6 @@
#define IPC_MESSAGE_START ChromeUtilityPrintingMsgStart
diff --git chrome/utility/printing_handler.cc chrome/utility/printing_handler.cc
index 1eb818639134..4525da919180 100644
--- chrome/utility/printing_handler.cc
+++ chrome/utility/printing_handler.cc
@@ -23,6 +23,7 @@ namespace printing {
// Preview and Cloud Print messages.
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
IPC_ENUM_TRAITS_MAX_VALUE(printing::PdfRenderSettings::Mode,
printing::PdfRenderSettings::Mode::LAST)
@@ -39,6 +38,7 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PdfRenderSettings)
IPC_STRUCT_TRAITS_MEMBER(mode)
IPC_STRUCT_TRAITS_END()
namespace {
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
IPC_STRUCT_TRAITS_BEGIN(printing::PrinterCapsAndDefaults)
IPC_STRUCT_TRAITS_MEMBER(printer_capabilities)
IPC_STRUCT_TRAITS_MEMBER(caps_mime_type)
bool Send(IPC::Message* message) {
return content::UtilityThread::Get()->Send(message);
}
@@ -30,6 +31,7 @@ bool Send(IPC::Message* message) {
void ReleaseProcess() {
content::UtilityThread::Get()->ReleaseProcess();
}
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
} // namespace
diff --git components/printing/common/print_messages.cc components/printing/common/print_messages.cc
index 5ccf87b28860..48e557d84d5e 100644
index ef1e25b11afe..a12e21450a59 100644
--- components/printing/common/print_messages.cc
+++ components/printing/common/print_messages.cc
@@ -125,7 +125,6 @@ void PrintMsg_PrintPages_Params::Reset() {
@@ -129,7 +129,6 @@ void PrintMsg_PrintPages_Params::Reset() {
pages = std::vector<int>();
}
@@ -113,16 +113,16 @@ index 5ccf87b28860..48e557d84d5e 100644
PrintHostMsg_RequestPrintPreview_Params::
PrintHostMsg_RequestPrintPreview_Params()
: is_modifiable(false),
@@ -147,4 +146,3 @@ PrintHostMsg_SetOptionsFromDocument_Params::
@@ -151,4 +150,3 @@ PrintHostMsg_SetOptionsFromDocument_Params::
PrintHostMsg_SetOptionsFromDocument_Params::
~PrintHostMsg_SetOptionsFromDocument_Params() {
}
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h
index 339e63c3294b..75673f2de92f 100644
index 6d02771d018d..cb8608f5b523 100644
--- components/printing/common/print_messages.h
+++ components/printing/common/print_messages.h
@@ -77,7 +77,6 @@ struct PrintMsg_PrintPages_Params {
@@ -79,7 +79,6 @@ struct PrintMsg_PrintPages_Params {
std::vector<int> pages;
};
@@ -130,7 +130,7 @@ index 339e63c3294b..75673f2de92f 100644
struct PrintHostMsg_RequestPrintPreview_Params {
PrintHostMsg_RequestPrintPreview_Params();
~PrintHostMsg_RequestPrintPreview_Params();
@@ -96,7 +95,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params {
@@ -98,7 +97,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params {
printing::DuplexMode duplex;
printing::PageRanges page_ranges;
};
@@ -138,7 +138,7 @@ index 339e63c3294b..75673f2de92f 100644
#endif // INTERNAL_COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
@@ -181,7 +179,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange)
@@ -189,7 +187,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange)
IPC_STRUCT_TRAITS_MEMBER(to)
IPC_STRUCT_TRAITS_END()
@@ -146,7 +146,7 @@ index 339e63c3294b..75673f2de92f 100644
IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params)
IPC_STRUCT_TRAITS_MEMBER(is_modifiable)
IPC_STRUCT_TRAITS_MEMBER(webnode_only)
@@ -202,7 +199,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params)
@@ -210,7 +207,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params)
// Specifies page range to be printed.
IPC_STRUCT_TRAITS_MEMBER(page_ranges)
IPC_STRUCT_TRAITS_END()
@@ -154,7 +154,7 @@ index 339e63c3294b..75673f2de92f 100644
IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins)
IPC_STRUCT_TRAITS_MEMBER(content_width)
@@ -222,7 +218,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params)
@@ -230,7 +226,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params)
IPC_STRUCT_TRAITS_MEMBER(pages)
IPC_STRUCT_TRAITS_END()
@@ -162,15 +162,15 @@ index 339e63c3294b..75673f2de92f 100644
// Parameters to describe a rendered document.
IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params)
// A shared memory handle to metafile data.
@@ -273,7 +268,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params)
@@ -281,7 +276,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params)
// Indicates whether the existing preview data needs to be cleared or not.
IPC_STRUCT_MEMBER(bool, clear_preview_data)
IPC_STRUCT_END()
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Parameters to describe a rendered page.
IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params)
@@ -316,22 +310,20 @@ IPC_STRUCT_END()
IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintDocument_Params)
@@ -321,10 +315,8 @@ IPC_STRUCT_END()
// Messages sent from the browser to the renderer.
@@ -181,21 +181,7 @@ index 339e63c3294b..75673f2de92f 100644
// Tells the RenderFrame to initiate printing or print preview for a particular
// node, depending on which mode the RenderFrame is in.
IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
-#if BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
+#if BUILDFLAG(ENABLE_BASIC_PRINTING)
// Tells the renderer to print the print preview tab's PDF plugin without
// showing the print dialog. (This is the final step in the print preview
// workflow.)
IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview,
base::DictionaryValue /* settings */)
-#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
+#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
// Tells the RenderFrame to switch the CSS to print media type, renders every
@@ -349,13 +341,13 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
@@ -346,13 +338,13 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
// Tells the RenderFrame whether printing is enabled or not.
IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */)
@@ -210,7 +196,7 @@ index 339e63c3294b..75673f2de92f 100644
// Tells the RenderFrame that print preview dialog was closed.
IPC_MESSAGE_ROUTED0(PrintMsg_ClosePrintPreviewDialog)
#endif
@@ -415,7 +407,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten,
@@ -412,7 +404,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten,
int /* page count */)
#endif // defined(OS_ANDROID)
@@ -218,7 +204,7 @@ index 339e63c3294b..75673f2de92f 100644
// Asks the browser to do print preview.
IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview,
PrintHostMsg_RequestPrintPreview_Params /* params */)
@@ -449,7 +440,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
@@ -446,7 +437,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
// The memory handle in this message is already valid in the browser process.
IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting,
PrintHostMsg_DidPreviewDocument_Params /* params */)
@@ -226,7 +212,7 @@ index 339e63c3294b..75673f2de92f 100644
// This is sent when there are invalid printer settings.
IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
@@ -458,7 +448,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
@@ -455,7 +445,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed,
int /* document cookie */)
@@ -234,7 +220,7 @@ index 339e63c3294b..75673f2de92f 100644
// Tell the browser print preview failed.
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed,
int /* document cookie */)
@@ -485,6 +474,5 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
@@ -482,6 +471,5 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
// Notify the browser to set print presets based on source PDF document.
IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
@@ -242,10 +228,10 @@ index 339e63c3294b..75673f2de92f 100644
#endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc
index 663cd7748493..588797775ead 100644
index 86c3b7a291e3..7a645cea6ebe 100644
--- components/printing/renderer/print_render_frame_helper.cc
+++ components/printing/renderer/print_render_frame_helper.cc
@@ -320,7 +320,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
@@ -322,7 +322,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
return plugin && plugin->SupportsPaginatedPrint();
}
@@ -253,7 +239,7 @@ index 663cd7748493..588797775ead 100644
// Returns true if the current destination printer is PRINT_TO_PDF.
bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) {
bool print_to_pdf = false;
@@ -342,7 +341,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame,
@@ -344,7 +343,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame,
}
return frame_has_custom_page_size_style;
}
@@ -261,7 +247,7 @@ index 663cd7748493..588797775ead 100644
#if BUILDFLAG(ENABLE_PRINTING)
// Disable scaling when either:
@@ -399,7 +397,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
@@ -401,7 +399,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
}
#endif
@@ -269,7 +255,7 @@ index 663cd7748493..588797775ead 100644
bool FitToPageEnabled(const base::DictionaryValue& job_settings) {
bool fit_to_paper_size = false;
if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) {
@@ -441,7 +438,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
@@ -443,7 +440,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
}
return blink::kWebPrintScalingOptionFitToPrintableArea;
}
@@ -277,15 +263,15 @@ index 663cd7748493..588797775ead 100644
// Helper function to scale and round an integer value with a double valued
// scaling.
@@ -948,6 +944,7 @@ PrintRenderFrameHelper::PrintRenderFrameHelper(
print_for_preview_(false),
@@ -952,6 +948,7 @@ PrintRenderFrameHelper::PrintRenderFrameHelper(
notify_browser_of_print_failure_(true),
delegate_(std::move(delegate)),
print_node_in_progress_(false),
+ force_print_preview_(false),
is_loading_(false),
is_scripted_preview_delayed_(false),
ipc_nesting_level_(0),
@@ -1009,10 +1006,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1013,10 +1010,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
return;
if (g_is_preview_enabled) {
@@ -296,13 +282,10 @@ index 663cd7748493..588797775ead 100644
} else {
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
auto weak_this = weak_ptr_factory_.GetWeakPtr();
@@ -1044,13 +1039,11 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) {
@@ -1048,10 +1043,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
-#if BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForPrintPreview, OnPrintForPrintPreview)
-#endif
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
IPC_MESSAGE_HANDLER(PrintMsg_InitiatePrintPreview, OnInitiatePrintPreview)
IPC_MESSAGE_HANDLER(PrintMsg_PrintPreview, OnPrintPreview)
@@ -311,23 +294,7 @@ index 663cd7748493..588797775ead 100644
IPC_MESSAGE_HANDLER(PrintMsg_ClosePrintPreviewDialog,
OnClosePrintPreviewDialog)
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -1110,7 +1103,6 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() {
}
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
-#if BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintRenderFrameHelper::OnPrintForPrintPreview(
const base::DictionaryValue& job_settings) {
CHECK_LE(ipc_nesting_level_, 1);
@@ -1170,7 +1162,6 @@ void PrintRenderFrameHelper::OnPrintForPrintPreview(
DidFinishPrinting(FAIL_PRINT);
}
}
-#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintRenderFrameHelper::GetPageSizeAndContentAreaFromPageLayout(
const PageSizeMargins& page_layout_in_points,
@@ -1195,7 +1186,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo(
@@ -1134,7 +1129,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo(
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
}
@@ -335,7 +302,7 @@ index 663cd7748493..588797775ead 100644
void PrintRenderFrameHelper::OnPrintPreview(
const base::DictionaryValue& settings) {
if (ipc_nesting_level_ > 1)
@@ -1387,7 +1377,7 @@ bool PrintRenderFrameHelper::CreatePreviewDocument() {
@@ -1326,7 +1320,7 @@ bool PrintRenderFrameHelper::CreatePreviewDocument() {
return true;
}
@@ -344,7 +311,7 @@ index 663cd7748493..588797775ead 100644
bool PrintRenderFrameHelper::RenderPreviewPage(
int page_number,
const PrintMsg_Print_Params& print_params) {
@@ -1417,7 +1407,7 @@ bool PrintRenderFrameHelper::RenderPreviewPage(
@@ -1356,7 +1350,7 @@ bool PrintRenderFrameHelper::RenderPreviewPage(
}
return PreviewPageRendered(page_number, draft_metafile.get());
}
@@ -353,7 +320,7 @@ index 663cd7748493..588797775ead 100644
bool PrintRenderFrameHelper::FinalizePrintReadyDocument() {
DCHECK(!is_print_ready_metafile_sent_);
@@ -1446,7 +1436,6 @@ bool PrintRenderFrameHelper::FinalizePrintReadyDocument() {
@@ -1385,7 +1379,6 @@ bool PrintRenderFrameHelper::FinalizePrintReadyDocument() {
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
return true;
}
@@ -361,7 +328,7 @@ index 663cd7748493..588797775ead 100644
void PrintRenderFrameHelper::OnPrintingDone(bool success) {
if (ipc_nesting_level_ > 1)
@@ -1461,7 +1450,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) {
@@ -1400,7 +1393,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) {
is_printing_enabled_ = enabled;
}
@@ -369,7 +336,7 @@ index 663cd7748493..588797775ead 100644
void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
if (ipc_nesting_level_ > 1)
return;
@@ -1472,7 +1460,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
@@ -1411,7 +1403,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.IsNull()) {
@@ -379,7 +346,7 @@ index 663cd7748493..588797775ead 100644
return;
}
print_preview_context_.InitWithFrame(frame);
@@ -1481,10 +1471,11 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
@@ -1420,10 +1414,11 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
}
@@ -392,7 +359,7 @@ index 663cd7748493..588797775ead 100644
bool PrintRenderFrameHelper::IsPrintingEnabled() const {
return is_printing_enabled_;
@@ -1506,11 +1497,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1445,11 +1440,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
print_node_in_progress_ = true;
@@ -405,7 +372,7 @@ index 663cd7748493..588797775ead 100644
} else {
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
// Make a copy of the node, in case RenderView::OnContextMenuClosed() resets
@@ -1600,7 +1589,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
@@ -1539,7 +1532,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
}
break;
@@ -413,7 +380,7 @@ index 663cd7748493..588797775ead 100644
case FAIL_PREVIEW:
if (!is_print_ready_metafile_sent_) {
if (notify_browser_of_print_failure_) {
@@ -1617,7 +1605,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
@@ -1556,7 +1548,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
cookie));
print_preview_context_.Failed(false);
break;
@@ -421,7 +388,7 @@ index 663cd7748493..588797775ead 100644
}
prep_frame_view_.reset();
print_pages_params_.reset();
@@ -1798,7 +1785,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
@@ -1727,7 +1718,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
return true;
}
@@ -429,15 +396,15 @@ index 663cd7748493..588797775ead 100644
bool PrintRenderFrameHelper::SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options) {
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
@@ -1905,7 +1891,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings(
print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS);
@@ -1821,7 +1811,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings(
print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS);
return false;
}
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
void PrintRenderFrameHelper::GetPrintSettingsFromUser(
@@ -2058,7 +2043,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToSharedMem(
@@ -1977,7 +1966,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem(
return true;
}
@@ -445,7 +412,7 @@ index 663cd7748493..588797775ead 100644
void PrintRenderFrameHelper::ShowScriptedPrintPreview() {
if (is_scripted_preview_delayed_) {
is_scripted_preview_delayed_ = false;
@@ -2193,7 +2177,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(int page_number,
@@ -2112,7 +2100,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(int page_number,
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
return true;
}
@@ -454,7 +421,7 @@ index 663cd7748493..588797775ead 100644
PrintRenderFrameHelper::PrintPreviewContext::PrintPreviewContext()
: total_page_count_(0),
diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h
index cd174ca65085..bbef96f246ef 100644
index b087b9efe6ca..338710326b17 100644
--- components/printing/renderer/print_render_frame_helper.h
+++ components/printing/renderer/print_render_frame_helper.h
@@ -147,10 +147,8 @@ class PrintRenderFrameHelper
@@ -468,9 +435,9 @@ index cd174ca65085..bbef96f246ef 100644
};
enum PrintPreviewErrorBuckets {
@@ -187,9 +185,9 @@ class PrintRenderFrameHelper
@@ -186,9 +184,9 @@ class PrintRenderFrameHelper
void OnPrintPages();
void OnPrintForSystemDialog();
void OnPrintForPrintPreview(const base::DictionaryValue& job_settings);
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
void OnInitiatePrintPreview(bool has_selection);
@@ -479,7 +446,7 @@ index cd174ca65085..bbef96f246ef 100644
void OnClosePrintPreviewDialog();
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
void OnPrintingDone(bool success);
@@ -204,7 +202,6 @@ class PrintRenderFrameHelper
@@ -203,7 +201,6 @@ class PrintRenderFrameHelper
// Update |ignore_css_margins_| based on settings.
void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings);
@@ -487,7 +454,7 @@ index cd174ca65085..bbef96f246ef 100644
// Prepare frame for creating preview document.
void PrepareFrameForPreviewDocument();
@@ -221,7 +218,6 @@ class PrintRenderFrameHelper
@@ -220,7 +217,6 @@ class PrintRenderFrameHelper
// Finalize the print ready preview document.
bool FinalizePrintReadyDocument();
@@ -495,7 +462,7 @@ index cd174ca65085..bbef96f246ef 100644
// Enable/Disable printing.
void OnSetPrintingEnabled(bool enabled);
@@ -251,7 +247,6 @@ class PrintRenderFrameHelper
@@ -250,7 +246,6 @@ class PrintRenderFrameHelper
const blink::WebNode& node,
int* number_of_pages);
@@ -503,7 +470,7 @@ index cd174ca65085..bbef96f246ef 100644
// Set options for print preset from source PDF document.
bool SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options);
@@ -262,7 +257,6 @@ class PrintRenderFrameHelper
@@ -261,7 +256,6 @@ class PrintRenderFrameHelper
bool UpdatePrintSettings(blink::WebLocalFrame* frame,
const blink::WebNode& node,
const base::DictionaryValue& passed_job_settings);
@@ -527,7 +494,7 @@ index cd174ca65085..bbef96f246ef 100644
void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings);
@@ -526,6 +518,7 @@ class PrintRenderFrameHelper
@@ -523,6 +515,7 @@ class PrintRenderFrameHelper
ScriptingThrottler scripting_throttler_;
bool print_node_in_progress_;

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
index 6f185aef2feb..1c2e0fae7f47 100644
index 4f093cb61d69..60bb7a4f40ea 100644
--- chrome/browser/printing/print_job_worker.cc
+++ chrome/browser/printing/print_job_worker.cc
@@ -129,6 +129,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id,
@@ -140,6 +140,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id,
weak_factory_(this) {
// The object is created in the IO thread.
DCHECK(owner_->RunsTasksInCurrentSequence());

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
index 3adf96eda163..673f4c689fcb 100644
index 5bebf776d70d..7e7eba1be689 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -435,13 +435,6 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(
@@ -434,13 +434,6 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(
selection_controller_client_.reset(
new TouchSelectionControllerClientAura(this));
CreateSelectionController();
@@ -16,7 +16,7 @@ index 3adf96eda163..673f4c689fcb 100644
}
////////////////////////////////////////////////////////////////////////////////
@@ -775,8 +768,10 @@ void RenderWidgetHostViewAura::UpdateBackgroundColorFromRenderer(
@@ -780,8 +773,10 @@ void RenderWidgetHostViewAura::UpdateBackgroundColorFromRenderer(
background_color_ = color;
bool opaque = SkColorGetA(color) == SK_AlphaOPAQUE;
@@ -29,7 +29,7 @@ index 3adf96eda163..673f4c689fcb 100644
}
bool RenderWidgetHostViewAura::IsMouseLocked() {
@@ -1961,6 +1956,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
@@ -1937,6 +1932,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
window_->Init(ui::LAYER_SOLID_COLOR);
window_->layer()->SetColor(background_color_);

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/spellchecker/spellcheck_factory.cc chrome/browser/spellchecker/spellcheck_factory.cc
index 148ec2086d1f..cc7f9ac83481 100644
index f02ff11f8500..640ada6c2ce1 100644
--- chrome/browser/spellchecker/spellcheck_factory.cc
+++ chrome/browser/spellchecker/spellcheck_factory.cc
@@ -18,6 +18,13 @@

View File

@@ -13,8 +13,22 @@ index 71bf90c54ae5..d3308da307d7 100644
appcache_proxies_.push_back(proxy);
}
diff --git content/browser/background_fetch/background_fetch_service_impl.cc content/browser/background_fetch/background_fetch_service_impl.cc
index be53f5115d3d..92f09f04f3a1 100644
--- content/browser/background_fetch/background_fetch_service_impl.cc
+++ content/browser/background_fetch/background_fetch_service_impl.cc
@@ -38,8 +38,7 @@ void BackgroundFetchServiceImpl::Create(
BrowserThread::IO, FROM_HERE,
base::BindOnce(
BackgroundFetchServiceImpl::CreateOnIoThread,
- WrapRefCounted(static_cast<StoragePartitionImpl*>(
- render_process_host->GetStoragePartition())
+ WrapRefCounted(render_process_host->GetStoragePartition()
->GetBackgroundFetchContext()),
origin, std::move(request)));
}
diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc
index bf41a25bcd29..9e6dd89497e7 100644
index 0478c2f4dccf..4faa6c1d4b46 100644
--- content/browser/blob_storage/chrome_blob_storage_context.cc
+++ content/browser/blob_storage/chrome_blob_storage_context.cc
@@ -76,6 +76,11 @@ class BlobHandleImpl : public BlobHandle {
@@ -30,10 +44,10 @@ index bf41a25bcd29..9e6dd89497e7 100644
BrowserContext* context) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
diff --git content/browser/blob_storage/chrome_blob_storage_context.h content/browser/blob_storage/chrome_blob_storage_context.h
index 2412f15c5fb7..3434d129af64 100644
index 8c5b031e1e65..bbe6fa6525a6 100644
--- content/browser/blob_storage/chrome_blob_storage_context.h
+++ content/browser/blob_storage/chrome_blob_storage_context.h
@@ -47,6 +47,8 @@ class CONTENT_EXPORT ChromeBlobStorageContext
@@ -50,6 +50,8 @@ class CONTENT_EXPORT ChromeBlobStorageContext
public:
ChromeBlobStorageContext();
@@ -97,7 +111,7 @@ index 125078b9cb44..b24609a807ba 100644
CHECK(GetUserData(kMojoWasInitialized))
<< "Attempting to destroy a BrowserContext that never called "
diff --git content/browser/devtools/protocol/service_worker_handler.cc content/browser/devtools/protocol/service_worker_handler.cc
index d2478ae31473..5fd30c1cd72c 100644
index 64dff1f030bb..244f62ec40dc 100644
--- content/browser/devtools/protocol/service_worker_handler.cc
+++ content/browser/devtools/protocol/service_worker_handler.cc
@@ -337,8 +337,7 @@ Response ServiceWorkerHandler::DispatchSyncEvent(
@@ -111,12 +125,12 @@ index d2478ae31473..5fd30c1cd72c 100644
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
diff --git content/browser/download/download_manager_impl.cc content/browser/download/download_manager_impl.cc
index 0992aad5fe6c..788d432c48d9 100644
index 11eb1d3b732a..52962a868999 100644
--- content/browser/download/download_manager_impl.cc
+++ content/browser/download/download_manager_impl.cc
@@ -83,9 +83,9 @@ WebContents* GetWebContents(int render_process_id,
return WebContents::FromFrameTreeNodeId(frame_tree_node_id);
}
@@ -73,9 +73,9 @@
namespace content {
namespace {
-StoragePartitionImpl* GetStoragePartition(BrowserContext* context,
- int render_process_id,
@@ -127,7 +141,7 @@ index 0992aad5fe6c..788d432c48d9 100644
DCHECK_CURRENTLY_ON(BrowserThread::UI);
SiteInstance* site_instance = nullptr;
@@ -95,8 +95,7 @@ StoragePartitionImpl* GetStoragePartition(BrowserContext* context,
@@ -85,8 +85,7 @@ StoragePartitionImpl* GetStoragePartition(BrowserContext* context,
if (render_frame_host_)
site_instance = render_frame_host_->GetSiteInstance();
}
@@ -137,52 +151,49 @@ index 0992aad5fe6c..788d432c48d9 100644
}
bool CanRequestURLFromRenderer(int render_process_id, GURL url) {
@@ -987,16 +986,17 @@ void DownloadManagerImpl::BeginDownloadInternal(
@@ -1069,7 +1068,7 @@ void DownloadManagerImpl::BeginDownloadInternal(
if (base::FeatureList::IsEnabled(features::kNetworkService)) {
std::unique_ptr<ResourceRequest> request = CreateResourceRequest(
params.get());
std::unique_ptr<network::ResourceRequest> request =
CreateResourceRequest(params.get());
- StoragePartitionImpl* storage_partition =
+ StoragePartition* storage_partition =
GetStoragePartition(browser_context_, params->render_process_host_id(),
params->render_frame_host_routing_id());
BrowserThread::PostTaskAndReplyWithResult(
@@ -1090,7 +1089,8 @@ void DownloadManagerImpl::BeginDownloadInternal(
BrowserThread::IO, FROM_HERE,
base::BindOnce(
&BeginResourceDownload, std::move(params), std::move(request),
- storage_partition->url_loader_factory_getter(),
- base::WrapRefCounted(storage_partition->GetFileSystemContext()),
- id, weak_factory_.GetWeakPtr()),
+ base::WrapRefCounted(
+ storage_partition->url_loader_factory_getter()),
+ base::WrapRefCounted(storage_partition->GetFileSystemContext()),
+ id, weak_factory_.GetWeakPtr()),
base::WrapRefCounted(storage_partition->GetFileSystemContext()), id,
weak_factory_.GetWeakPtr(), site_url, tab_url, tab_referrer_url),
base::BindOnce(&DownloadManagerImpl::AddUrlDownloadHandler,
weak_factory_.GetWeakPtr()));
} else {
diff --git content/browser/loader/navigation_url_loader_network_service.cc content/browser/loader/navigation_url_loader_network_service.cc
index 70148056059b..599b068dfdea 100644
index d9297fa8365e..38a3fb629a7a 100644
--- content/browser/loader/navigation_url_loader_network_service.cc
+++ content/browser/loader/navigation_url_loader_network_service.cc
@@ -615,11 +615,12 @@ NavigationURLLoaderNetworkService::NavigationURLLoaderNetworkService(
g_next_request_id--;
@@ -868,11 +868,12 @@ NavigationURLLoaderNetworkService::NavigationURLLoaderNetworkService(
.PassInterface();
}
- auto* partition = static_cast<StoragePartitionImpl*>(storage_partition);
+ auto* partition = storage_partition;
DCHECK(!request_controller_);
request_controller_ = std::make_unique<URLLoaderRequestController>(
std::move(initial_handlers), std::move(new_request), resource_context,
- partition->url_loader_factory_getter(), weak_factory_.GetWeakPtr());
- partition->url_loader_factory_getter(), request_info->common_params.url,
+ base::WrapRefCounted(partition->url_loader_factory_getter()),
+ weak_factory_.GetWeakPtr());
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::BindOnce(&URLLoaderRequestController::Start,
+ request_info->common_params.url,
request_info->begin_params->initiator_origin,
request_info->begin_params->suggested_filename,
weak_factory_.GetWeakPtr());
diff --git content/browser/payments/payment_app_provider_impl.cc content/browser/payments/payment_app_provider_impl.cc
index 8816724941ff..6b9a26b7c615 100644
index b9d2670514c0..004939aa055a 100644
--- content/browser/payments/payment_app_provider_impl.cc
+++ content/browser/payments/payment_app_provider_impl.cc
@@ -329,10 +329,11 @@ void StartServiceWorkerForDispatch(BrowserContext* browser_context,
@@ -328,10 +328,11 @@ void StartServiceWorkerForDispatch(BrowserContext* browser_context,
ServiceWorkerStartCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -197,7 +208,7 @@ index 8816724941ff..6b9a26b7c615 100644
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -358,8 +359,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps(
@@ -357,8 +358,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps(
GetAllPaymentAppsCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -209,10 +220,10 @@ index 8816724941ff..6b9a26b7c615 100644
partition->GetPaymentAppContext();
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
index a61b8ab0886e..5be550085df1 100644
index 22c72f3ac929..c12815670521 100644
--- content/browser/renderer_host/render_process_host_impl.cc
+++ content/browser/renderer_host/render_process_host_impl.cc
@@ -500,9 +500,8 @@ class SpareRenderProcessHostManager : public RenderProcessHostObserver {
@@ -497,9 +497,8 @@ class SpareRenderProcessHostManager : public RenderProcessHostObserver {
SpareRenderProcessHostManager() {}
void WarmupSpareRenderProcessHost(BrowserContext* browser_context) {
@@ -224,7 +235,7 @@ index a61b8ab0886e..5be550085df1 100644
if (spare_render_process_host_ &&
matching_browser_context_ == browser_context &&
@@ -641,11 +640,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
@@ -638,11 +637,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
// Gets the correct render process to use for this SiteInstance.
RenderProcessHost* GetProcessHost(SiteInstance* site_instance,
bool is_for_guests_only) {
@@ -240,7 +251,7 @@ index a61b8ab0886e..5be550085df1 100644
// Is this the default storage partition? If it isn't, then just give it its
// own non-shared process.
@@ -1240,7 +1238,7 @@ void RenderProcessHost::SetMaxRendererProcessCount(size_t count) {
@@ -1237,7 +1235,7 @@ void RenderProcessHost::SetMaxRendererProcessCount(size_t count) {
// static
RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
BrowserContext* browser_context,
@@ -249,7 +260,7 @@ index a61b8ab0886e..5be550085df1 100644
SiteInstance* site_instance,
bool is_for_guests_only) {
if (g_render_process_host_factory_) {
@@ -1249,8 +1247,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
@@ -1246,8 +1244,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
}
if (!storage_partition_impl) {
@@ -258,9 +269,9 @@ index a61b8ab0886e..5be550085df1 100644
+ storage_partition_impl =
+ BrowserContext::GetStoragePartition(browser_context, site_instance);
}
return new RenderProcessHostImpl(browser_context, storage_partition_impl,
@@ -1260,7 +1258,7 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
// If we've made a StoragePartition for guests (e.g., for the <webview> tag),
// stash the Site URL on it. This way, when we start a service worker inside
@@ -1269,7 +1267,7 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
// static
RenderProcessHost* RenderProcessHostImpl::CreateOrUseSpareRenderProcessHost(
BrowserContext* browser_context,
@@ -269,7 +280,7 @@ index a61b8ab0886e..5be550085df1 100644
SiteInstance* site_instance,
bool is_for_guests_only) {
RenderProcessHost* render_process_host =
@@ -1280,7 +1278,7 @@ RenderProcessHost* RenderProcessHostImpl::CreateOrUseSpareRenderProcessHost(
@@ -1289,7 +1287,7 @@ RenderProcessHost* RenderProcessHostImpl::CreateOrUseSpareRenderProcessHost(
RenderProcessHostImpl::RenderProcessHostImpl(
BrowserContext* browser_context,
@@ -278,7 +289,7 @@ index a61b8ab0886e..5be550085df1 100644
bool is_for_guests_only)
: fast_shutdown_started_(false),
deleting_soon_(false),
@@ -1316,7 +1314,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
@@ -1322,7 +1320,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
indexed_db_factory_(new IndexedDBDispatcherHost(
id_,
storage_partition_impl_->GetURLRequestContext(),
@@ -288,7 +299,7 @@ index a61b8ab0886e..5be550085df1 100644
ChromeBlobStorageContext::GetFor(browser_context_))),
channel_connected_(false),
sent_render_process_ready_(false),
@@ -1350,7 +1349,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
@@ -1356,7 +1355,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
}
push_messaging_manager_.reset(new PushMessagingManager(
@@ -298,7 +309,7 @@ index a61b8ab0886e..5be550085df1 100644
AddObserver(indexed_db_factory_.get());
@@ -1665,6 +1665,20 @@ void RenderProcessHostImpl::ResetChannelProxy() {
@@ -1671,6 +1671,20 @@ void RenderProcessHostImpl::ResetChannelProxy() {
void RenderProcessHostImpl::CreateMessageFilters() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -319,7 +330,7 @@ index a61b8ab0886e..5be550085df1 100644
AddFilter(new ResourceSchedulerFilter(GetID()));
MediaInternals* media_internals = MediaInternals::GetInstance();
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
@@ -1679,8 +1693,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1685,8 +1699,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
new RenderMessageFilter(
GetID(), GetBrowserContext(), request_context.get(),
widget_helper_.get(), media_internals,
@@ -330,7 +341,7 @@ index a61b8ab0886e..5be550085df1 100644
AddFilter(render_message_filter.get());
render_frame_message_filter_ = new RenderFrameMessageFilter(
@@ -1709,10 +1723,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1715,10 +1729,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
ChromeBlobStorageContext::GetFor(browser_context);
resource_message_filter_ = new ResourceMessageFilter(
@@ -343,19 +354,17 @@ index a61b8ab0886e..5be550085df1 100644
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
AddFilter(resource_message_filter_.get());
@@ -1735,9 +1749,9 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1743,8 +1757,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
}
AddFilter(
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service()));
AddFilter(new AppCacheDispatcherHost(
- storage_partition_impl_->GetAppCacheService(), GetID()));
+ app_cache_service, GetID()));
AddFilter(new DOMStorageMessageFilter(
- AddFilter(new DOMStorageMessageFilter(
- storage_partition_impl_->GetDOMStorageContext()));
+ dom_storage_context));
+ AddFilter(new DOMStorageMessageFilter(dom_storage_context));
#if BUILDFLAG(ENABLE_WEBRTC)
peer_connection_tracker_host_ = new PeerConnectionTrackerHost(
@@ -1765,13 +1779,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID());
@@ -1767,13 +1780,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter =
new CacheStorageDispatcherHost();
@@ -371,7 +380,7 @@ index a61b8ab0886e..5be550085df1 100644
AddFilter(service_worker_filter.get());
#if BUILDFLAG(ENABLE_WEBRTC)
@@ -1783,11 +1796,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1785,11 +1797,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(new TraceMessageFilter(GetID()));
AddFilter(new ResolveProxyMsgHelper(request_context.get()));
@@ -384,11 +393,21 @@ index a61b8ab0886e..5be550085df1 100644
resource_context, service_worker_context, browser_context);
AddFilter(notification_message_filter_.get());
@@ -1931,7 +1940,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
registry->AddInterface(base::BindRepeating(
&AppCacheDispatcherHost::Create,
- base::Unretained(storage_partition_impl_->GetAppCacheService()),
+ base::Unretained(static_cast<ChromeAppCacheService*>(
+ storage_partition_impl_->GetAppCacheService())),
GetID()));
AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create));
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
index b5528d49e678..aaecb9f0b0f7 100644
index f81189990b1f..39afa6c9ecfd 100644
--- content/browser/renderer_host/render_process_host_impl.h
+++ content/browser/renderer_host/render_process_host_impl.h
@@ -84,7 +84,6 @@ class ResourceMessageFilter;
@@ -83,7 +83,6 @@ class ResourceMessageFilter;
class SiteInstance;
class SiteInstanceImpl;
class StoragePartition;
@@ -396,7 +415,7 @@ index b5528d49e678..aaecb9f0b0f7 100644
#if BUILDFLAG(ENABLE_WEBRTC)
class MediaStreamDispatcherHost;
@@ -128,7 +127,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -127,7 +126,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
// legal).
static RenderProcessHost* CreateOrUseSpareRenderProcessHost(
BrowserContext* browser_context,
@@ -405,7 +424,7 @@ index b5528d49e678..aaecb9f0b0f7 100644
SiteInstance* site_instance,
bool is_for_guests_only);
@@ -140,7 +139,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -139,7 +138,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
// null.
static RenderProcessHost* CreateRenderProcessHost(
BrowserContext* browser_context,
@@ -414,7 +433,7 @@ index b5528d49e678..aaecb9f0b0f7 100644
SiteInstance* site_instance,
bool is_for_guests_only);
@@ -422,7 +421,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -420,7 +419,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
// Use CreateRenderProcessHost() instead of calling this constructor
// directly.
RenderProcessHostImpl(BrowserContext* browser_context,
@@ -423,7 +442,7 @@ index b5528d49e678..aaecb9f0b0f7 100644
bool is_for_guests_only);
// Initializes a new IPC::ChannelProxy in |channel_|, which will be connected
@@ -657,10 +656,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -656,10 +655,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
// called.
int instance_id_ = 1;
@@ -437,10 +456,10 @@ index b5528d49e678..aaecb9f0b0f7 100644
// The observers watching our lifetime.
base::ObserverList<RenderProcessHostObserver> observers_;
diff --git content/browser/renderer_interface_binders.cc content/browser/renderer_interface_binders.cc
index 082e5c990dcc..8398a8613b08 100644
index 01ba96322f69..6dde251b3d1b 100644
--- content/browser/renderer_interface_binders.cc
+++ content/browser/renderer_interface_binders.cc
@@ -112,7 +112,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
@@ -133,7 +133,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
parameterized_binder_registry_.AddInterface(
base::Bind([](payments::mojom::PaymentManagerRequest request,
RenderProcessHost* host, const url::Origin& origin) {
@@ -449,7 +468,16 @@ index 082e5c990dcc..8398a8613b08 100644
->GetPaymentAppContext()
->CreatePaymentManager(std::move(request));
}));
@@ -128,9 +128,10 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
@@ -147,7 +147,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
parameterized_binder_registry_.AddInterface(base::BindRepeating(
[](blink::mojom::LockManagerRequest request, RenderProcessHost* host,
const url::Origin& origin) {
- static_cast<StoragePartitionImpl*>(host->GetStoragePartition())
+ host->GetStoragePartition()
->GetLockManager()
->CreateService(std::move(request), origin);
}));
@@ -156,9 +156,10 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
parameterized_binder_registry_.AddInterface(
base::Bind([](blink::mojom::NotificationServiceRequest request,
RenderProcessHost* host, const url::Origin& origin) {
@@ -461,77 +489,43 @@ index 082e5c990dcc..8398a8613b08 100644
+ ->GetPlatformNotificationContext())
+ ->CreateService(host->GetID(), origin, std::move(request));
}));
}
parameterized_binder_registry_.AddInterface(
base::BindRepeating(&BackgroundFetchServiceImpl::Create));
diff --git content/browser/shared_worker/shared_worker_connector_impl.cc content/browser/shared_worker/shared_worker_connector_impl.cc
index 4fb7fcdb85c9..bf0155992715 100644
index 1e95910e7168..45adb88b1e96 100644
--- content/browser/shared_worker/shared_worker_connector_impl.cc
+++ content/browser/shared_worker/shared_worker_connector_impl.cc
@@ -23,20 +23,22 @@ void SharedWorkerConnectorImpl::Create(
RenderProcessHost* host = RenderProcessHost::FromID(process_id);
ResourceContext* resource_context =
host->GetBrowserContext()->GetResourceContext();
- StoragePartitionImpl* storage_partition_impl =
- static_cast<StoragePartitionImpl*>(host->GetStoragePartition());
+ StoragePartition* storage_partition_impl = host->GetStoragePartition();
// TODO(darin): Surely there can be a better way to extract a comparable
// identifier from a StoragePartition instance.
WorkerStoragePartition worker_storage_partition(
storage_partition_impl->GetURLRequestContext(),
storage_partition_impl->GetMediaURLRequestContext(),
- storage_partition_impl->GetAppCacheService(),
+ static_cast<ChromeAppCacheService*>(
+ storage_partition_impl->GetAppCacheService()),
storage_partition_impl->GetQuotaManager(),
storage_partition_impl->GetFileSystemContext(),
storage_partition_impl->GetDatabaseTracker(),
- storage_partition_impl->GetIndexedDBContext(),
- storage_partition_impl->GetServiceWorkerContext());
+ static_cast<IndexedDBContextImpl*>(
+ storage_partition_impl->GetIndexedDBContext()),
+ static_cast<ServiceWorkerContextWrapper*>(
+ storage_partition_impl->GetServiceWorkerContext()));
CreateInternal(process_id, frame_id, resource_context,
worker_storage_partition, std::move(request));
diff --git content/browser/shared_worker/shared_worker_service_impl.cc content/browser/shared_worker/shared_worker_service_impl.cc
index ecf29e7851da..bba93010b3ad 100644
--- content/browser/shared_worker/shared_worker_service_impl.cc
+++ content/browser/shared_worker/shared_worker_service_impl.cc
@@ -63,17 +63,19 @@ bool SharedWorkerServiceImpl::TerminateWorker(
const url::Origin& constructor_origin,
StoragePartition* storage_partition,
ResourceContext* resource_context) {
- StoragePartitionImpl* storage_partition_impl =
- static_cast<StoragePartitionImpl*>(storage_partition);
+ StoragePartition* storage_partition_impl = storage_partition;
WorkerStoragePartitionId partition_id(WorkerStoragePartition(
storage_partition_impl->GetURLRequestContext(),
storage_partition_impl->GetMediaURLRequestContext(),
- storage_partition_impl->GetAppCacheService(),
+ static_cast<ChromeAppCacheService*>(
+ storage_partition_impl->GetAppCacheService()),
storage_partition_impl->GetQuotaManager(),
storage_partition_impl->GetFileSystemContext(),
storage_partition_impl->GetDatabaseTracker(),
- storage_partition_impl->GetIndexedDBContext(),
- storage_partition_impl->GetServiceWorkerContext()));
+ static_cast<IndexedDBContextImpl*>(
+ storage_partition_impl->GetIndexedDBContext()),
+ static_cast<ServiceWorkerContextWrapper*>(
+ storage_partition_impl->GetServiceWorkerContext())));
for (const auto& iter : worker_hosts_) {
SharedWorkerHost* host = iter.second.get();
@@ -34,10 +34,9 @@ void SharedWorkerConnectorImpl::Connect(
mojom::SharedWorkerClientPtr client,
blink::mojom::SharedWorkerCreationContextType creation_context_type,
mojo::ScopedMessagePipeHandle message_port) {
- SharedWorkerServiceImpl* service =
- static_cast<StoragePartitionImpl*>(
- RenderProcessHost::FromID(process_id_)->GetStoragePartition())
- ->GetSharedWorkerService();
+ SharedWorkerServiceImpl* service = static_cast<SharedWorkerServiceImpl*>(
+ RenderProcessHost::FromID(process_id_)->GetStoragePartition()
+ ->GetSharedWorkerService());
service->ConnectToWorker(process_id_, frame_id_, std::move(info),
std::move(client), creation_context_type,
blink::MessagePortChannel(std::move(message_port)));
diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h
index 54818f596e4c..58bd25f9bd24 100644
index 4fb38a200f04..182f14ead806 100644
--- content/browser/storage_partition_impl.h
+++ content/browser/storage_partition_impl.h
@@ -119,13 +119,13 @@ class CONTENT_EXPORT StoragePartitionImpl
@@ -87,7 +87,7 @@ class CONTENT_EXPORT StoragePartitionImpl
storage::FileSystemContext* GetFileSystemContext() override;
storage::DatabaseTracker* GetDatabaseTracker() override;
DOMStorageContextWrapper* GetDOMStorageContext() override;
- LockManager* GetLockManager(); // override; TODO: Add to interface
+ LockManager* GetLockManager() override;
IndexedDBContextImpl* GetIndexedDBContext() override;
CacheStorageContextImpl* GetCacheStorageContext() override;
ServiceWorkerContextWrapper* GetServiceWorkerContext() override;
@@ -124,13 +124,13 @@ class CONTENT_EXPORT StoragePartitionImpl
void ClearBluetoothAllowedDevicesMapForTesting() override;
void SetNetworkFactoryForTesting(
mojom::URLLoaderFactory* test_factory) override;
void FlushNetworkInterfaceForTesting() override;
- BackgroundFetchContext* GetBackgroundFetchContext();
- BackgroundSyncContext* GetBackgroundSyncContext();
- PaymentAppContextImpl* GetPaymentAppContext();
@@ -549,7 +543,7 @@ index 54818f596e4c..58bd25f9bd24 100644
// mojom::StoragePartitionService interface.
void OpenLocalStorage(
@@ -136,18 +136,18 @@ class CONTENT_EXPORT StoragePartitionImpl
@@ -141,18 +141,18 @@ class CONTENT_EXPORT StoragePartitionImpl
const url::Origin& origin,
mojo::InterfaceRequest<mojom::LevelDBWrapper> request) override;
@@ -572,6 +566,20 @@ index 54818f596e4c..58bd25f9bd24 100644
auto& bindings_for_testing() { return bindings_; }
@@ -163,10 +163,11 @@ class CONTENT_EXPORT StoragePartitionImpl
// one must use the "chrome-guest://blahblah" site URL to ensure that the
// service worker stays in this StoragePartition. This is an empty GURL if
// this StoragePartition is not for guests.
- void set_site_for_service_worker(const GURL& site_for_service_worker) {
+ void set_site_for_service_worker(
+ const GURL& site_for_service_worker) override {
site_for_service_worker_ = site_for_service_worker;
}
- const GURL& site_for_service_worker() const {
+ const GURL& site_for_service_worker() const override {
return site_for_service_worker_;
}
diff --git content/browser/streams/stream_context.cc content/browser/streams/stream_context.cc
index 7aafca3aafcd..aac07962f6a5 100644
--- content/browser/streams/stream_context.cc
@@ -601,7 +609,7 @@ index 075ae3e7431e..57fb5fd2c4a8 100644
void InitializeOnIOThread();
diff --git content/browser/webui/web_ui_url_loader_factory.cc content/browser/webui/web_ui_url_loader_factory.cc
index 8996f11d328e..75b658f5a2d2 100644
index 53845bd346ed..e2c023cd688e 100644
--- content/browser/webui/web_ui_url_loader_factory.cc
+++ content/browser/webui/web_ui_url_loader_factory.cc
@@ -20,13 +20,13 @@
@@ -618,8 +626,8 @@ index 8996f11d328e..75b658f5a2d2 100644
+#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/network_service.mojom.h"
@@ -296,9 +296,8 @@ class WebUIURLLoaderFactory : public mojom::URLLoaderFactory,
#include "content/public/common/url_constants.h"
@@ -302,9 +302,8 @@ class WebUIURLLoaderFactory : public network::mojom::URLLoaderFactory,
const std::string& scheme() const { return scheme_; }
private:
@@ -660,18 +668,18 @@ index f75be61ccdef..84f1063fb081 100644
std::map<std::string, service_manager::EmbeddedServiceInfo>;
diff --git content/public/browser/storage_partition.h content/public/browser/storage_partition.h
index fa9a14e82472..7ed0814308aa 100644
index 9bf0a872f380..73ede1ccdedf 100644
--- content/public/browser/storage_partition.h
+++ content/public/browser/storage_partition.h
@@ -14,6 +14,7 @@
@@ -13,6 +13,7 @@
#include "base/files/file_path.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
#include "content/public/common/url_loader_factory.mojom.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
#include "net/cookies/cookie_store.h"
class GURL;
@@ -42,12 +43,20 @@ class DatabaseTracker;
@@ -49,13 +50,22 @@ class DatabaseTracker;
namespace content {
class AppCacheService;
@@ -685,29 +693,38 @@ index fa9a14e82472..7ed0814308aa 100644
class CacheStorageContext;
class DOMStorageContext;
class IndexedDBContext;
+class LockManager;
+class PaymentAppContextImpl;
class PlatformNotificationContext;
class ServiceWorkerContext;
class SharedWorkerService;
+class URLLoaderFactoryGetter;
#if !defined(OS_ANDROID)
class HostZoomLevelContext;
@@ -60,6 +69,11 @@ class NetworkContext;
class URLLoaderFactory;
}
@@ -63,6 +73,10 @@ class HostZoomMap;
class ZoomLevelDelegate;
#endif // !defined(OS_ANDROID)
+namespace mojom {
+class NetworkContext;
+class StoragePartitionService;
+}
+
// Defines what persistent state a child process can access.
//
// The StoragePartition defines the view each child process has of the
@@ -92,6 +106,13 @@ class CONTENT_EXPORT StoragePartition {
virtual ZoomLevelDelegate* GetZoomLevelDelegate() = 0;
#endif // !defined(OS_ANDROID)
virtual PlatformNotificationContext* GetPlatformNotificationContext() = 0;
@@ -88,6 +102,7 @@ class CONTENT_EXPORT StoragePartition {
virtual storage::FileSystemContext* GetFileSystemContext() = 0;
virtual storage::DatabaseTracker* GetDatabaseTracker() = 0;
virtual DOMStorageContext* GetDOMStorageContext() = 0;
+ virtual LockManager* GetLockManager() = 0;
virtual IndexedDBContext* GetIndexedDBContext() = 0;
virtual ServiceWorkerContext* GetServiceWorkerContext() = 0;
virtual SharedWorkerService* GetSharedWorkerService() = 0;
@@ -204,6 +219,25 @@ class CONTENT_EXPORT StoragePartition {
// use only.
virtual void FlushNetworkInterfaceForTesting() = 0;
+ virtual BackgroundFetchContext* GetBackgroundFetchContext() = 0;
+ virtual BackgroundSyncContext* GetBackgroundSyncContext() = 0;
+ virtual PaymentAppContextImpl* GetPaymentAppContext() = 0;
@@ -715,29 +732,26 @@ index fa9a14e82472..7ed0814308aa 100644
+ virtual BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap() = 0;
+ virtual BlobURLLoaderFactory* GetBlobURLLoaderFactory() = 0;
+ virtual BlobRegistryWrapper* GetBlobRegistry() = 0;
enum : uint32_t {
REMOVE_DATA_MASK_APPCACHE = 1 << 0,
@@ -200,6 +221,14 @@ class CONTENT_EXPORT StoragePartition {
virtual void SetNetworkFactoryForTesting(
mojom::URLLoaderFactory* test_factory) = 0;
+
+ virtual URLLoaderFactoryGetter* url_loader_factory_getter() = 0;
+ virtual BrowserContext* browser_context() const = 0;
+
+ // Called by each renderer process once.
+ virtual mojo::BindingId Bind(
+ int process_id,
+ mojo::InterfaceRequest<mojom::StoragePartitionService> request) = 0;
+
+ virtual void set_site_for_service_worker(
+ const GURL& site_for_service_worker) = 0;
+ virtual const GURL& site_for_service_worker() const = 0;
+
protected:
virtual ~StoragePartition() {}
};
diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc
index e4ee15fd49ab..5adc8867d6df 100644
index e1e508e205be..10432c7d833e 100644
--- storage/browser/database/database_tracker.cc
+++ storage/browser/database/database_tracker.cc
@@ -492,7 +492,7 @@ bool DatabaseTracker::LazyInit() {
@@ -491,7 +491,7 @@ bool DatabaseTracker::LazyInit() {
meta_table_.reset(new sql::MetaTable());
is_initialized_ =

View File

@@ -39,10 +39,10 @@ index 0755f2752f1d..0322b8c638e7 100644
virtual void MenuWillShow() {}
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
index cb77d5b27ccf..4abcb5712945 100644
index b5f58764ecb9..37359d823c57 100644
--- ui/gfx/render_text.cc
+++ ui/gfx/render_text.cc
@@ -501,6 +501,14 @@ void RenderText::SetElideBehavior(ElideBehavior elide_behavior) {
@@ -513,6 +513,14 @@ void RenderText::SetElideBehavior(ElideBehavior elide_behavior) {
}
}
@@ -57,7 +57,7 @@ index cb77d5b27ccf..4abcb5712945 100644
void RenderText::SetDisplayRect(const Rect& r) {
if (r != display_rect_) {
display_rect_ = r;
@@ -1448,6 +1456,19 @@ void RenderText::OnTextAttributeChanged() {
@@ -1465,6 +1473,19 @@ void RenderText::OnTextAttributeChanged() {
if (!multiline_ && replace_newline_chars_with_symbols_)
base::ReplaceChars(layout_text_, kNewline, kNewlineSymbol, &layout_text_);
@@ -78,10 +78,10 @@ index cb77d5b27ccf..4abcb5712945 100644
}
diff --git ui/gfx/render_text.h ui/gfx/render_text.h
index 259f39b2825b..5b71cd6c6a46 100644
index 0b8b82a2bc80..f0eba4248c56 100644
--- ui/gfx/render_text.h
+++ ui/gfx/render_text.h
@@ -283,6 +283,10 @@ class GFX_EXPORT RenderText {
@@ -293,6 +293,10 @@ class GFX_EXPORT RenderText {
void SetElideBehavior(ElideBehavior elide_behavior);
ElideBehavior elide_behavior() const { return elide_behavior_; }
@@ -92,7 +92,7 @@ index 259f39b2825b..5b71cd6c6a46 100644
const Rect& display_rect() const { return display_rect_; }
void SetDisplayRect(const Rect& r);
@@ -840,6 +844,8 @@ class GFX_EXPORT RenderText {
@@ -850,6 +854,8 @@ class GFX_EXPORT RenderText {
// Extra spacing placed between glyphs; used for obscured text styling.
int glyph_spacing_ = 0;
@@ -115,7 +115,7 @@ index 8ac475fa752c..ec58c2b28441 100644
static constexpr int kInkDropSmallCornerRadius = 2;
static constexpr int kInkDropLargeCornerRadius = 4;
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
index 57e2b0a910f0..6a17ba24a7d3 100644
index 6fc12bbc6f9b..a82c282a7c31 100644
--- ui/views/controls/button/label_button.cc
+++ ui/views/controls/button/label_button.cc
@@ -188,6 +188,7 @@ gfx::Size LabelButton::CalculatePreferredSize() const {
@@ -126,7 +126,7 @@ index 57e2b0a910f0..6a17ba24a7d3 100644
if (style_ == STYLE_BUTTON) {
// Some text appears wider when rendered normally than when rendered bold.
@@ -400,6 +401,12 @@ std::unique_ptr<views::InkDropHighlight> LabelButton::CreateInkDropHighlight()
@@ -398,6 +399,12 @@ std::unique_ptr<views::InkDropHighlight> LabelButton::CreateInkDropHighlight()
gfx::RectF(image()->GetMirroredBounds()).CenterPoint());
}
@@ -140,10 +140,10 @@ index 57e2b0a910f0..6a17ba24a7d3 100644
const gfx::Size previous_image_size(image_->GetPreferredSize());
UpdateImage();
diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h
index 259c355b1d2d..d86f909d95ed 100644
index b2323dae3d9e..4b9546ca1a61 100644
--- ui/views/controls/button/label_button.h
+++ ui/views/controls/button/label_button.h
@@ -105,6 +105,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
@@ -102,6 +102,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override;
std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override;
@@ -154,10 +154,10 @@ index 259c355b1d2d..d86f909d95ed 100644
ImageView* image() const { return image_; }
Label* label() const;
diff --git ui/views/controls/button/menu_button.cc ui/views/controls/button/menu_button.cc
index 8a823199304a..c1c6d3d8972d 100644
index 536fd0159e28..4c6402a29596 100644
--- ui/views/controls/button/menu_button.cc
+++ ui/views/controls/button/menu_button.cc
@@ -186,7 +186,7 @@ bool MenuButton::IsTriggerableEventType(const ui::Event& event) {
@@ -178,7 +178,7 @@ bool MenuButton::IsTriggerableEventType(const ui::Event& event) {
gfx::Size MenuButton::CalculatePreferredSize() const {
gfx::Size prefsize = LabelButton::CalculatePreferredSize();
if (show_menu_marker_) {
@@ -166,7 +166,7 @@ index 8a823199304a..c1c6d3d8972d 100644
kMenuMarkerPaddingRight,
0);
}
@@ -316,7 +316,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() {
@@ -311,7 +311,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() {
gfx::Size s = size();
if (show_menu_marker_) {
@@ -175,7 +175,7 @@ index 8a823199304a..c1c6d3d8972d 100644
kMenuMarkerPaddingRight);
}
@@ -413,4 +413,10 @@ int MenuButton::GetMaximumScreenXCoordinate() {
@@ -408,4 +408,10 @@ int MenuButton::GetMaximumScreenXCoordinate() {
return monitor_bounds.right() - 1;
}
@@ -187,7 +187,7 @@ index 8a823199304a..c1c6d3d8972d 100644
+
} // namespace views
diff --git ui/views/controls/button/menu_button.h ui/views/controls/button/menu_button.h
index e38200b8a43a..f40b079f82ec 100644
index 8fb11e1cf9cb..bd2951bd948b 100644
--- ui/views/controls/button/menu_button.h
+++ ui/views/controls/button/menu_button.h
@@ -57,6 +57,9 @@ class VIEWS_EXPORT MenuButton : public LabelButton {
@@ -211,7 +211,7 @@ index e38200b8a43a..f40b079f82ec 100644
// The time is used for simulating menu behavior for the menu button; that
// is, if the menu is shown and the button is pressed, we need to close the
diff --git ui/views/controls/label.cc ui/views/controls/label.cc
index df6851e8d212..8f5047f4aec7 100644
index 5fb2a8667c81..f725a0209267 100644
--- ui/views/controls/label.cc
+++ ui/views/controls/label.cc
@@ -25,6 +25,7 @@
@@ -243,7 +243,7 @@ index df6851e8d212..8f5047f4aec7 100644
} // namespace
const char Label::kViewClassName[] = "Label";
@@ -224,6 +239,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
@@ -223,6 +238,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
ResetLayout();
}
@@ -252,21 +252,21 @@ index df6851e8d212..8f5047f4aec7 100644
+ return;
+ is_first_paint_text_ = true;
+ draw_strings_flags_ = flags;
+ render_text_->SetDrawStringsFlags(draw_strings_flags_);
+ full_text_->SetDrawStringsFlags(draw_strings_flags_);
+ ResetLayout();
+}
+
void Label::SetTooltipText(const base::string16& tooltip_text) {
DCHECK(handles_tooltips_);
tooltip_text_ = tooltip_text;
@@ -460,7 +484,19 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText(
@@ -447,7 +471,19 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
render_text->SetFontList(font_list());
render_text->set_shadows(shadows());
render_text->SetCursorEnabled(false);
- render_text->SetText(text);
- render_text->SetText(text());
+
+ if (draw_strings_flags_ != 0) {
+ base::string16 text_str = text;
+ base::string16 text_str = text();
+ gfx::Range range = StripAcceleratorChars(draw_strings_flags_, &text_str);
+ render_text->SetText(text_str);
+ if (range.IsValid()) {
@@ -274,14 +274,14 @@ index df6851e8d212..8f5047f4aec7 100644
+ render_text->ApplyStyle(gfx::UNDERLINE, true, range);
+ }
+ } else {
+ render_text->SetText(text);
+ render_text->SetText(text());
+ }
+
return render_text;
}
render_text->SetMultiline(multi_line());
render_text->SetMaxLines(multi_line() ? max_lines() : 0);
render_text->SetWordWrapBehavior(full_text_->word_wrap_behavior());
diff --git ui/views/controls/label.h ui/views/controls/label.h
index ab6487ee6a60..0b105a658e8f 100644
index 1cee72792720..c212350b706f 100644
--- ui/views/controls/label.h
+++ ui/views/controls/label.h
@@ -151,6 +151,10 @@ class VIEWS_EXPORT Label : public View,
@@ -295,7 +295,7 @@ index ab6487ee6a60..0b105a658e8f 100644
// Sets the tooltip text. Default behavior for a label (single-line) is to
// show the full text if it is wider than its bounds. Calling this overrides
// the default behavior and lets you set a custom tooltip. To revert to
@@ -372,6 +376,7 @@ class VIEWS_EXPORT Label : public View,
@@ -365,6 +369,7 @@ class VIEWS_EXPORT Label : public View,
bool collapse_when_hidden_;
int fixed_width_;
int max_width_;
@@ -552,7 +552,7 @@ index 875ac82283b3..44424b2ce138 100644
// Move the cursor because EnterNotify/LeaveNotify are generated with the
// current mouse position as a result of XGrabPointer()
diff --git ui/views/view.h ui/views/view.h
index da4b110ecec8..f03291dcd330 100644
index f3075731dd61..5cb0d7211560 100644
--- ui/views/view.h
+++ ui/views/view.h
@@ -18,6 +18,7 @@

View File

@@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 34248e7b2ef8..8ed9c3759202 100644
index 6dc8047e8a51..dfe15c9500d5 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -326,6 +326,14 @@ void RenderWidgetHostViewBase::GetScreenInfo(ScreenInfo* screen_info) {
@@ -18,7 +18,7 @@ index 34248e7b2ef8..8ed9c3759202 100644
return renderer_frame_number_;
}
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index aac5858b18d8..652b07955fe8 100644
index 1115afb8a798..905572d2b8f1 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -83,6 +83,7 @@ class BrowserAccessibilityManager;
@@ -29,7 +29,7 @@ index aac5858b18d8..652b07955fe8 100644
class SyntheticGestureTarget;
class TextInputManager;
class TouchSelectionControllerClientManager;
@@ -100,6 +101,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@@ -99,6 +100,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
float current_device_scale_factor() const {
return current_device_scale_factor_;
}
@@ -39,7 +39,7 @@ index aac5858b18d8..652b07955fe8 100644
// Returns the focused RenderWidgetHost inside this |view|'s RWH.
RenderWidgetHostImpl* GetFocusedWidget() const;
@@ -130,6 +134,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@@ -129,6 +133,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
void FocusedNodeTouched(const gfx::Point& location_dips_screen,
bool editable) override;
void GetScreenInfo(ScreenInfo* screen_info) override;
@@ -48,7 +48,7 @@ index aac5858b18d8..652b07955fe8 100644
TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override;
@@ -396,6 +402,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@@ -409,6 +415,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// helps to position the full screen widget on the correct monitor.
virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0;
@@ -61,7 +61,7 @@ index aac5858b18d8..652b07955fe8 100644
// Sets the cursor for this view to the one associated with the specified
// cursor_type.
virtual void UpdateCursor(const WebCursor& cursor) = 0;
@@ -542,6 +554,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@@ -554,6 +566,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
WebContentsAccessibility* web_contents_accessibility_;
@@ -73,7 +73,7 @@ index aac5858b18d8..652b07955fe8 100644
#if defined(USE_AURA)
void OnDidScheduleEmbed(int routing_id,
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 8302a8563d85..7ae0a870071c 100644
index 5a751783f1af..7e71a7227e5f 100644
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -28,6 +28,10 @@
@@ -87,7 +87,7 @@ index 8302a8563d85..7ae0a870071c 100644
#if defined(OS_WIN)
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/public/common/context_menu_params.h"
@@ -857,6 +861,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
@@ -880,6 +884,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
::SetFocus(hwnd);
}
}
@@ -103,10 +103,10 @@ index 8302a8563d85..7ae0a870071c 100644
// TODO(wjmaclean): can host_ ever be null?
if (host_ && set_focus_on_mouse_down_or_key_event_) {
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
index 6aa5a869ddc3..e00559a2958a 100644
index 70e4636903f2..3ada5a504fdb 100644
--- content/public/browser/render_widget_host_view.h
+++ content/public/browser/render_widget_host_view.h
@@ -248,6 +248,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
@@ -251,6 +251,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
// This method returns the ScreenInfo used by the view to render.
virtual void GetScreenInfo(ScreenInfo* screen_info) = 0;
@@ -119,8 +119,8 @@ index 6aa5a869ddc3..e00559a2958a 100644
+ virtual bool HasExternalParent() const = 0;
+
#if defined(OS_MACOSX)
// Return the accelerated widget which hosts the CALayers that draw the
// content of the view in GetNativeView. This may be null.
// Set the view's active state (i.e., tint state of controls).
virtual void SetActive(bool active) = 0;
diff --git ui/views/widget/desktop_aura/desktop_screen_win.cc ui/views/widget/desktop_aura/desktop_screen_win.cc
index f772f64d656e..7d13f9f81b6c 100644
--- ui/views/widget/desktop_aura/desktop_screen_win.cc
@@ -135,7 +135,7 @@ index f772f64d656e..7d13f9f81b6c 100644
return host ? host->GetAcceleratedWidget() : NULL;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 2128b18525f1..66420b860fc1 100644
index 1bf5a5e2ca59..f29f473ceca2 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -84,6 +84,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
@@ -160,7 +160,7 @@ index 2128b18525f1..66420b860fc1 100644
remove_standard_frame_ = params.remove_standard_frame;
has_non_client_view_ = Widget::RequiresNonClientView(params.type);
@@ -832,11 +837,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
@@ -834,11 +839,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
}
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
@@ -194,10 +194,10 @@ index db66147f0e9c..2b9bdfa2ec53 100644
// a reference.
corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 88486500f8d8..b1743e330a3d 100644
index deaf9cbc13cc..57f8c4f44a29 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -147,6 +147,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@@ -143,6 +143,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
use_native_frame_(false),
should_maximize_after_map_(false),
use_argb_visual_(false),
@@ -205,7 +205,7 @@ index 88486500f8d8..b1743e330a3d 100644
drag_drop_client_(NULL),
native_widget_delegate_(native_widget_delegate),
desktop_native_widget_aura_(desktop_native_widget_aura),
@@ -160,6 +161,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@@ -156,6 +157,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
has_window_focus_(false),
has_pointer_focus_(false),
modal_dialog_counter_(0),
@@ -213,7 +213,7 @@ index 88486500f8d8..b1743e330a3d 100644
close_widget_factory_(this),
weak_factory_(this) {}
@@ -195,6 +197,8 @@ std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() {
@@ -191,6 +193,8 @@ std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() {
}
gfx::Rect DesktopWindowTreeHostX11::GetX11RootWindowBounds() const {
@@ -222,7 +222,7 @@ index 88486500f8d8..b1743e330a3d 100644
return bounds_in_pixels_;
}
@@ -506,7 +510,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
@@ -502,7 +506,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
// Actually free our native resources.
if (ui::PlatformEventSource::GetInstance())
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
@@ -232,7 +232,7 @@ index 88486500f8d8..b1743e330a3d 100644
xwindow_ = x11::None;
desktop_native_widget_aura_->OnHostClosed();
@@ -647,6 +652,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
@@ -643,6 +648,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
}
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
@@ -241,7 +241,7 @@ index 88486500f8d8..b1743e330a3d 100644
return ToDIPRect(bounds_in_pixels_);
}
@@ -1243,6 +1250,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
@@ -1250,6 +1257,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
}
gfx::Point DesktopWindowTreeHostX11::GetLocationOnScreenInPixels() const {
@@ -250,7 +250,7 @@ index 88486500f8d8..b1743e330a3d 100644
return bounds_in_pixels_.origin();
}
@@ -1335,7 +1344,6 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1344,7 +1353,6 @@ void DesktopWindowTreeHostX11::InitX11Window(
::Atom window_type;
switch (params.type) {
case Widget::InitParams::TYPE_MENU:
@@ -258,7 +258,7 @@ index 88486500f8d8..b1743e330a3d 100644
window_type = gfx::GetAtom("_NET_WM_WINDOW_TYPE_MENU");
break;
case Widget::InitParams::TYPE_TOOLTIP:
@@ -1391,9 +1399,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1400,9 +1408,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
attribute_mask |= CWBorderPixel;
swa.border_pixel = 0;
@@ -275,7 +275,7 @@ index 88486500f8d8..b1743e330a3d 100644
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
bounds_in_pixels_.height(),
0, // border width
@@ -2010,6 +2024,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
@@ -2006,6 +2020,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
}
break;
}
@@ -287,10 +287,10 @@ index 88486500f8d8..b1743e330a3d 100644
case FocusOut:
OnFocusEvent(xev->type == FocusIn, event->xfocus.mode,
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index fcf87700458c..9aecc0e48939 100644
index 674951e1c90e..bc74be16e94d 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -84,6 +84,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -85,6 +85,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// Disables event listening to make |dialog| modal.
std::unique_ptr<base::Closure> DisableEventListening();
@@ -303,7 +303,7 @@ index fcf87700458c..9aecc0e48939 100644
protected:
// Overridden from DesktopWindowTreeHost:
void Init(aura::Window* content_window,
@@ -301,6 +307,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -303,6 +309,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// The bounds of |xwindow_|.
gfx::Rect bounds_in_pixels_;
@@ -313,7 +313,7 @@ index fcf87700458c..9aecc0e48939 100644
// Whenever the bounds are set, we keep the previous set of bounds around so
// we can have a better chance of getting the real
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
@@ -340,6 +349,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -342,6 +351,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// Whether we used an ARGB visual for our window.
bool use_argb_visual_;
@@ -324,7 +324,7 @@ index fcf87700458c..9aecc0e48939 100644
DesktopDragDropClientAuraX11* drag_drop_client_;
std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
@@ -427,6 +440,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -429,6 +442,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
uint32_t modal_dialog_counter_;
@@ -427,7 +427,7 @@ index 163e4b54b033..58f594db5019 100644
if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index 60c6c0e235ea..7a08a49320a2 100644
index 5906900d721c..9dd0514b8cec 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -2665,8 +2665,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,

View File

@@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index c1ae2a911735..933fb8153ef1 100644
index 3484edd85788..42d731e0882e 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -1783,21 +1783,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1759,21 +1759,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@@ -45,7 +45,7 @@ index c1ae2a911735..933fb8153ef1 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -2349,6 +2358,15 @@ void WebContentsImpl::CreateNewWindow(
@@ -2325,6 +2334,15 @@ void WebContentsImpl::CreateNewWindow(
create_params.renderer_initiated_creation =
main_frame_route_id != MSG_ROUTING_NONE;
@@ -61,7 +61,7 @@ index c1ae2a911735..933fb8153ef1 100644
WebContentsImpl* new_contents = nullptr;
if (!is_guest) {
create_params.context = view_->GetNativeView();
@@ -2378,7 +2396,7 @@ void WebContentsImpl::CreateNewWindow(
@@ -2354,7 +2372,7 @@ void WebContentsImpl::CreateNewWindow(
// TODO(brettw): It seems bogus that we have to call this function on the
// newly created object and give it one of its own member variables.
new_view->CreateViewForWidget(
@@ -70,7 +70,7 @@ index c1ae2a911735..933fb8153ef1 100644
}
// Save the created window associated with the route so we can show it
// later.
@@ -5546,7 +5564,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() {
@@ -5531,7 +5549,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() {
void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager(
RenderViewHost* render_view_host) {
RenderWidgetHostViewBase* rwh_view =
@@ -95,7 +95,7 @@ index 53d56abb35a3..d7b955f42ca5 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index d6252667ed68..83265f9b6b41 100644
index 6e628faf106c..3855673d976b 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -68,9 +68,11 @@ class BrowserPluginGuestDelegate;
@@ -122,10 +122,10 @@ index d6252667ed68..83265f9b6b41 100644
// Creates a new WebContents.
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index 37db677b7438..4f4a8574e47d 100644
index 0ad2e1d835a2..5e3f49cda5fa 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -43,11 +43,13 @@ namespace content {
@@ -44,11 +44,13 @@ namespace content {
class ColorChooser;
class JavaScriptDialogManager;
class RenderFrameHost;
@@ -136,10 +136,10 @@ index 37db677b7438..4f4a8574e47d 100644
class WebContents;
class WebContentsImpl;
+class WebContentsView;
struct ColorSuggestion;
struct ContextMenuParams;
struct DropData;
@@ -308,6 +310,14 @@ class CONTENT_EXPORT WebContentsDelegate {
struct FileChooserParams;
@@ -307,6 +309,14 @@ class CONTENT_EXPORT WebContentsDelegate {
const std::string& partition_id,
SessionStorageNamespace* session_storage_namespace);

View File

@@ -1,11 +1,11 @@
diff --git third_party/WebKit/Source/core/dom/DOMImplementation.cpp third_party/WebKit/Source/core/dom/DOMImplementation.cpp
index 1d861b036458..3b20c991659b 100644
index 8088169f0434..47cf612db044 100644
--- third_party/WebKit/Source/core/dom/DOMImplementation.cpp
+++ third_party/WebKit/Source/core/dom/DOMImplementation.cpp
@@ -242,10 +242,11 @@ Document* DOMImplementation::createDocument(const String& type,
// For that reason, the origin must be retrieved directly from init.url().
@@ -243,10 +243,11 @@ Document* DOMImplementation::createDocument(const String& type,
if (init.GetFrame()->IsMainFrame()) {
scoped_refptr<SecurityOrigin> origin = SecurityOrigin::Create(init.Url());
scoped_refptr<const SecurityOrigin> origin =
SecurityOrigin::Create(init.Url());
- plugin_data = init.GetFrame()->GetPage()->GetPluginData(origin.get());
+ plugin_data = init.GetFrame()->GetPage()->GetPluginData(true,
+ origin.get());
@@ -16,11 +16,31 @@ index 1d861b036458..3b20c991659b 100644
->Tree()
.Top()
.GetSecurityContext()
diff --git third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
index 0fa2449c7f1c..8adf2d575e66 100644
--- third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
+++ third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
@@ -329,6 +329,7 @@ WebDevToolsAgentImpl::Session::Session(
host_ptr_.Bind(std::move(host_ptr_info));
host_ptr_.set_connection_error_handler(WTF::Bind(
&WebDevToolsAgentImpl::Session::Detach, WrapWeakPersistent(this)));
+ Platform::Current()->DevToolsAgentAttached();
}
void WebDevToolsAgentImpl::Session::Trace(blink::Visitor* visitor) {
@@ -347,6 +348,7 @@ void WebDevToolsAgentImpl::Session::Detach() {
io_session_->DeleteSoon();
io_session_ = nullptr;
inspector_session_->Dispose();
+ Platform::Current()->DevToolsAgentDetached();
}
void WebDevToolsAgentImpl::Session::DispatchProtocolMessage(
diff --git third_party/WebKit/Source/core/frame/LocalFrame.cpp third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 123258b23cb2..f00869df94e3 100644
index b76797e978da..a784ce63c21d 100644
--- third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -1046,7 +1046,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
@@ -1084,7 +1084,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
PluginData* LocalFrame::GetPluginData() const {
if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin))
return nullptr;
@@ -30,28 +50,28 @@ index 123258b23cb2..f00869df94e3 100644
}
diff --git third_party/WebKit/Source/core/page/Page.cpp third_party/WebKit/Source/core/page/Page.cpp
index c6071e8ba68e..4304cc95ba2e 100644
index b864a731dc65..7fc8a6c023f1 100644
--- third_party/WebKit/Source/core/page/Page.cpp
+++ third_party/WebKit/Source/core/page/Page.cpp
@@ -129,7 +129,8 @@ Page::Page(PageClients& page_clients)
@@ -148,7 +148,8 @@ Page::Page(PageClients& page_clients)
overscroll_controller_(
OverscrollController::Create(GetVisualViewport(), GetChromeClient())),
main_frame_(nullptr),
- plugin_data_(nullptr),
+ plugin_data_main_frame_(nullptr),
+ plugin_data_sub_frame_(nullptr),
editor_client_(page_clients.editor_client),
use_counter_(page_clients.chrome_client &&
page_clients.chrome_client->IsSVGImageChromeClient()
@@ -303,21 +304,38 @@ void Page::RefreshPlugins() {
? UseCounter::kSVGImageContext
@@ -319,21 +320,40 @@ void Page::RefreshPlugins() {
PluginData::RefreshBrowserSidePluginCache();
}
-PluginData* Page::GetPluginData(SecurityOrigin* main_frame_origin) {
-PluginData* Page::GetPluginData(const SecurityOrigin* main_frame_origin) {
- if (!plugin_data_)
- plugin_data_ = PluginData::Create();
+PluginData* Page::GetPluginData(bool is_main_frame,
+ SecurityOrigin* main_frame_origin) {
+ const SecurityOrigin* main_frame_origin) {
+ if (is_main_frame) {
+ if (!plugin_data_main_frame_)
+ plugin_data_main_frame_ = PluginData::Create();
@@ -61,19 +81,21 @@ index c6071e8ba68e..4304cc95ba2e 100644
- plugin_data_->UpdatePluginList(main_frame_origin);
+ if (!plugin_data_main_frame_->Origin() ||
+ !main_frame_origin->IsSameSchemeHostPort(
+ plugin_data_main_frame_->Origin()))
+ plugin_data_main_frame_->Origin())) {
+ plugin_data_main_frame_->UpdatePluginList(true, main_frame_origin);
- return plugin_data_.Get();
+ }
+
+ return plugin_data_main_frame_.Get();
+ } else {
+ if (!plugin_data_sub_frame_)
+ plugin_data_sub_frame_ = PluginData::Create();
+
- return plugin_data_.Get();
+ if (!plugin_data_sub_frame_->Origin() ||
+ !main_frame_origin->IsSameSchemeHostPort(
+ plugin_data_sub_frame_->Origin()))
+ plugin_data_sub_frame_->Origin())) {
+ plugin_data_sub_frame_->UpdatePluginList(false, main_frame_origin);
+ }
+
+ return plugin_data_sub_frame_.Get();
+ }
@@ -91,7 +113,7 @@ index c6071e8ba68e..4304cc95ba2e 100644
page->NotifyPluginsChanged();
}
}
@@ -675,7 +693,8 @@ void Page::Trace(blink::Visitor* visitor) {
@@ -706,7 +726,8 @@ void Page::Trace(blink::Visitor* visitor) {
visitor->Trace(visual_viewport_);
visitor->Trace(overscroll_controller_);
visitor->Trace(main_frame_);
@@ -102,20 +124,20 @@ index c6071e8ba68e..4304cc95ba2e 100644
visitor->Trace(use_counter_);
visitor->Trace(plugins_changed_observers_);
diff --git third_party/WebKit/Source/core/page/Page.h third_party/WebKit/Source/core/page/Page.h
index 1a02eb31d52a..d7d2c372f0c9 100644
index d32684c1a180..f3d034d358a7 100644
--- third_party/WebKit/Source/core/page/Page.h
+++ third_party/WebKit/Source/core/page/Page.h
@@ -135,7 +135,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
@@ -137,7 +137,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
ViewportDescription GetViewportDescription() const;
// Returns the plugin data associated with |main_frame_origin|.
- PluginData* GetPluginData(SecurityOrigin* main_frame_origin);
- PluginData* GetPluginData(const SecurityOrigin* main_frame_origin);
+ PluginData* GetPluginData(bool is_main_frame,
+ SecurityOrigin* main_frame_origin);
+ const SecurityOrigin* main_frame_origin);
// Refreshes the browser-side plugin cache.
static void RefreshPlugins();
@@ -361,7 +362,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
@@ -353,7 +354,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
// longer needed.
Member<Frame> main_frame_;
@@ -123,10 +145,10 @@ index 1a02eb31d52a..d7d2c372f0c9 100644
+ Member<PluginData> plugin_data_main_frame_;
+ Member<PluginData> plugin_data_sub_frame_;
EditorClient* const editor_client_;
SpellCheckStatus spell_check_status_ = SpellCheckStatus::kAutomatic;
Member<ValidationMessageClient> validation_message_client_;
diff --git third_party/WebKit/Source/platform/plugins/PluginData.cpp third_party/WebKit/Source/platform/plugins/PluginData.cpp
index 385972d2e150..88a8e018b2e2 100644
index cef04c3b20c7..6ab47bb7872a 100644
--- third_party/WebKit/Source/platform/plugins/PluginData.cpp
+++ third_party/WebKit/Source/platform/plugins/PluginData.cpp
@@ -79,16 +79,18 @@ void PluginData::Trace(blink::Visitor* visitor) {
@@ -139,9 +161,9 @@ index 385972d2e150..88a8e018b2e2 100644
&builder);
}
-void PluginData::UpdatePluginList(SecurityOrigin* main_frame_origin) {
-void PluginData::UpdatePluginList(const SecurityOrigin* main_frame_origin) {
+void PluginData::UpdatePluginList(bool is_main_frame,
+ SecurityOrigin* main_frame_origin) {
+ const SecurityOrigin* main_frame_origin) {
ResetPluginData();
main_frame_origin_ = main_frame_origin;
PluginListBuilder builder(&plugins_);
@@ -152,23 +174,24 @@ index 385972d2e150..88a8e018b2e2 100644
for (PluginInfo* plugin_info : plugins_) {
for (MimeClassInfo* mime_class_info : plugin_info->mimes_)
diff --git third_party/WebKit/Source/platform/plugins/PluginData.h third_party/WebKit/Source/platform/plugins/PluginData.h
index c2bdba557a6b..039446cef015 100644
index bdd586bd9621..13efebb33a49 100644
--- third_party/WebKit/Source/platform/plugins/PluginData.h
+++ third_party/WebKit/Source/platform/plugins/PluginData.h
@@ -95,7 +95,7 @@ class PLATFORM_EXPORT PluginData final
@@ -95,7 +95,8 @@ class PLATFORM_EXPORT PluginData final
const HeapVector<Member<PluginInfo>>& Plugins() const { return plugins_; }
const HeapVector<Member<MimeClassInfo>>& Mimes() const { return mimes_; }
const SecurityOrigin* Origin() const { return main_frame_origin_.get(); }
- void UpdatePluginList(SecurityOrigin* main_frame_origin);
+ void UpdatePluginList(bool is_main_frame, SecurityOrigin* main_frame_origin);
- void UpdatePluginList(const SecurityOrigin* main_frame_origin);
+ void UpdatePluginList(bool is_main_frame,
+ const SecurityOrigin* main_frame_origin);
void ResetPluginData();
bool SupportsMimeType(const String& mime_type) const;
diff --git third_party/WebKit/public/platform/Platform.h third_party/WebKit/public/platform/Platform.h
index 09c2e1516512..00f634a16dc5 100644
index cc2a721a6ea3..2a843527f9d7 100644
--- third_party/WebKit/public/platform/Platform.h
+++ third_party/WebKit/public/platform/Platform.h
@@ -377,6 +377,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -376,6 +376,7 @@ class BLINK_PLATFORM_EXPORT Platform {
// satisfy this call. mainFrameOrigin is used by the browser process to
// filter plugins from the plugin list based on content settings.
virtual void GetPluginList(bool refresh,
@@ -176,3 +199,15 @@ index 09c2e1516512..00f634a16dc5 100644
const WebSecurityOrigin& main_frame_origin,
WebPluginListBuilder*) {}
@@ -748,6 +749,11 @@ class BLINK_PLATFORM_EXPORT Platform {
// runs during Chromium's build step).
virtual bool IsTakingV8ContextSnapshot() { return false; }
+ // DevTools ------------------------------------------------------------
+
+ virtual void DevToolsAgentAttached() {}
+ virtual void DevToolsAgentDetached() {}
+
protected:
Platform();
virtual ~Platform();

View File

@@ -0,0 +1,13 @@
diff --git third_party/WebKit/Source/core/input/PointerEventManager.cpp third_party/WebKit/Source/core/input/PointerEventManager.cpp
index 6e0a75cf93c3..403b019db4ee 100644
--- third_party/WebKit/Source/core/input/PointerEventManager.cpp
+++ third_party/WebKit/Source/core/input/PointerEventManager.cpp
@@ -269,7 +269,7 @@ void PointerEventManager::HandlePointerInterruption(
for (auto pointer_event : canceled_pointer_events) {
// If we are sending a pointercancel we have sent the pointerevent to some
// target before.
- DCHECK(node_under_pointer_.Contains(pointer_event->pointerId()));
+ // DCHECK(node_under_pointer_.Contains(pointer_event->pointerId()));
EventTarget* target =
node_under_pointer_.at(pointer_event->pointerId()).target;

View File

@@ -1,8 +1,8 @@
diff --git third_party/WebKit/Source/core/exported/WebViewImpl.cpp third_party/WebKit/Source/core/exported/WebViewImpl.cpp
index b73e62a0420f..b9b463b87031 100644
index d0c5134a2ad6..1434134d4212 100644
--- third_party/WebKit/Source/core/exported/WebViewImpl.cpp
+++ third_party/WebKit/Source/core/exported/WebViewImpl.cpp
@@ -256,8 +256,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@@ -258,8 +258,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
g_should_use_external_popup_menus = use_external_popup_menus;
}
@@ -18,7 +18,7 @@ index b73e62a0420f..b9b463b87031 100644
}
namespace {
@@ -352,6 +357,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
@@ -350,6 +355,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
enable_fake_page_scale_animation_for_testing_(false),
fake_page_scale_animation_page_scale_factor_(0),
fake_page_scale_animation_use_anchor_(false),
@@ -27,7 +27,7 @@ index b73e62a0420f..b9b463b87031 100644
suppress_next_keypress_event_(false),
ime_accept_events_(true),
diff --git third_party/WebKit/Source/core/exported/WebViewImpl.h third_party/WebKit/Source/core/exported/WebViewImpl.h
index bfacefa1cf8b..9361917e0a3b 100644
index 79a702679fec..f50dca632eb4 100644
--- third_party/WebKit/Source/core/exported/WebViewImpl.h
+++ third_party/WebKit/Source/core/exported/WebViewImpl.h
@@ -107,7 +107,8 @@ class CORE_EXPORT WebViewImpl final
@@ -50,10 +50,10 @@ index bfacefa1cf8b..9361917e0a3b 100644
TransformationMatrix device_emulation_transform_;
diff --git third_party/WebKit/Source/core/page/ChromeClientImpl.cpp third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
index 129f3f1cb6c7..4dafa0474923 100644
index 98618289cfab..ec154753a350 100644
--- third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
+++ third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
@@ -777,7 +777,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
@@ -774,7 +774,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
return nullptr;
NotifyPopupOpeningObservers();
@@ -63,10 +63,10 @@ index 129f3f1cb6c7..4dafa0474923 100644
DCHECK(RuntimeEnabledFeatures::PagePopupEnabled());
diff --git third_party/WebKit/public/web/WebView.h third_party/WebKit/public/web/WebView.h
index ccaade785697..61a406fb4ee1 100644
index 8f30d3c30bac..6d156c7837fb 100644
--- third_party/WebKit/public/web/WebView.h
+++ third_party/WebKit/public/web/WebView.h
@@ -361,6 +361,7 @@ class WebView : protected WebWidget {
@@ -360,6 +360,7 @@ class WebView : protected WebWidget {
// Sets whether select popup menus should be rendered by the browser.
BLINK_EXPORT static void SetUseExternalPopupMenus(bool);

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
index ff39e3e2b103..a507deeef179 100644
index e3a222a90f33..24298a7423f1 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
@@ -164,6 +164,10 @@ void ChromeInternalLogSource::Fetch(const SysLogsSourceCallback& callback) {
@@ -164,6 +164,10 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
}
void ChromeInternalLogSource::PopulateSyncLogs(SystemLogsResponse* response) {
@@ -14,10 +14,10 @@ index ff39e3e2b103..a507deeef179 100644
Profile* profile = ProfileManager::GetPrimaryUserProfile();
if (!profile ||
diff --git chrome/browser/ui/webui/net_internals/net_internals_ui.cc chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index c45df62f3d56..78b855d34d73 100644
index 158173bac8eb..26af7ef2e14b 100644
--- chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -553,41 +553,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache(
@@ -552,41 +552,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache(
void NetInternalsMessageHandler::OnGetPrerenderInfo(
const base::ListValue* list) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -64,7 +64,7 @@ index c45df62f3d56..78b855d34d73 100644
}
////////////////////////////////////////////////////////////////////////////////
@@ -667,9 +657,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady(
@@ -666,9 +656,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady(
PrePopulateEventList();
@@ -85,7 +85,7 @@ index c45df62f3d56..78b855d34d73 100644
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetNetInfo(
@@ -1181,7 +1179,8 @@ void NetInternalsMessageHandler::IOThreadImpl::PrePopulateEventList() {
@@ -1180,7 +1178,8 @@ void NetInternalsMessageHandler::IOThreadImpl::PrePopulateEventList() {
std::set<net::URLRequestContext*> contexts;
for (const auto& getter : context_getters_)
contexts.insert(getter->GetURLRequestContext());

View File

@@ -1,8 +1,8 @@
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
index 991b42c3e041..ecdc0aaad9a5 100644
index 094021d39f7e..43182c57d589 100644
--- chrome/app/generated_resources.grd
+++ chrome/app/generated_resources.grd
@@ -4928,7 +4928,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -4921,7 +4921,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
</message>
</if>
<message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy.">

View File

@@ -1,8 +1,8 @@
diff --git services/service_manager/sandbox/win/sandbox_win.cc services/service_manager/sandbox/win/sandbox_win.cc
index b66f6b27b4e4..56f69739320a 100644
index 132a3e4dfd6c..568c0ef70065 100644
--- services/service_manager/sandbox/win/sandbox_win.cc
+++ services/service_manager/sandbox/win/sandbox_win.cc
@@ -757,8 +757,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess(
@@ -758,8 +758,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess(
#endif
// Post-startup mitigations.