Index: content/renderer/service_worker/service_worker_script_context.h |
diff --git a/content/renderer/service_worker/service_worker_script_context.h b/content/renderer/service_worker/service_worker_script_context.h |
index 5c8ff2ce381905868b2c88b971e243a838c11bf8..3259a4f2a6c31f26d50b2f9b582a7375bd3944d9 100644 |
--- a/content/renderer/service_worker/service_worker_script_context.h |
+++ b/content/renderer/service_worker/service_worker_script_context.h |
@@ -20,7 +20,9 @@ |
#include "third_party/WebKit/public/platform/WebGeofencingEventType.h" |
#include "third_party/WebKit/public/platform/WebMessagePortChannel.h" |
#include "third_party/WebKit/public/platform/WebServiceWorkerClientFocusCallback.h" |
+#include "third_party/WebKit/public/platform/WebServiceWorkerClientsClaimCallbacks.h" |
#include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" |
+#include "third_party/WebKit/public/platform/WebServiceWorkerError.h" |
#include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" |
#include "third_party/WebKit/public/platform/WebServiceWorkerSkipWaitingCallbacks.h" |
@@ -83,6 +85,7 @@ class ServiceWorkerScriptContext { |
void FocusClient(int client_id, |
blink::WebServiceWorkerClientFocusCallback* callback); |
void SkipWaiting(blink::WebServiceWorkerSkipWaitingCallbacks* callbacks); |
+ void ClaimClients(blink::WebServiceWorkerClientsClaimCallbacks* callbacks); |
// Send a message to the browser. Takes ownership of |message|. |
void Send(IPC::Message* message); |
@@ -98,6 +101,8 @@ class ServiceWorkerScriptContext { |
private: |
typedef IDMap<blink::WebServiceWorkerClientsCallbacks, IDMapOwnPointer> |
ClientsCallbacksMap; |
+ typedef IDMap<blink::WebServiceWorkerClientsClaimCallbacks, IDMapOwnPointer> |
+ ClaimClientsCallbacksMap; |
typedef IDMap<blink::WebServiceWorkerClientFocusCallback, IDMapOwnPointer> |
FocusClientCallbacksMap; |
typedef IDMap<blink::WebServiceWorkerSkipWaitingCallbacks, IDMapOwnPointer> |
@@ -130,6 +135,10 @@ class ServiceWorkerScriptContext { |
int request_id, const std::vector<ServiceWorkerClientInfo>& clients); |
void OnFocusClientResponse(int request_id, bool result); |
void OnDidSkipWaiting(int request_id); |
+ void OnDidClaimClients(int request_id); |
+ void OnClaimClientsError(int request_id, |
+ blink::WebServiceWorkerError::ErrorType error_type, |
+ const base::string16& message); |
scoped_ptr<ServiceWorkerCacheStorageDispatcher> cache_storage_dispatcher_; |
@@ -153,6 +162,9 @@ class ServiceWorkerScriptContext { |
// Pending callbacks for SkipWaiting(). |
SkipWaitingCallbacksMap pending_skip_waiting_callbacks_; |
+ // Pending callbacks for ClaimClients(). |
+ ClaimClientsCallbacksMap pending_claim_clients_callbacks_; |
+ |
// Capture timestamps for UMA |
std::map<int, base::TimeTicks> activate_start_timings_; |
std::map<int, base::TimeTicks> fetch_start_timings_; |