Chromium Code Reviews| Index: content/browser/background_fetch/background_fetch_context.h |
| diff --git a/content/browser/background_fetch/background_fetch_context.h b/content/browser/background_fetch/background_fetch_context.h |
| index 41c9e7fd739a5f00c4b8e7e99f540f94458749ea..92249c1bf7f1a704bbb5007f5141a797b08ec418 100644 |
| --- a/content/browser/background_fetch/background_fetch_context.h |
| +++ b/content/browser/background_fetch/background_fetch_context.h |
| @@ -16,6 +16,7 @@ |
| namespace content { |
| +class BackgroundFetchClientProxy; |
| class BackgroundFetchDataManager; |
| class BackgroundFetchJobController; |
| struct BackgroundFetchOptions; |
| @@ -52,6 +53,18 @@ class CONTENT_EXPORT BackgroundFetchContext |
| const BackgroundFetchOptions& options, |
| const blink::mojom::BackgroundFetchService::FetchCallback& callback); |
| + // Cancels the Background Fetch for the |registration_id| and triggers the |
| + // 'backgroundfetchabort' to be sent to the associated service worker. |
|
Peter Beverloo
2017/03/31 01:32:23
+event
harkness
2017/03/31 10:11:44
Done.
|
| + void CancelFetch(const BackgroundFetchRegistrationId& registration_id); |
| + |
| + // Pauses the Background Fetch for the |registration_id|. If the fetch was |
| + // already paused, this has no effect. |
| + void PauseFetch(const BackgroundFetchRegistrationId& registration_id); |
| + |
| + // Resumes the previously paused Background Fetch for the |registration_id|. |
| + // If the fetch was not paused, this has no effect. |
| + void ResumeFetch(const BackgroundFetchRegistrationId& registration_id); |
| + |
| private: |
| friend class base::DeleteHelper<BackgroundFetchContext>; |
| friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; |
| @@ -91,6 +104,9 @@ class CONTENT_EXPORT BackgroundFetchContext |
| std::unique_ptr<BackgroundFetchJobController>> |
| active_fetches_; |
| + // The proxy will dispatch BackgroundFetchClient calls to the UI thread. |
| + std::unique_ptr<BackgroundFetchClientProxy> client_proxy_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(BackgroundFetchContext); |
| }; |