Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(792)

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2606593002: [ServiceWorker] Associate interfaces.
Patch Set: Fix unit tests Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 5f63dba0b6b204fb236b97e2e8e27d081355c1a7..56aa33dec01c48e40beaba17edd47af580aca0ef 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -134,6 +134,7 @@
#include "media/media_features.h"
#include "media/renderers/gpu_video_accelerator_factories.h"
#include "mojo/common/common_type_converters.h"
+#include "mojo/public/cpp/bindings/strong_associated_binding.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "net/base/net_errors.h"
#include "net/base/port_util.h"
@@ -389,9 +390,10 @@ class EmbeddedWorkerSetupImpl : public mojom::EmbeddedWorkerSetup {
}
};
-void CreateEmbeddedWorkerSetup(mojom::EmbeddedWorkerSetupRequest request) {
- mojo::MakeStrongBinding(base::MakeUnique<EmbeddedWorkerSetupImpl>(),
- std::move(request));
+void CreateEmbeddedWorkerSetup(
+ mojom::EmbeddedWorkerSetupAssociatedRequest request) {
+ mojo::MakeStrongAssociatedBinding(base::MakeUnique<EmbeddedWorkerSetupImpl>(),
+ std::move(request));
}
scoped_refptr<ui::ContextProviderCommandBuffer> CreateOffscreenContext(
@@ -750,6 +752,12 @@ void RenderThreadImpl::Init(
base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest,
base::Unretained(this)));
+ GetAssociatedInterfaceRegistry()->AddInterface(
+ base::Bind(&CreateEmbeddedWorkerSetup));
+ GetAssociatedInterfaceRegistry()->AddInterface(
+ base::Bind(&EmbeddedWorkerInstanceClientImpl::Create,
+ base::Unretained(embedded_worker_dispatcher_.get())));
+
InitSkiaEventTracer();
base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr);
@@ -906,10 +914,6 @@ void RenderThreadImpl::Init(
GetInterfaceRegistry());
GetInterfaceRegistry()->AddInterface(base::Bind(&CreateFrameFactory));
- GetInterfaceRegistry()->AddInterface(base::Bind(&CreateEmbeddedWorkerSetup));
- GetInterfaceRegistry()->AddInterface(
- base::Bind(&EmbeddedWorkerInstanceClientImpl::Create,
- base::Unretained(embedded_worker_dispatcher_.get())));
GetRemoteInterfaces()->GetInterface(
mojo::MakeRequest(&storage_partition_service_));

Powered by Google App Engine
This is Rietveld 408576698