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 b8953f7cb37db135538efe8160f0ea16e369d496..efc3ba70c343475fd0e3a469a605459edf2aa89b 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" |
@@ -80,6 +82,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); |
@@ -95,6 +98,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> |
@@ -127,6 +132,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_; |
@@ -150,6 +159,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_; |