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

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

Issue 1925803002: Rename NotificationUIManagerMac to NotificationPlatformBridgeMac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_platform_bridge_mac.mm
diff --git a/chrome/browser/notifications/notification_ui_manager_mac.mm b/chrome/browser/notifications/notification_platform_bridge_mac.mm
similarity index 95%
rename from chrome/browser/notifications/notification_ui_manager_mac.mm
rename to chrome/browser/notifications/notification_platform_bridge_mac.mm
index 1f343ee7407b4aae3d0f6d773a817f6af43787ad..c0ec36c1d203c11f67ef01038e6844e33f3e1cce 100644
--- a/chrome/browser/notifications/notification_ui_manager_mac.mm
+++ b/chrome/browser/notifications/notification_platform_bridge_mac.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/notifications/notification_ui_manager_mac.h"
+#include "chrome/browser/notifications/notification_platform_bridge_mac.h"
#include <utility>
@@ -55,7 +55,7 @@ NSString* const kNotificationIncognitoKey = @"notification_incognito";
// static
NotificationPlatformBridge* NotificationPlatformBridge::Create() {
- return new NotificationUIManagerMac(
+ return new NotificationPlatformBridgeMac(
[NSUserNotificationCenter defaultUserNotificationCenter]);
}
@@ -68,21 +68,21 @@ NotificationPlatformBridge* NotificationPlatformBridge::Create() {
// /////////////////////////////////////////////////////////////////////////////
-NotificationUIManagerMac::NotificationUIManagerMac(
+NotificationPlatformBridgeMac::NotificationPlatformBridgeMac(
NSUserNotificationCenter* notification_center)
: delegate_([NotificationCenterDelegate alloc]),
notification_center_(notification_center) {
[notification_center_ setDelegate:delegate_.get()];
}
-NotificationUIManagerMac::~NotificationUIManagerMac() {
+NotificationPlatformBridgeMac::~NotificationPlatformBridgeMac() {
[notification_center_ setDelegate:nil];
// TODO(miguelg) lift this restriction if possible.
[notification_center_ removeAllDeliveredNotifications];
}
-void NotificationUIManagerMac::Display(const std::string& notification_id,
+void NotificationPlatformBridgeMac::Display(const std::string& notification_id,
const std::string& profile_id,
Peter Beverloo 2016/04/27 21:26:58 nit: alignment
Miguel Garcia 2016/04/27 21:35:41 Done.
bool incognito,
const Notification& notification) {
@@ -179,9 +179,10 @@ void NotificationUIManagerMac::Display(const std::string& notification_id,
};
[notification_center_ deliverNotification:toast];
+ notification.delegate()->Display();
Peter Beverloo 2016/04/27 21:26:58 Merge conflict? You unified this in the display ma
Miguel Garcia 2016/04/27 21:35:41 mm yes I don't know how this one sneaked in. Will
}
-void NotificationUIManagerMac::Close(const std::string& profile_id,
+void NotificationPlatformBridgeMac::Close(const std::string& profile_id,
const std::string& notification_id) {
Peter Beverloo 2016/04/27 21:26:58 nit: alignment
Miguel Garcia 2016/04/27 21:35:41 Done.
NSString* candidate_id = base::SysUTF8ToNSString(notification_id);
@@ -201,7 +202,7 @@ void NotificationUIManagerMac::Close(const std::string& profile_id,
}
}
-bool NotificationUIManagerMac::GetDisplayed(
+bool NotificationPlatformBridgeMac::GetDisplayed(
const std::string& profile_id,
bool incognito,
std::set<std::string>* notifications) const {
@@ -219,7 +220,7 @@ bool NotificationUIManagerMac::GetDisplayed(
return true;
}
-bool NotificationUIManagerMac::SupportsNotificationCenter() const {
+bool NotificationPlatformBridgeMac::SupportsNotificationCenter() const {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698