Chromium Code Reviews| 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 b48f1896242ed15cd148a6a7da6496afe8c9acb1..f196bfbd43373dbe6ec7c101d79f4e735b32b73e 100644 |
| --- a/chrome/browser/notifications/notification_platform_bridge_mac.h |
| +++ b/chrome/browser/notifications/notification_platform_bridge_mac.h |
| @@ -19,6 +19,18 @@ class Notification; |
| @class NSDictionary; |
| @class NSUserNotificationCenter; |
| class PrefService; |
| +@class NSXPCConnection; |
| + |
| +// Interface to communicate with the Alert XPC service. |
|
Peter Beverloo
2016/07/19 17:31:40
This could use a little bit more colour to explain
|
| +@interface NotificationRemoteDispatcher : NSObject |
| + |
| +// The connection to the XPC server in charge of delivering alerts |
|
Peter Beverloo
2016/07/19 17:31:40
Here, and lines 56, 68 and 71: sentences end with
|
| +@property(readonly) NSXPCConnection* xpcConnection; |
| + |
| +- (instancetype)init; |
| +- (void)dispatchNotification:(NSDictionary*)data; |
| + |
| +@end |
| // This class is an implementation of NotificationPlatformBridge that will |
| // send platform notifications to the the MacOSX notification center. |
| @@ -41,6 +53,9 @@ class NotificationPlatformBridgeMac : public NotificationPlatformBridge { |
| std::set<std::string>* notifications) const override; |
| bool SupportsNotificationCenter() const override; |
| + // Processes a notification response |
| + static void ProcessNotificationResponse(NSDictionary* response); |
| + |
| // Validates contents of the |response| dictionary as received from the system |
| // when a notification gets activated. |
| static bool VerifyNotificationData(NSDictionary* response) WARN_UNUSED_RESULT; |
| @@ -49,9 +64,14 @@ class NotificationPlatformBridgeMac : public NotificationPlatformBridge { |
| // Cocoa class that receives callbacks from the NSUserNotificationCenter. |
| base::scoped_nsobject<NotificationCenterDelegate> delegate_; |
| - // The notification center to use, this can be overriden in tests |
| + // The notification center to use for local banner notifications, |
| + // this can be overriden in tests |
| NSUserNotificationCenter* notification_center_; |
| + // The object in charge of dispatching remote notifications |
| + base::scoped_nsobject<NotificationRemoteDispatcher> |
| + notification_remote_dispatcher_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeMac); |
| }; |