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

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

Issue 2833793002: Added AddDownload communication path and observers
Patch Set: 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 22 matching lines...) Expand all
33 virtual void ResumeDownload(const std::string& registration_id) = 0; 33 virtual void ResumeDownload(const std::string& registration_id) = 0;
34 34
35 protected: 35 protected:
36 virtual ~Delegate() {} 36 virtual ~Delegate() {}
37 }; 37 };
38 38
39 // The client will maintain a weak reference to |delegate|. The provider must 39 // The client will maintain a weak reference to |delegate|. The provider must
40 // reset the delegate back to a `nullptr` when it's being destructed. 40 // reset the delegate back to a `nullptr` when it's being destructed.
41 virtual void SetDelegate(Delegate* delegate) = 0; 41 virtual void SetDelegate(Delegate* delegate) = 0;
42 42
43 // Notify the client that a Background Fetch download has started, including
44 // all information needed to display a notification of the download.
45 virtual void AddDownload(const std::string& registration_id,
46 const std::string& title,
47 int64_t total_download_size) = 0;
48
43 protected: 49 protected:
44 virtual ~BackgroundFetchClient() {} 50 virtual ~BackgroundFetchClient() {}
45 }; 51 };
46 52
47 } // namespace content 53 } // namespace content
48 54
49 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_CLIENT_H_ 55 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_FETCH_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698