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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2637743002: ServiceWorker: remove EmbeddedWorkerMsg_StartWorker (Closed)
Patch Set: Remove SendStartWorker from EWRegistry Created 3 years, 11 months 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 d51fe69dcc6a00e002ab87a5f47d2cd09e2e0ce9..8f8c7b1310f8591c7fae47ac325200fe660377d0 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -364,36 +364,6 @@ void CreateFrameFactory(mojom::FrameFactoryRequest request) {
std::move(request));
}
-void SetupEmbeddedWorkerOnWorkerThread(
- mojom::ServiceWorkerEventDispatcherRequest request) {
- ServiceWorkerContextClient* client =
- ServiceWorkerContextClient::ThreadSpecificInstance();
- // It is possible for client to be null if for some reason the worker died
- // before this call made it to the worker thread. In that case just do
- // nothing and let mojo close the connection.
- if (!client)
- return;
- client->BindEventDispatcher(std::move(request));
-}
-
-class EmbeddedWorkerSetupImpl : public mojom::EmbeddedWorkerSetup {
- public:
- EmbeddedWorkerSetupImpl() = default;
-
- void AttachServiceWorkerEventDispatcher(
- int32_t thread_id,
- mojom::ServiceWorkerEventDispatcherRequest request) override {
- WorkerThreadRegistry::Instance()->GetTaskRunnerFor(thread_id)->PostTask(
- FROM_HERE,
- base::Bind(&SetupEmbeddedWorkerOnWorkerThread, base::Passed(&request)));
- }
-};
-
-void CreateEmbeddedWorkerSetup(mojom::EmbeddedWorkerSetupRequest request) {
- mojo::MakeStrongBinding(base::MakeUnique<EmbeddedWorkerSetupImpl>(),
- std::move(request));
-}
-
scoped_refptr<ui::ContextProviderCommandBuffer> CreateOffscreenContext(
scoped_refptr<gpu::GpuChannelHost> gpu_channel_host,
const gpu::SharedMemoryLimits& limits,
@@ -906,7 +876,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())));

Powered by Google App Engine
This is Rietveld 408576698