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

Unified Diff: content/browser/service_worker/embedded_worker_instance.h

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 | « no previous file | content/browser/service_worker/embedded_worker_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/embedded_worker_instance.h
diff --git a/content/browser/service_worker/embedded_worker_instance.h b/content/browser/service_worker/embedded_worker_instance.h
index f0f34314edd537b471a438ff7cbd874b18d12f16..5993a40c93fd20fdf5aa85f8c356ab40596029dc 100644
--- a/content/browser/service_worker/embedded_worker_instance.h
+++ b/content/browser/service_worker/embedded_worker_instance.h
@@ -37,6 +37,8 @@ namespace content {
class EmbeddedWorkerRegistry;
class MessagePortMessageFilter;
+class ServiceRegistry;
+class ServiceRegistryImpl;
class ServiceWorkerContextCore;
struct ServiceWorkerFetchRequest;
@@ -118,6 +120,10 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
// status.
ServiceWorkerStatusCode SendMessage(const IPC::Message& message);
+ // Returns the ServiceRegistry for this worker. It is invalid to call this
+ // when the worker is not in STARTING or RUNNING status.
+ ServiceRegistry* GetServiceRegistry();
+
int embedded_worker_id() const { return embedded_worker_id_; }
Status status() const { return status_; }
StartingPhase starting_phase() const {
@@ -235,6 +241,7 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
// Current running information. -1 indicates the worker is not running.
int process_id_;
int thread_id_;
+ scoped_ptr<ServiceRegistryImpl> service_registry_;
// Whether devtools is attached or not.
bool devtools_attached_;
« no previous file with comments | « no previous file | content/browser/service_worker/embedded_worker_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698