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

Side by Side Diff: chrome/browser/notifications/notification_ui_manager_mac.mm

Issue 17286015: Adds a first-run balloon to the Windows notification center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar fixes. Created 7 years, 6 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 #include "chrome/browser/notifications/notification_ui_manager_mac.h" 5 #include "chrome/browser/notifications/notification_ui_manager_mac.h"
6 6
7 #include "base/mac/cocoa_protocols.h" 7 #include "base/mac/cocoa_protocols.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 //////////////////////////////////////////////////////////////////////////////// 97 ////////////////////////////////////////////////////////////////////////////////
98 98
99 // static 99 // static
100 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) { 100 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) {
101 // TODO(rsesek): Remove this function and merge it with the one in 101 // TODO(rsesek): Remove this function and merge it with the one in
102 // notification_ui_manager.cc. 102 // notification_ui_manager.cc.
103 if (DelegatesToMessageCenter()) { 103 if (DelegatesToMessageCenter()) {
104 return new MessageCenterNotificationManager( 104 return new MessageCenterNotificationManager(
105 g_browser_process->message_center()); 105 g_browser_process->message_center(), local_state);
106 } 106 }
107 107
108 BalloonNotificationUIManager* balloon_manager = NULL; 108 BalloonNotificationUIManager* balloon_manager = NULL;
109 if (base::mac::IsOSMountainLionOrLater()) 109 if (base::mac::IsOSMountainLionOrLater())
110 balloon_manager = new NotificationUIManagerMac(local_state); 110 balloon_manager = new NotificationUIManagerMac(local_state);
111 else 111 else
112 balloon_manager = new BalloonNotificationUIManager(local_state); 112 balloon_manager = new BalloonNotificationUIManager(local_state);
113 balloon_manager->SetBalloonCollection(BalloonCollection::Create()); 113 balloon_manager->SetBalloonCollection(BalloonCollection::Create());
114 return balloon_manager; 114 return balloon_manager;
115 } 115 }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 notification->Click(); 327 notification->Click();
328 } 328 }
329 329
330 - (BOOL)userNotificationCenter:(NSUserNotificationCenter*)center 330 - (BOOL)userNotificationCenter:(NSUserNotificationCenter*)center
331 shouldPresentNotification:(id<CrUserNotification>)nsNotification { 331 shouldPresentNotification:(id<CrUserNotification>)nsNotification {
332 // Always display notifications, regardless of whether the app is foreground. 332 // Always display notifications, regardless of whether the app is foreground.
333 return YES; 333 return YES;
334 } 334 }
335 335
336 @end 336 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698