| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 virtual ~ProfileNotification(); | 170 virtual ~ProfileNotification(); |
| 171 | 171 |
| 172 void StartDownloads(); | 172 void StartDownloads(); |
| 173 | 173 |
| 174 // Overridden from ImageDownloadsObserver. | 174 // Overridden from ImageDownloadsObserver. |
| 175 virtual void OnDownloadsCompleted() OVERRIDE; | 175 virtual void OnDownloadsCompleted() OVERRIDE; |
| 176 | 176 |
| 177 Profile* profile() const { return profile_; } | 177 Profile* profile() const { return profile_; } |
| 178 const Notification& notification() const { return notification_; } | 178 const Notification& notification() const { return notification_; } |
| 179 | 179 |
| 180 // Returns extension_id if the notification originates from an extension, | |
| 181 // empty string otherwise. | |
| 182 std::string GetExtensionId(); | |
| 183 | |
| 184 // Route a new notification to an app/extension. | 180 // Route a new notification to an app/extension. |
| 185 void AddToAlternateProvider(const std::string extension_id); | 181 void AddToAlternateProvider(const std::string extension_id); |
| 186 | 182 |
| 187 private: | 183 private: |
| 188 // Weak, guaranteed not to be used after profile removal by parent class. | 184 // Weak, guaranteed not to be used after profile removal by parent class. |
| 189 Profile* profile_; | 185 Profile* profile_; |
| 190 Notification notification_; | 186 Notification notification_; |
| 191 // Track the downloads for this notification so the notification can be | 187 // Track the downloads for this notification so the notification can be |
| 192 // updated properly. | 188 // updated properly. |
| 193 scoped_ptr<ImageDownloads> downloads_; | 189 scoped_ptr<ImageDownloads> downloads_; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // Keeps track of all notification statistics for UMA purposes. | 244 // Keeps track of all notification statistics for UMA purposes. |
| 249 MessageCenterStatsCollector stats_collector_; | 245 MessageCenterStatsCollector stats_collector_; |
| 250 | 246 |
| 251 // Keeps track of notifications specific to Google Now for UMA purposes. | 247 // Keeps track of notifications specific to Google Now for UMA purposes. |
| 252 GoogleNowNotificationStatsCollector google_now_stats_collector_; | 248 GoogleNowNotificationStatsCollector google_now_stats_collector_; |
| 253 | 249 |
| 254 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager); | 250 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager); |
| 255 }; | 251 }; |
| 256 | 252 |
| 257 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ | 253 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ |
| OLD | NEW |