OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "chrome/browser/download/download_commands.h" | 10 #include "chrome/browser/download/download_commands.h" |
11 #include "chrome/browser/notifications/notification.h" | 11 #include "chrome/browser/notifications/notification.h" |
12 #include "chrome/browser/notifications/notification_delegate.h" | 12 #include "chrome/browser/notifications/notification_delegate.h" |
13 #include "chrome/browser/notifications/notification_test_util.h" | 13 #include "chrome/browser/notifications/notification_test_util.h" |
14 #include "content/public/browser/download_item.h" | 14 #include "content/public/browser/download_item.h" |
15 #include "ui/message_center/message_center.h" | 15 #include "ui/message_center/message_center.h" |
16 #include "ui/message_center/message_center_observer.h" | 16 #include "ui/message_center/message_center_observer.h" |
17 | 17 |
18 namespace test { | |
19 class DownloadItemNotificationTest; | |
20 } | |
21 | |
22 class DownloadNotificationManagerForProfile; | |
23 | |
24 class DownloadNotification { | 18 class DownloadNotification { |
25 public: | 19 public: |
26 DownloadNotification(); | 20 DownloadNotification(); |
27 virtual ~DownloadNotification(); | 21 virtual ~DownloadNotification(); |
28 | 22 |
29 static const char kDownloadNotificationOrigin[]; | 23 static const char kDownloadNotificationOrigin[]; |
30 | 24 |
31 virtual void OnDownloadUpdated(content::DownloadItem* item) = 0; | 25 virtual void OnDownloadUpdated(content::DownloadItem* item) = 0; |
32 virtual void OnDownloadRemoved(content::DownloadItem* item) = 0; | 26 virtual void OnDownloadRemoved(content::DownloadItem* item) = 0; |
33 | 27 |
(...skipping 11 matching lines...) Expand all Loading... |
45 protected: | 39 protected: |
46 NotificationDelegate* watcher() const; | 40 NotificationDelegate* watcher() const; |
47 | 41 |
48 private: | 42 private: |
49 scoped_refptr<NotificationDelegate> watcher_; | 43 scoped_refptr<NotificationDelegate> watcher_; |
50 | 44 |
51 DISALLOW_COPY_AND_ASSIGN(DownloadNotification); | 45 DISALLOW_COPY_AND_ASSIGN(DownloadNotification); |
52 }; | 46 }; |
53 | 47 |
54 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_H_ | 48 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_H_ |
OLD | NEW |