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

Unified Diff: chrome/browser/notifications/message_center_notification_manager.h

Issue 441753002: Route newly created notifications to notification provider API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments, deleted browser tests for onUpdated and onCleared Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/message_center_notification_manager.h
diff --git a/chrome/browser/notifications/message_center_notification_manager.h b/chrome/browser/notifications/message_center_notification_manager.h
index e8400f935431a3e0ba77a9224d8d99a7ab95e9d1..4347096884e7d0de89f4f4b3a975ee34a9688e85 100644
--- a/chrome/browser/notifications/message_center_notification_manager.h
+++ b/chrome/browser/notifications/message_center_notification_manager.h
@@ -181,6 +181,9 @@ class MessageCenterNotificationManager
// empty string otherwise.
std::string GetExtensionId();
+ // Route a new notification to an app/extension.
+ void AddToAlternateProvider(const std::string extension_id);
+
private:
// Weak, guaranteed not to be used after profile removal by parent class.
Profile* profile_;
@@ -197,8 +200,8 @@ class MessageCenterNotificationManager
typedef std::map<std::string, ProfileNotification*> NotificationMap;
NotificationMap profile_notifications_;
- // Helpers that add/remove the notification from local map and MessageCenter.
- // They take ownership of profile_notification object.
+ // Helpers that add/remove the notification from local map.
+ // The local map takes ownership of profile_notification object.
void AddProfileNotification(ProfileNotification* profile_notification);
void RemoveProfileNotification(ProfileNotification* profile_notification);
@@ -206,6 +209,10 @@ class MessageCenterNotificationManager
// notification is found.
ProfileNotification* FindProfileNotification(const std::string& id) const;
+ // Get the extension ID of the extension that the user chose to take over
+ // Chorme Notification Center.
+ std::string GetExtensionTakingOverNotifications(Profile* profile);
+
#if defined(OS_WIN)
// This function is run on update to ensure that the notification balloon is
// shown only when there are no popups present.

Powered by Google App Engine
This is Rietveld 408576698