Chromium Code Reviews| Index: content/public/browser/background_fetch_delegate.h |
| diff --git a/content/public/browser/background_fetch_delegate.h b/content/public/browser/background_fetch_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f18a9727d8434e6aece8755b227bec5023d939ab |
| --- /dev/null |
| +++ b/content/public/browser/background_fetch_delegate.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_DELEGATE_H_ |
| +#define CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_DELEGATE_H_ |
| + |
| +#include <string> |
| + |
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| + |
| +// Class for access to the BackgroundFetch system. Manages in progress fetches |
| +// and supports pause, resume, cancel, and UI update. |
| +class CONTENT_EXPORT BackgroundFetchDelegate { |
|
Peter Beverloo
2017/03/29 14:32:13
nit: could we define this inline in the Background
harkness
2017/03/30 12:42:36
Done.
|
| + public: |
| + // Cancel all fetches associated with the |registration_id|. |
| + virtual void CancelDownload(const std::string& registration_id) = 0; |
| + |
| + // Pause all fetches associated with the |registration_id|. |
| + virtual void PauseDownload(const std::string& registration_id) = 0; |
| + |
| + // Resume any fetches associated with the |registration_id|. |
| + virtual void ResumeDownload(const std::string& registration_id) = 0; |
| + |
| + protected: |
| + virtual ~BackgroundFetchDelegate() {} |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_DELEGATE_H_ |