OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_OFFLINE_PAGES_DOWNLOADS_OFFLINE_PAGE_DOWNLOAD_NOTIFIER_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_DOWNLOADS_OFFLINE_PAGE_DOWNLOAD_NOTIFIER_H
_ |
6 #define COMPONENTS_OFFLINE_PAGES_DOWNLOADS_OFFLINE_PAGE_DOWNLOAD_NOTIFIER_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_CORE_DOWNLOADS_OFFLINE_PAGE_DOWNLOAD_NOTIFIER_H
_ |
7 | 7 |
8 #include "components/offline_pages/downloads/download_ui_item.h" | 8 #include "components/offline_pages/core/downloads/download_ui_item.h" |
9 | 9 |
10 namespace offline_pages { | 10 namespace offline_pages { |
11 | 11 |
12 struct OfflinePageDownloadNotifier { | 12 struct OfflinePageDownloadNotifier { |
13 public: | 13 public: |
14 virtual ~OfflinePageDownloadNotifier() = default; | 14 virtual ~OfflinePageDownloadNotifier() = default; |
15 | 15 |
16 // Reports that |item| has completed successfully. | 16 // Reports that |item| has completed successfully. |
17 virtual void NotifyDownloadSuccessful(const DownloadUIItem& item) = 0; | 17 virtual void NotifyDownloadSuccessful(const DownloadUIItem& item) = 0; |
18 | 18 |
19 // Reports that |item| has completed unsuccessfully. | 19 // Reports that |item| has completed unsuccessfully. |
20 virtual void NotifyDownloadFailed(const DownloadUIItem& item) = 0; | 20 virtual void NotifyDownloadFailed(const DownloadUIItem& item) = 0; |
21 | 21 |
22 // Reports that |item| is active and possibly making progress. | 22 // Reports that |item| is active and possibly making progress. |
23 virtual void NotifyDownloadProgress(const DownloadUIItem& item) = 0; | 23 virtual void NotifyDownloadProgress(const DownloadUIItem& item) = 0; |
24 | 24 |
25 // Reports that |item| has been paused (and so it is not active). | 25 // Reports that |item| has been paused (and so it is not active). |
26 virtual void NotifyDownloadPaused(const DownloadUIItem& item) = 0; | 26 virtual void NotifyDownloadPaused(const DownloadUIItem& item) = 0; |
27 | 27 |
28 // Reports that any progress on |item| has been interrupted. It is pending | 28 // Reports that any progress on |item| has been interrupted. It is pending |
29 // or available for another attempt when conditions allows. | 29 // or available for another attempt when conditions allows. |
30 virtual void NotifyDownloadInterrupted(const DownloadUIItem& item) = 0; | 30 virtual void NotifyDownloadInterrupted(const DownloadUIItem& item) = 0; |
31 | 31 |
32 // Reports that |item| has been canceled. | 32 // Reports that |item| has been canceled. |
33 virtual void NotifyDownloadCanceled(const DownloadUIItem& item) = 0; | 33 virtual void NotifyDownloadCanceled(const DownloadUIItem& item) = 0; |
34 }; | 34 }; |
35 | 35 |
36 } // namespace offline_pages | 36 } // namespace offline_pages |
37 | 37 |
38 #endif // COMPONENTS_OFFLINE_PAGES_DOWNLOADS_OFFLINE_PAGE_DOWNLOAD_NOTIFIER_H_ | 38 #endif // COMPONENTS_OFFLINE_PAGES_CORE_DOWNLOADS_OFFLINE_PAGE_DOWNLOAD_NOTIFIE
R_H_ |
OLD | NEW |