Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_DELEGATE_H_ | |
| 6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_DELEGATE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "content/common/content_export.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 // Class for access to the BackgroundFetch system. Manages in progress fetches | |
| 15 // and supports pause, resume, cancel, and UI update. | |
| 16 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.
| |
| 17 public: | |
| 18 // Cancel all fetches associated with the |registration_id|. | |
| 19 virtual void CancelDownload(const std::string& registration_id) = 0; | |
| 20 | |
| 21 // Pause all fetches associated with the |registration_id|. | |
| 22 virtual void PauseDownload(const std::string& registration_id) = 0; | |
| 23 | |
| 24 // Resume any fetches associated with the |registration_id|. | |
| 25 virtual void ResumeDownload(const std::string& registration_id) = 0; | |
| 26 | |
| 27 protected: | |
| 28 virtual ~BackgroundFetchDelegate() {} | |
| 29 }; | |
| 30 | |
| 31 } // namespace content | |
| 32 | |
| 33 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_DELEGATE_H_ | |
| OLD | NEW |