| Index: content/public/browser/service_worker_context.h
|
| diff --git a/content/public/browser/service_worker_context.h b/content/public/browser/service_worker_context.h
|
| index 22d13f9bd57ac84e19382a9430fc1a88f20b0199..e0a4074988f9f1594ce5068c249e1095200874fa 100644
|
| --- a/content/public/browser/service_worker_context.h
|
| +++ b/content/public/browser/service_worker_context.h
|
| @@ -14,6 +14,8 @@
|
|
|
| namespace content {
|
|
|
| +class RenderProcessHost;
|
| +
|
| enum class ServiceWorkerCapability {
|
| NO_SERVICE_WORKER,
|
| SERVICE_WORKER_NO_FETCH_HANDLER,
|
| @@ -139,6 +141,16 @@ class ServiceWorkerContext {
|
| // be called on the UI thread.
|
| virtual void ClearAllServiceWorkersForTest(const base::Closure& callback) = 0;
|
|
|
| + // Starts a Service Worker for |document_url| for a navigation preconnect in
|
| + // the specified render process |host|. Must be called from the UI thread. The
|
| + // |callback| will always be called on the UI thread. This method can fail if:
|
| + // * No Service Worker was registered for |document_url|.
|
| + // * The specified render process is not suitable for loading |document_url|.
|
| + virtual void StartServiceWorkerForNavigationPreconnect(
|
| + const GURL& document_url,
|
| + RenderProcessHost* host,
|
| + const ResultCallback& callback) = 0;
|
| +
|
| protected:
|
| ServiceWorkerContext() {}
|
| virtual ~ServiceWorkerContext() {}
|
|
|