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

Unified Diff: chrome/browser/notifications/notification_ui_manager.cc

Issue 11958025: Start delegating notifications to MessageCenter on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another build fix Created 7 years, 11 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/notification_ui_manager.cc
diff --git a/chrome/browser/notifications/notification_ui_manager.cc b/chrome/browser/notifications/notification_ui_manager.cc
index b4b7f883662ab18a81f9163e82c857b4c59384a0..0006496b683641003eddcfeaa926fcd43468e052 100644
--- a/chrome/browser/notifications/notification_ui_manager.cc
+++ b/chrome/browser/notifications/notification_ui_manager.cc
@@ -9,17 +9,15 @@
#include "chrome/common/chrome_switches.h"
#if defined(ENABLE_MESSAGE_CENTER)
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/notifications/message_center_notification_manager.h"
#endif
// static
bool NotificationUIManager::DelegatesToMessageCenter() {
-#if defined(ENABLE_MESSAGE_CENTER)
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableRichNotifications);
-#else
return false;
-#endif
}
#if !defined(OS_MACOSX)
@@ -27,7 +25,8 @@ bool NotificationUIManager::DelegatesToMessageCenter() {
NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) {
#if defined(ENABLE_MESSAGE_CENTER)
if (DelegatesToMessageCenter())
- return new MessageCenterNotificationManager();
+ return new MessageCenterNotificationManager(
+ g_browser_process->message_center());
#endif
BalloonNotificationUIManager* balloon_manager =
new BalloonNotificationUIManager(local_state);
« no previous file with comments | « chrome/browser/notifications/notification.cc ('k') | chrome/browser/notifications/notification_ui_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698