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

Side by Side 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: rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 // Helpers that add/remove the notification from local map and MessageCenter. 200 // Helpers that add/remove the notification from local map and MessageCenter.
201 // They take ownership of profile_notification object. 201 // They take ownership of profile_notification object.
202 void AddProfileNotification(ProfileNotification* profile_notification); 202 void AddProfileNotification(ProfileNotification* profile_notification);
203 void RemoveProfileNotification(ProfileNotification* profile_notification); 203 void RemoveProfileNotification(ProfileNotification* profile_notification);
204 204
205 // Returns the ProfileNotification for the |id|, or NULL if no such 205 // Returns the ProfileNotification for the |id|, or NULL if no such
206 // notification is found. 206 // notification is found.
207 ProfileNotification* FindProfileNotification(const std::string& id) const; 207 ProfileNotification* FindProfileNotification(const std::string& id) const;
208 208
209 // Route Notifications to an app/extension, instead of sending to Chrome
210 // Notification Center.
211 void RouteNotificationToAlternateProvider(const Notification& notification,
212 Profile* profile,
213 std::string extension_id);
214
215 // Get the extension ID of the extension that the user chose to take over
216 // Chorme Notification Center.
217 std::string GetExtensionTakingOverNotifications(Profile* profile);
218
209 #if defined(OS_WIN) 219 #if defined(OS_WIN)
210 // This function is run on update to ensure that the notification balloon is 220 // This function is run on update to ensure that the notification balloon is
211 // shown only when there are no popups present. 221 // shown only when there are no popups present.
212 void CheckFirstRunTimer(); 222 void CheckFirstRunTimer();
213 223
214 // |first_run_pref_| is used to keep track of whether we've ever shown the 224 // |first_run_pref_| is used to keep track of whether we've ever shown the
215 // first run balloon before, even across restarts. 225 // first run balloon before, even across restarts.
216 BooleanPrefMember first_run_pref_; 226 BooleanPrefMember first_run_pref_;
217 227
218 // The timer after which we will show the first run balloon. This timer is 228 // The timer after which we will show the first run balloon. This timer is
(...skipping 22 matching lines...) Expand all
241 // Keeps track of all notification statistics for UMA purposes. 251 // Keeps track of all notification statistics for UMA purposes.
242 MessageCenterStatsCollector stats_collector_; 252 MessageCenterStatsCollector stats_collector_;
243 253
244 // Keeps track of notifications specific to Google Now for UMA purposes. 254 // Keeps track of notifications specific to Google Now for UMA purposes.
245 GoogleNowNotificationStatsCollector google_now_stats_collector_; 255 GoogleNowNotificationStatsCollector google_now_stats_collector_;
246 256
247 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager); 257 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager);
248 }; 258 };
249 259
250 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ 260 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698