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

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

Issue 2479143003: Add tests for the XPC client. (Closed)
Patch Set: Created 4 years, 1 month 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.h
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.h b/chrome/browser/notifications/notification_platform_bridge_mac.h
index 7b8a892abbffba92841496f0d81d5afbe8d725e8..a279087b4324785eb4bd789e049fae81759785ee 100644
--- a/chrome/browser/notifications/notification_platform_bridge_mac.h
+++ b/chrome/browser/notifications/notification_platform_bridge_mac.h
@@ -11,12 +11,12 @@
#include "base/compiler_specific.h"
#include "base/mac/scoped_nsobject.h"
#include "base/macros.h"
+#include "chrome/browser/notifications/alert_dispatcher.h"
#include "chrome/browser/notifications/notification_common.h"
#include "chrome/browser/notifications/notification_platform_bridge.h"
class Notification;
@class NotificationCenterDelegate;
-@class NotificationRemoteDispatcher;
@class NSDictionary;
@class NSUserNotificationCenter;
@class NSXPCConnection;
@@ -26,8 +26,9 @@ class PrefService;
// send platform notifications to the the MacOSX notification center.
class NotificationPlatformBridgeMac : public NotificationPlatformBridge {
public:
- explicit NotificationPlatformBridgeMac(
- NSUserNotificationCenter* notification_center);
+ NotificationPlatformBridgeMac(NSUserNotificationCenter* notification_center,
+ id<AlertDispatcher> alert_dispatcher);
Robert Sesek 2016/11/07 17:51:18 What's the ownership of the alert_dispatcher here?
Miguel Garcia 2016/11/10 12:46:52 So it is owned by the NotificationPlatformBridgeMa
Robert Sesek 2016/11/10 23:52:41 Right.
Miguel Garcia 2016/11/11 15:26:40 Done.
+
~NotificationPlatformBridgeMac() override;
// NotificationPlatformBridge implementation.
@@ -36,6 +37,7 @@ class NotificationPlatformBridgeMac : public NotificationPlatformBridge {
const std::string& profile_id,
bool incognito,
const Notification& notification) override;
+
void Close(const std::string& profile_id,
const std::string& notification_id) override;
bool GetDisplayed(const std::string& profile_id,
@@ -59,8 +61,8 @@ class NotificationPlatformBridgeMac : public NotificationPlatformBridge {
NSUserNotificationCenter* notification_center_;
// The object in charge of dispatching remote notifications.
- base::scoped_nsobject<NotificationRemoteDispatcher>
- notification_remote_dispatcher_;
+ // id<AlertDispatcher>
+ base::scoped_nsobject<id> alert_dispatcher_;
Miguel Garcia 2016/11/07 14:24:14 I have not found a better way to define that the w
Robert Sesek 2016/11/07 17:51:18 scoped_nsprotocol<id<AlertDispatcher>> ?
Miguel Garcia 2016/11/10 12:46:52 That seems to expect an object of type id<AlertDis
Robert Sesek 2016/11/10 23:52:41 Did you try my suggestion? It should work: https:
Miguel Garcia 2016/11/11 15:26:40 I had misread your suggestion (scoped_nsobject vs
DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeMac);
};

Powered by Google App Engine
This is Rietveld 408576698