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

Side by Side Diff: chrome/browser/download/notification/download_notification_item.h

Issue 1005393003: [Download Notification] Use NotificationUIManager instead of MessageCenter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
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_ITEM_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_
6 #define CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ 6 #define CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_
7 7
8 #include "chrome/browser/download/notification/download_notification_item.h" 8 #include "chrome/browser/download/notification/download_notification_item.h"
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 13 matching lines...) Expand all
24 24
25 class DownloadNotificationItem : public content::DownloadItem::Observer { 25 class DownloadNotificationItem : public content::DownloadItem::Observer {
26 public: 26 public:
27 class Delegate { 27 class Delegate {
28 public: 28 public:
29 virtual void OnDownloadStarted(DownloadNotificationItem* item) = 0; 29 virtual void OnDownloadStarted(DownloadNotificationItem* item) = 0;
30 virtual void OnDownloadStopped(DownloadNotificationItem* item) = 0; 30 virtual void OnDownloadStopped(DownloadNotificationItem* item) = 0;
31 virtual void OnDownloadRemoved(DownloadNotificationItem* item) = 0; 31 virtual void OnDownloadRemoved(DownloadNotificationItem* item) = 0;
32 }; 32 };
33 33
34 DownloadNotificationItem(content::DownloadItem* item, Delegate* delegate); 34 DownloadNotificationItem(
35 content::DownloadItem* item, Profile* profile, Delegate* delegate);
35 36
36 ~DownloadNotificationItem() override; 37 ~DownloadNotificationItem() override;
37 38
38 private: 39 private:
39 class NotificationWatcher : public message_center::NotificationDelegate, 40 class NotificationWatcher : public message_center::NotificationDelegate,
40 public message_center::MessageCenterObserver { 41 public message_center::MessageCenterObserver {
41 public: 42 public:
42 explicit NotificationWatcher(DownloadNotificationItem* item); 43 explicit NotificationWatcher(DownloadNotificationItem* item);
43 44
44 private: 45 private:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 scoped_ptr<std::vector<DownloadCommands::Command>> button_actions_; 96 scoped_ptr<std::vector<DownloadCommands::Command>> button_actions_;
96 97
97 Delegate* const delegate_; 98 Delegate* const delegate_;
98 99
99 friend class test::DownloadNotificationItemTest; 100 friend class test::DownloadNotificationItemTest;
100 101
101 DISALLOW_COPY_AND_ASSIGN(DownloadNotificationItem); 102 DISALLOW_COPY_AND_ASSIGN(DownloadNotificationItem);
102 }; 103 };
103 104
104 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ 105 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698