| 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 72650154c721daaa19b9511aabc62f9ff028e167..f1813d3a1d29be97337b8e469593de64167df483 100644
|
| --- a/content/public/browser/service_worker_context.h
|
| +++ b/content/public/browser/service_worker_context.h
|
| @@ -12,6 +12,10 @@
|
| #include "content/public/browser/service_worker_usage_info.h"
|
| #include "url/gurl.h"
|
|
|
| +namespace blink {
|
| +enum class WebNavigationHintType;
|
| +}
|
| +
|
| namespace content {
|
|
|
| // Represents the per-StoragePartition ServiceWorker data.
|
| @@ -105,6 +109,20 @@ 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 hint in the
|
| + // specified render process |render_process_id|. Must be called from the IO
|
| + // thread. The |callback| will always be called on the IO thred.
|
| + // This method can fail if:
|
| + // * No Service Worker was registered for |document_url|.
|
| + // * The specified render process is suitable for loading |document_url|.
|
| + // This check is done by RenderProcessHostImpl::IsSuitableHost().
|
| + // * Something unexpected goes wrong, like a renderer crash.
|
| + virtual void StartServiceWorkerForNavigationHint(
|
| + const GURL& document_url,
|
| + blink::WebNavigationHintType type,
|
| + int render_process_id,
|
| + const ResultCallback& callback) = 0;
|
| +
|
| protected:
|
| ServiceWorkerContext() {}
|
| virtual ~ServiceWorkerContext() {}
|
|
|