Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: content/public/browser/background_fetch_delegate.h

Issue 2777063008: Connect BackgroundFetch to the OfflineItemCollection
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698