Index: content/child/service_worker/service_worker_dispatcher.h |
diff --git a/content/child/service_worker/service_worker_dispatcher.h b/content/child/service_worker/service_worker_dispatcher.h |
index 4793971805569f564b5614fc41af600d8283793a..73bb1615c97f0c2ab418179dec69135356c22f7d 100644 |
--- a/content/child/service_worker/service_worker_dispatcher.h |
+++ b/content/child/service_worker/service_worker_dispatcher.h |
@@ -16,6 +16,7 @@ |
#include "base/memory/ref_counted.h" |
#include "base/strings/string16.h" |
#include "content/public/child/worker_thread.h" |
+#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorker.h" |
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h" |
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProvider.h" |
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h" |
@@ -67,6 +68,10 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
typedef blink::WebServiceWorkerProvider:: |
WebServiceWorkerGetRegistrationForReadyCallbacks |
WebServiceWorkerGetRegistrationForReadyCallbacks; |
+ using WebSetNavigationPreloadCallbacks = |
+ blink::WebServiceWorker::WebSetNavigationPreloadCallbacks; |
+ using WebGetNavigationPreloadCallbacks = |
+ blink::WebServiceWorker::WebGetNavigationPreloadCallbacks; |
ServiceWorkerDispatcher( |
ThreadSafeSender* thread_safe_sender, |
@@ -103,6 +108,12 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
int provider_id, |
WebServiceWorkerGetRegistrationForReadyCallbacks* callbacks); |
+ void SetNavigationPreload(int handle_id, |
+ const std::string& value, |
+ WebSetNavigationPreloadCallbacks* callback); |
+ void GetNavigationPreload(int handle_id, |
+ WebGetNavigationPreloadCallbacks* callback); |
+ |
// Called when a new provider context for a document is created. Usually |
// this happens when a new document is being loaded, and is called much |
// earlier than AddScriptClient. |
@@ -160,6 +171,10 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
IDMapOwnPointer> GetRegistrationsCallbackMap; |
typedef IDMap<WebServiceWorkerGetRegistrationForReadyCallbacks, |
IDMapOwnPointer> GetRegistrationForReadyCallbackMap; |
+ using GetNavigationPreloadCallbackMap = |
+ IDMap<WebGetNavigationPreloadCallbacks, IDMapOwnPointer>; |
+ using SetNavigationPreloadCallbackMap = |
+ IDMap<WebSetNavigationPreloadCallbacks, IDMapOwnPointer>; |
typedef std::map<int, blink::WebServiceWorkerProviderClient*> |
ProviderClientMap; |
@@ -204,6 +219,11 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
int request_id, |
const ServiceWorkerRegistrationObjectInfo& info, |
const ServiceWorkerVersionAttributes& attrs); |
+ void OnDidGetNavigationPreload(int thread_id, |
+ int request_id, |
+ bool is_enabled, |
+ const std::string& value); |
+ void OnDidSetNavigationPreload(int thread_id, int request_id); |
void OnRegistrationError(int thread_id, |
int request_id, |
blink::WebServiceWorkerError::ErrorType error_type, |
@@ -265,6 +285,8 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
GetRegistrationCallbackMap pending_get_registration_callbacks_; |
GetRegistrationsCallbackMap pending_get_registrations_callbacks_; |
GetRegistrationForReadyCallbackMap get_for_ready_callbacks_; |
+ GetNavigationPreloadCallbackMap pending_get_navigation_preload_callbacks_; |
+ SetNavigationPreloadCallbackMap pending_set_navigation_preload_callbacks_; |
ProviderClientMap provider_clients_; |
ProviderContextMap provider_contexts_; |