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

Unified Diff: content/renderer/service_worker/service_worker_context_client.cc

Issue 1221503003: Add a mojo ServiceRegistry to embedded workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment to BindServiceRegistry Created 5 years, 5 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
« no previous file with comments | « content/renderer/service_worker/service_worker_context_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/service_worker/service_worker_context_client.cc
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
index 3dc5852db3e5365fa87660bdb176733fd58c959e..85b79ac8fae5a9277babc0c3386a9399f79e8f2d 100644
--- a/content/renderer/service_worker/service_worker_context_client.cc
+++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -26,6 +26,7 @@
#include "content/child/worker_task_runner.h"
#include "content/common/devtools_messages.h"
#include "content/common/message_port_messages.h"
+#include "content/common/mojo/service_registry_impl.h"
#include "content/common/service_worker/embedded_worker_messages.h"
#include "content/common/service_worker/service_worker_messages.h"
#include "content/public/common/referrer.h"
@@ -198,6 +199,8 @@ struct ServiceWorkerContextClient::WorkerContextData {
// Pending callbacks for ClaimClients().
ClaimClientsCallbacksMap claim_clients_callbacks;
+ ServiceRegistryImpl service_registry;
+
base::ThreadChecker thread_checker;
base::WeakPtrFactory<ServiceWorkerContextClient> weak_factory;
};
@@ -271,6 +274,13 @@ void ServiceWorkerContextClient::OnMessageReceived(
DCHECK(handled);
}
+void ServiceWorkerContextClient::BindServiceRegistry(
+ mojo::InterfaceRequest<mojo::ServiceProvider> services,
+ mojo::ServiceProviderPtr exposed_services) {
+ context_->service_registry.Bind(services.Pass());
+ context_->service_registry.BindRemoteServiceProvider(exposed_services.Pass());
+}
+
blink::WebURL ServiceWorkerContextClient::scope() const {
return service_worker_scope_;
}
« no previous file with comments | « content/renderer/service_worker/service_worker_context_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698