mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 1ae106db (#414607)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc
|
||||
index 18eb9fc..002feea 100644
|
||||
index 41f74ae..daca31a7 100644
|
||||
--- content/browser/appcache/appcache_internals_ui.cc
|
||||
+++ content/browser/appcache/appcache_internals_ui.cc
|
||||
@@ -368,8 +368,8 @@ void AppCacheInternalsUI::CreateProxyForPartition(
|
||||
@@ -369,8 +369,8 @@ void AppCacheInternalsUI::CreateProxyForPartition(
|
||||
StoragePartition* storage_partition) {
|
||||
scoped_refptr<Proxy> proxy =
|
||||
new Proxy(weak_ptr_factory_.GetWeakPtr(), storage_partition->GetPath());
|
||||
@@ -30,19 +30,19 @@ index 533d3f1..f0fc700 100644
|
||||
BrowserContext* context) {
|
||||
if (!context->GetUserData(kBlobStorageContextKeyName)) {
|
||||
diff --git content/browser/blob_storage/chrome_blob_storage_context.h content/browser/blob_storage/chrome_blob_storage_context.h
|
||||
index bd02cb1..92d1580 100644
|
||||
index bd02cb1..074e77f 100644
|
||||
--- content/browser/blob_storage/chrome_blob_storage_context.h
|
||||
+++ content/browser/blob_storage/chrome_blob_storage_context.h
|
||||
@@ -41,6 +41,7 @@ class CONTENT_EXPORT ChromeBlobStorageContext
|
||||
public:
|
||||
ChromeBlobStorageContext();
|
||||
|
||||
+ CONTENT_EXPORT static const void* GetUserDataKey();
|
||||
+ static const void* GetUserDataKey();
|
||||
static ChromeBlobStorageContext* GetFor(
|
||||
BrowserContext* browser_context);
|
||||
|
||||
diff --git content/browser/browser_context.cc content/browser/browser_context.cc
|
||||
index 729df89..992c2bc 100644
|
||||
index 6ca86e7..cf081e4 100644
|
||||
--- content/browser/browser_context.cc
|
||||
+++ content/browser/browser_context.cc
|
||||
@@ -113,7 +113,14 @@ StoragePartition* GetStoragePartitionFromConfig(
|
||||
@@ -61,8 +61,8 @@ index 729df89..992c2bc 100644
|
||||
}
|
||||
|
||||
void SaveSessionStateOnIOThread(
|
||||
@@ -481,6 +488,11 @@ shell::Connector* BrowserContext::GetShellConnectorFor(
|
||||
return connection_holder->shell_connection()->GetConnector();
|
||||
@@ -486,6 +493,11 @@ MojoShellConnection* BrowserContext::GetMojoShellConnectionFor(
|
||||
return connection_holder ? connection_holder->shell_connection() : nullptr;
|
||||
}
|
||||
|
||||
+// static
|
||||
@@ -74,7 +74,7 @@ index 729df89..992c2bc 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 b9f528f..d385da4 100644
|
||||
index 127b0c0..9dce5af 100644
|
||||
--- content/browser/devtools/protocol/service_worker_handler.cc
|
||||
+++ content/browser/devtools/protocol/service_worker_handler.cc
|
||||
@@ -523,10 +523,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent(
|
||||
@@ -91,10 +91,10 @@ index b9f528f..d385da4 100644
|
||||
|
||||
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
|
||||
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
|
||||
index f427078..e76cc58 100644
|
||||
index 7d69ab0..91d968a 100644
|
||||
--- content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -543,7 +543,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() {
|
||||
@@ -653,7 +653,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() {
|
||||
|
||||
RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
BrowserContext* browser_context,
|
||||
@@ -103,7 +103,7 @@ index f427078..e76cc58 100644
|
||||
bool is_for_guests_only)
|
||||
: fast_shutdown_started_(false),
|
||||
deleting_soon_(false),
|
||||
@@ -866,6 +866,22 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
|
||||
@@ -978,6 +978,22 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
|
||||
|
||||
void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
@@ -125,32 +125,31 @@ index f427078..e76cc58 100644
|
||||
+
|
||||
AddFilter(new ResourceSchedulerFilter(GetID()));
|
||||
MediaInternals* media_internals = MediaInternals::GetInstance();
|
||||
media::AudioManager* audio_manager =
|
||||
@@ -882,8 +898,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
|
||||
@@ -992,8 +1008,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
new RenderMessageFilter(
|
||||
GetID(), GetBrowserContext(), request_context.get(),
|
||||
widget_helper_.get(), audio_manager, media_internals,
|
||||
widget_helper_.get(), media_internals,
|
||||
- storage_partition_impl_->GetDOMStorageContext(),
|
||||
- storage_partition_impl_->GetCacheStorageContext()));
|
||||
+ dom_storage_context,
|
||||
+ cache_storage_context));
|
||||
AddFilter(render_message_filter.get());
|
||||
AddFilter(new RenderFrameMessageFilter(
|
||||
GetID(),
|
||||
@@ -911,10 +927,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
|
||||
ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter(
|
||||
render_frame_message_filter_ = new RenderFrameMessageFilter(
|
||||
@@ -1024,9 +1040,9 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
|
||||
resource_message_filter_ = new ResourceMessageFilter(
|
||||
GetID(), PROCESS_TYPE_RENDERER,
|
||||
- storage_partition_impl_->GetAppCacheService(),
|
||||
+ app_cache_service,
|
||||
blob_storage_context.get(),
|
||||
- storage_partition_impl_->GetAppCacheService(), blob_storage_context.get(),
|
||||
+ app_cache_service, blob_storage_context.get(),
|
||||
storage_partition_impl_->GetFileSystemContext(),
|
||||
- storage_partition_impl_->GetServiceWorkerContext(),
|
||||
+ service_worker_context,
|
||||
storage_partition_impl_->GetHostZoomLevelContext(),
|
||||
get_contexts_callback);
|
||||
|
||||
@@ -936,14 +952,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1051,14 +1067,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
AddFilter(
|
||||
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager()));
|
||||
AddFilter(new VideoCaptureHost(media_stream_manager));
|
||||
@@ -168,7 +167,7 @@ index f427078..e76cc58 100644
|
||||
blob_storage_context.get()));
|
||||
|
||||
#if defined(ENABLE_WEBRTC)
|
||||
@@ -1002,14 +1016,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1110,14 +1124,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
|
||||
scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter =
|
||||
new CacheStorageDispatcherHost();
|
||||
@@ -185,7 +184,7 @@ index f427078..e76cc58 100644
|
||||
AddFilter(service_worker_filter.get());
|
||||
|
||||
AddFilter(new SharedWorkerMessageFilter(
|
||||
@@ -1017,12 +1030,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1125,12 +1138,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
WorkerStoragePartition(
|
||||
storage_partition_impl_->GetURLRequestContext(),
|
||||
storage_partition_impl_->GetMediaURLRequestContext(),
|
||||
@@ -201,16 +200,20 @@ index f427078..e76cc58 100644
|
||||
message_port_message_filter_.get()));
|
||||
|
||||
#if defined(ENABLE_WEBRTC)
|
||||
@@ -1038,7 +1051,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1145,11 +1158,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
GetID(), storage_partition_impl_->GetQuotaManager(),
|
||||
GetContentClient()->browser()->CreateQuotaPermissionContext()));
|
||||
|
||||
- scoped_refptr<ServiceWorkerContextWrapper> service_worker_context(
|
||||
- static_cast<ServiceWorkerContextWrapper*>(
|
||||
- storage_partition_impl_->GetServiceWorkerContext()));
|
||||
notification_message_filter_ = new NotificationMessageFilter(
|
||||
- GetID(), storage_partition_impl_->GetPlatformNotificationContext(),
|
||||
+ GetID(), platform_notification_context,
|
||||
resource_context, browser_context);
|
||||
resource_context, service_worker_context, browser_context);
|
||||
AddFilter(notification_message_filter_.get());
|
||||
|
||||
@@ -1047,13 +1060,18 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1158,7 +1168,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
AddFilter(new HistogramMessageFilter());
|
||||
AddFilter(new MemoryMessageFilter(this));
|
||||
AddFilter(new PushMessagingMessageFilter(
|
||||
@@ -219,40 +222,41 @@ index f427078..e76cc58 100644
|
||||
#if defined(OS_ANDROID)
|
||||
AddFilter(new ScreenOrientationMessageFilterAndroid());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1167,6 +1177,11 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
std::unique_ptr<shell::InterfaceRegistry> registry(
|
||||
new shell::InterfaceRegistry);
|
||||
+ // Cast to the derived type from StoragePartitionImpl.
|
||||
+ auto platform_notification_context =
|
||||
+ static_cast<PlatformNotificationContextImpl*>(
|
||||
+ storage_partition_impl_->GetPlatformNotificationContext());
|
||||
+
|
||||
#if !defined(OS_ANDROID)
|
||||
GetInterfaceRegistry()->AddInterface(
|
||||
base::Bind(&device::BatteryMonitorImpl::Create));
|
||||
@@ -1076,8 +1094,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
|
||||
GetInterfaceRegistry()->AddInterface(base::Bind(
|
||||
&PlatformNotificationContextImpl::CreateService,
|
||||
- base::Unretained(
|
||||
- storage_partition_impl_->GetPlatformNotificationContext()), GetID()));
|
||||
+ base::Unretained(platform_notification_context), GetID()));
|
||||
|
||||
GetInterfaceRegistry()->AddInterface(
|
||||
base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService,
|
||||
#if defined(OS_ANDROID)
|
||||
interface_registry_android_ =
|
||||
InterfaceRegistryAndroid::Create(registry.get());
|
||||
@@ -1194,8 +1209,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
AddUIThreadInterface(
|
||||
registry.get(),
|
||||
base::Bind(&PlatformNotificationContextImpl::CreateService,
|
||||
- base::Unretained(
|
||||
- storage_partition_impl_->GetPlatformNotificationContext()),
|
||||
+ base::Unretained(platform_notification_context),
|
||||
GetID()));
|
||||
AddUIThreadInterface(
|
||||
registry.get(),
|
||||
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
|
||||
index c3aa818..e64cd43 100644
|
||||
index 7fb91a6..503e6ba 100644
|
||||
--- content/browser/renderer_host/render_process_host_impl.h
|
||||
+++ content/browser/renderer_host/render_process_host_impl.h
|
||||
@@ -66,7 +66,6 @@ class RenderWidgetHost;
|
||||
class RenderWidgetHostImpl;
|
||||
@@ -75,7 +75,6 @@ class RenderWidgetHostImpl;
|
||||
class RenderWidgetHostViewFrameSubscriber;
|
||||
class ResourceMessageFilter;
|
||||
class StoragePartition;
|
||||
-class StoragePartitionImpl;
|
||||
|
||||
namespace mojom {
|
||||
class StoragePartitionService;
|
||||
@@ -100,7 +99,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
@@ -109,7 +108,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
public ui::GpuSwitchingObserver {
|
||||
public:
|
||||
RenderProcessHostImpl(BrowserContext* browser_context,
|
||||
@@ -261,7 +265,7 @@ index c3aa818..e64cd43 100644
|
||||
bool is_for_guests_only);
|
||||
~RenderProcessHostImpl() override;
|
||||
|
||||
@@ -420,7 +419,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
@@ -468,7 +467,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
BrowserContext* browser_context_;
|
||||
|
||||
// Owned by |browser_context_|.
|
||||
@@ -270,11 +274,27 @@ index c3aa818..e64cd43 100644
|
||||
|
||||
// The observers watching our lifetime.
|
||||
base::ObserverList<RenderProcessHostObserver> observers_;
|
||||
diff --git content/browser/site_instance_impl.cc content/browser/site_instance_impl.cc
|
||||
index 8978640..a1e4cdd 100644
|
||||
--- content/browser/site_instance_impl.cc
|
||||
+++ content/browser/site_instance_impl.cc
|
||||
@@ -116,9 +116,8 @@ RenderProcessHost* SiteInstanceImpl::GetProcess() {
|
||||
process_ = g_render_process_host_factory_->CreateRenderProcessHost(
|
||||
browser_context, this);
|
||||
} else {
|
||||
- StoragePartitionImpl* partition =
|
||||
- static_cast<StoragePartitionImpl*>(
|
||||
- BrowserContext::GetStoragePartition(browser_context, this));
|
||||
+ StoragePartition* partition =
|
||||
+ BrowserContext::GetStoragePartition(browser_context, this);
|
||||
process_ = new RenderProcessHostImpl(browser_context,
|
||||
partition,
|
||||
site_.SchemeIs(kGuestScheme));
|
||||
diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h
|
||||
index 49b8d14..7a7d3da 100644
|
||||
index 584f2db..551e350 100644
|
||||
--- content/browser/storage_partition_impl.h
|
||||
+++ content/browser/storage_partition_impl.h
|
||||
@@ -22,9 +22,7 @@
|
||||
@@ -24,9 +24,7 @@
|
||||
#include "content/browser/notifications/platform_notification_context_impl.h"
|
||||
#include "content/browser/service_worker/service_worker_context_wrapper.h"
|
||||
#include "content/common/content_export.h"
|
||||
@@ -284,20 +304,19 @@ index 49b8d14..7a7d3da 100644
|
||||
#include "net/cookies/cookie_store.h"
|
||||
#include "storage/browser/quota/special_storage_policy.h"
|
||||
|
||||
@@ -67,9 +65,9 @@ class CONTENT_EXPORT StoragePartitionImpl
|
||||
@@ -72,9 +70,8 @@ class CONTENT_EXPORT StoragePartitionImpl
|
||||
HostZoomLevelContext* GetHostZoomLevelContext() override;
|
||||
ZoomLevelDelegate* GetZoomLevelDelegate() override;
|
||||
PlatformNotificationContextImpl* GetPlatformNotificationContext() override;
|
||||
-
|
||||
- BackgroundSyncContext* GetBackgroundSyncContext();
|
||||
- webmessaging::BroadcastChannelProvider* GetBroadcastChannelProvider();
|
||||
- BroadcastChannelProvider* GetBroadcastChannelProvider();
|
||||
+ BackgroundSyncContext* GetBackgroundSyncContext() override;
|
||||
+ webmessaging::BroadcastChannelProvider* GetBroadcastChannelProvider()
|
||||
+ override;
|
||||
+ BroadcastChannelProvider* GetBroadcastChannelProvider() override;
|
||||
|
||||
// mojom::StoragePartitionService interface.
|
||||
void OpenLocalStorage(
|
||||
@@ -104,7 +102,8 @@ class CONTENT_EXPORT StoragePartitionImpl
|
||||
@@ -109,7 +106,8 @@ class CONTENT_EXPORT StoragePartitionImpl
|
||||
BrowserContext* browser_context() const;
|
||||
|
||||
// Called by each renderer process once.
|
||||
@@ -336,19 +355,19 @@ index 075ae3e..57fb5fd 100644
|
||||
|
||||
void InitializeOnIOThread();
|
||||
diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h
|
||||
index 05f8086..825ee9d 100644
|
||||
index 15be1d2..70a2816 100644
|
||||
--- content/public/browser/browser_context.h
|
||||
+++ content/public/browser/browser_context.h
|
||||
@@ -167,6 +167,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
|
||||
static shell::Connector* GetShellConnectorFor(
|
||||
@@ -170,6 +170,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
|
||||
static MojoShellConnection* GetMojoShellConnectionFor(
|
||||
BrowserContext* browser_context);
|
||||
|
||||
+ static const void* GetStoragePartitionMapUserDataKey();
|
||||
+
|
||||
~BrowserContext() override;
|
||||
|
||||
// Creates a delegate to initialize a HostZoomMap and persist its information.
|
||||
@@ -234,6 +236,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
|
||||
// Shuts down the storage partitions associated to this browser context.
|
||||
@@ -244,6 +246,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
|
||||
CreateMediaRequestContextForStoragePartition(
|
||||
const base::FilePath& partition_path,
|
||||
bool in_memory) = 0;
|
||||
@@ -364,7 +383,7 @@ index 05f8086..825ee9d 100644
|
||||
|
||||
} // namespace content
|
||||
diff --git content/public/browser/storage_partition.h content/public/browser/storage_partition.h
|
||||
index 909b370..b1ffd2a 100644
|
||||
index 909b370..8c6f09d 100644
|
||||
--- content/public/browser/storage_partition.h
|
||||
+++ content/public/browser/storage_partition.h
|
||||
@@ -13,6 +13,8 @@
|
||||
@@ -376,32 +395,25 @@ index 909b370..b1ffd2a 100644
|
||||
#include "net/cookies/cookie_store.h"
|
||||
|
||||
class GURL;
|
||||
@@ -38,9 +40,14 @@ namespace storage {
|
||||
class DatabaseTracker;
|
||||
}
|
||||
|
||||
+namespace webmessaging {
|
||||
+class BroadcastChannelProvider;
|
||||
+}
|
||||
+
|
||||
@@ -41,6 +43,8 @@ class DatabaseTracker;
|
||||
namespace content {
|
||||
|
||||
class AppCacheService;
|
||||
+class BackgroundSyncContext;
|
||||
+class BroadcastChannelProvider;
|
||||
class BrowserContext;
|
||||
class CacheStorageContext;
|
||||
class DOMStorageContext;
|
||||
@@ -74,6 +81,9 @@ class CONTENT_EXPORT StoragePartition {
|
||||
@@ -74,6 +78,8 @@ class CONTENT_EXPORT StoragePartition {
|
||||
virtual HostZoomLevelContext* GetHostZoomLevelContext() = 0;
|
||||
virtual ZoomLevelDelegate* GetZoomLevelDelegate() = 0;
|
||||
virtual PlatformNotificationContext* GetPlatformNotificationContext() = 0;
|
||||
+ virtual BackgroundSyncContext* GetBackgroundSyncContext() = 0;
|
||||
+ virtual webmessaging::BroadcastChannelProvider*
|
||||
+ GetBroadcastChannelProvider() = 0;
|
||||
+ virtual BroadcastChannelProvider* GetBroadcastChannelProvider() = 0;
|
||||
|
||||
enum : uint32_t {
|
||||
REMOVE_DATA_MASK_APPCACHE = 1 << 0,
|
||||
@@ -166,6 +176,10 @@ class CONTENT_EXPORT StoragePartition {
|
||||
@@ -166,6 +172,10 @@ class CONTENT_EXPORT StoragePartition {
|
||||
// unwritten data has been written out to the filesystem.
|
||||
virtual void Flush() = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user