| 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 9a9aa0a823a13218c9f0e3a37a533eaf6ea702f8..5a105adaf466541e8d03c2a161da137e7cfa571c 100644
|
| --- a/content/public/browser/service_worker_context.h
|
| +++ b/content/public/browser/service_worker_context.h
|
| @@ -58,6 +58,9 @@ class ServiceWorkerContext {
|
| using StartServiceWorkerForNavigationHintCallback =
|
| base::Callback<void(StartServiceWorkerForNavigationHintResult result)>;
|
|
|
| + using StartActiveWorkerCallback =
|
| + base::OnceCallback<void(int process_id, int thread_id)>;
|
| +
|
| // Registers the header name which should not be passed to the ServiceWorker.
|
| // Must be called from the IO thread.
|
| CONTENT_EXPORT static void AddExcludedHeadersForFetchEvent(
|
| @@ -107,6 +110,15 @@ class ServiceWorkerContext {
|
| virtual bool FinishedExternalRequest(int64_t service_worker_version_id,
|
| const std::string& request_uuid) = 0;
|
|
|
| + // Starts the active worker of the registration whose scope is |pattern|.
|
| + // |info_callback| is passed the worker's render process id and thread id.
|
| + //
|
| + // Must be called on IO thread.
|
| + virtual void StartActiveWorkerForPattern(
|
| + const GURL& pattern,
|
| + StartActiveWorkerCallback info_callback,
|
| + base::OnceClosure failure_callback) = 0;
|
| +
|
| // Equivalent to calling navigator.serviceWorker.unregister(pattern) from a
|
| // renderer, except that |pattern| is an absolute URL instead of relative to
|
| // some current origin. |callback| is passed true when the JS promise is
|
|
|