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 ccafedf9ea5d1297ca9709ef20b9377f31ecfc3c..4a43c0802e75cb106ef6a7ea92992a35f6d14683 100644 |
--- a/content/child/service_worker/service_worker_dispatcher.h |
+++ b/content/child/service_worker/service_worker_dispatcher.h |
@@ -69,6 +69,8 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
WebServiceWorkerGetRegistrationForReadyCallbacks; |
using WebEnableNavigationPreloadCallbacks = |
blink::WebServiceWorkerRegistration::WebEnableNavigationPreloadCallbacks; |
+ using WebGetNavigationPreloadStateCallbacks = blink:: |
+ WebServiceWorkerRegistration::WebGetNavigationPreloadStateCallbacks; |
ServiceWorkerDispatcher( |
ThreadSafeSender* thread_safe_sender, |
@@ -111,6 +113,11 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
int64_t registration_id, |
bool enable, |
std::unique_ptr<WebEnableNavigationPreloadCallbacks> callbacks); |
+ // Corresponds to NavigationPreloadManager.getState. |
+ void GetNavigationPreloadState( |
+ int provider_id, |
+ int64_t registration_id, |
+ std::unique_ptr<WebGetNavigationPreloadStateCallbacks> callbacks); |
// 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 |
@@ -171,6 +178,8 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
IDMapOwnPointer> GetRegistrationForReadyCallbackMap; |
using EnableNavigationPreloadCallbackMap = |
IDMap<WebEnableNavigationPreloadCallbacks, IDMapOwnPointer>; |
+ using GetNavigationPreloadStateCallbackMap = |
+ IDMap<WebGetNavigationPreloadStateCallbacks, IDMapOwnPointer>; |
typedef std::map<int, blink::WebServiceWorkerProviderClient*> |
ProviderClientMap; |
@@ -216,6 +225,9 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
const ServiceWorkerRegistrationObjectInfo& info, |
const ServiceWorkerVersionAttributes& attrs); |
void OnDidEnableNavigationPreload(int thread_id, int request_id); |
+ void OnDidGetNavigationPreloadState(int thread_id, |
+ int request_id, |
+ bool enabled); |
void OnRegistrationError(int thread_id, |
int request_id, |
blink::WebServiceWorkerError::ErrorType error_type, |
@@ -243,6 +255,11 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
int request_id, |
blink::WebServiceWorkerError::ErrorType error_type, |
const std::string& message); |
+ void OnGetNavigationPreloadStateError( |
+ int thread_id, |
+ int request_id, |
+ blink::WebServiceWorkerError::ErrorType error_type, |
+ const std::string& message); |
void OnServiceWorkerStateChanged(int thread_id, |
int handle_id, |
blink::WebServiceWorkerState state); |
@@ -283,6 +300,7 @@ class CONTENT_EXPORT ServiceWorkerDispatcher : public WorkerThread::Observer { |
GetRegistrationsCallbackMap pending_get_registrations_callbacks_; |
GetRegistrationForReadyCallbackMap get_for_ready_callbacks_; |
EnableNavigationPreloadCallbackMap enable_navigation_preload_callbacks_; |
+ GetNavigationPreloadStateCallbackMap get_navigation_preload_state_callbacks_; |
ProviderClientMap provider_clients_; |
ProviderContextMap provider_contexts_; |