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

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

Issue 871853002: ServiceWorker: add ServiceWorkerClients.claim() support (2/3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change error type Created 5 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/browser/service_worker/service_worker_provider_host.h
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h
index 9123014273d400004148f897a6ed999799677d5b..29f73aa5fd9db19a37c89ae6d45a32c10a5f5b67 100644
--- a/content/browser/service_worker/service_worker_provider_host.h
+++ b/content/browser/service_worker/service_worker_provider_host.h
@@ -95,7 +95,8 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
const GURL& topmost_frame_url() const { return topmost_frame_url_; }
// Associates to |registration| to listen for its version change events.
- void AssociateRegistration(ServiceWorkerRegistration* registration);
+ void AssociateRegistration(ServiceWorkerRegistration* registration,
+ bool should_notify_controller_change = false);
michaeln 2015/01/28 00:55:13 This flag seems odd? Also it shouldn't have a defa
xiang 2015/01/28 05:38:35 Done.
// Clears the associated registration and stop listening to it.
void DisassociateRegistration();
@@ -140,6 +141,9 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
// Asks the renderer to send back the document information.
void GetClientInfo(int embedded_worker_id, int request_id);
+ // Starts using the |registration|.
+ void SetController(ServiceWorkerRegistration* registration);
falken 2015/01/26 08:45:13 This API gets a bit confusing: this function is a
falken 2015/01/26 08:45:41 I meant to write: fold them into one OR have bette
michaeln 2015/01/28 00:55:13 Agreed, please don't use SetController() as the na
+
// Adds reference of this host's process to the |pattern|, the reference will
// be removed in destructor.
void AddScopedProcessReferenceToPattern(const GURL& pattern);
@@ -169,7 +173,8 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
// Sets the controller version field to |version| or if |version| is NULL,
// clears the field.
- void SetControllerVersionAttribute(ServiceWorkerVersion* version);
+ void SetControllerVersionAttribute(ServiceWorkerVersion* version,
+ bool should_notify_controller_change);
void SendAssociateRegistrationMessage();

Powered by Google App Engine
This is Rietveld 408576698