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

Unified Diff: chrome/browser/notifications/notification_ui_manager_mac.mm

Issue 12635010: Start building message_center on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MessageCenterNotificationsTest Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/notifications/notification_browsertest.cc ('k') | ui/message_center/message_center.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/notification_ui_manager_mac.mm
diff --git a/chrome/browser/notifications/notification_ui_manager_mac.mm b/chrome/browser/notifications/notification_ui_manager_mac.mm
index 872d0bff4bdbe7998054147a88781d88e3086800..4921442903dda375702a1796a0e50215551edc09 100644
--- a/chrome/browser/notifications/notification_ui_manager_mac.mm
+++ b/chrome/browser/notifications/notification_ui_manager_mac.mm
@@ -10,6 +10,12 @@
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/balloon_notification_ui_manager.h"
+#if defined(ENABLE_MESSAGE_CENTER)
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/notifications/message_center_notification_manager.h"
+#include "ui/message_center/message_center_util.h"
+#endif
+
@class NSUserNotificationCenter;
// Since NSUserNotification and NSUserNotificationCenter are new classes in
@@ -94,6 +100,15 @@ NotificationUIManagerMac::ControllerNotification::~ControllerNotification() {
// static
NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) {
+#if defined(ENABLE_MESSAGE_CENTER)
+ // TODO(rsesek): Remove this function and merge it with the one in
+ // notification_ui_manager.cc.
+ if (DelegatesToMessageCenter()) {
+ return new MessageCenterNotificationManager(
+ g_browser_process->message_center());
+ }
+#endif
+
BalloonNotificationUIManager* balloon_manager = NULL;
if (base::mac::IsOSMountainLionOrLater())
balloon_manager = new NotificationUIManagerMac(local_state);
« no previous file with comments | « chrome/browser/notifications/notification_browsertest.cc ('k') | ui/message_center/message_center.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698