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

Side by Side Diff: content/public/browser/background_fetch_client.h

Issue 2777063008: Connect BackgroundFetch to the OfflineItemCollection
Patch Set: Code review comments Created 3 years, 8 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 unified diff | Download patch
OLDNEW
(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_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_CLIENT_H_
7
8 #include <string>
9
10 #include "content/common/content_export.h"
11
12 namespace content {
13
14 // The Background Fetch client enables the embedder to be given information
15 // about the active Background Fetches, for example to provide a user interface,
16 // and for the embedder to control the state of such fetches.
17 class CONTENT_EXPORT BackgroundFetchClient {
18 public:
19 // Class for access to the BackgroundFetch system. Manages in progress fetches
20 // and supports pause, resume, cancel, and UI update.
21 class CONTENT_EXPORT Delegate {
22 public:
23 // Cancel all fetches associated with the |registration_id|.
24 virtual void CancelDownload(const std::string& registration_id) = 0;
25
26 // Pause all fetches associated with the |registration_id|.
27 virtual void PauseDownload(const std::string& registration_id) = 0;
28
29 // Resume any fetches associated with the |registration_id|.
30 virtual void ResumeDownload(const std::string& registration_id) = 0;
31
32 protected:
33 virtual ~Delegate() {}
34 };
35
36 // The client will maintain a weak reference to |delegate|. The provider must
37 // reset the delegate back to a `nullptr` when it's being destructed.
38 virtual void SetDelegate(Delegate* delegate) = 0;
Peter Beverloo 2017/03/31 11:54:06 Could we add one //content -> //chrome (--> OIC) c
harkness 2017/04/03 12:47:22 I'll start working on them.
39
40 protected:
41 virtual ~BackgroundFetchClient() {}
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698