| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ | 6 #define CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #import "chrome/browser/ui/cocoa/notifications/xpc_mach_port.h" |
| 11 |
| 10 // Collection of protocols used for XPC communication between chrome | 12 // Collection of protocols used for XPC communication between chrome |
| 11 // and the alert notification xpc service. | 13 // and the alert notification xpc service. |
| 12 | 14 |
| 13 // Protocol for the XPC notification service. | 15 // Protocol for the XPC notification service. |
| 14 @protocol NotificationDelivery | 16 @protocol NotificationDelivery |
| 15 | 17 |
| 18 // Sets the Mach exception handler port to use for the XPCService. |
| 19 - (void)setMachExceptionPort:(CrXPCMachPort*)port; |
| 20 |
| 16 // |notificationData| is generated using a NofiticationBuilder object. | 21 // |notificationData| is generated using a NofiticationBuilder object. |
| 17 - (void)deliverNotification:(NSDictionary*)notificationData; | 22 - (void)deliverNotification:(NSDictionary*)notificationData; |
| 18 | 23 |
| 19 // Closes an alert with the given |notificationId| and |profileId|. | 24 // Closes an alert with the given |notificationId| and |profileId|. |
| 20 - (void)closeNotificationWithId:(NSString*)notificationId | 25 - (void)closeNotificationWithId:(NSString*)notificationId |
| 21 withProfileId:(NSString*)profileId; | 26 withProfileId:(NSString*)profileId; |
| 22 | 27 |
| 23 // Closes all the alerts being displayed. | 28 // Closes all the alerts being displayed. |
| 24 - (void)closeAllNotifications; | 29 - (void)closeAllNotifications; |
| 30 |
| 25 @end | 31 @end |
| 26 | 32 |
| 27 // Response protocol for the XPC notification service to notify Chrome of | 33 // Response protocol for the XPC notification service to notify Chrome of |
| 28 // notification interactions. | 34 // notification interactions. |
| 29 @protocol NotificationReply | 35 @protocol NotificationReply |
| 30 | 36 |
| 31 // |notificationResponseData| is generated through a | 37 // |notificationResponseData| is generated through a |
| 32 // NotificationResponseBuilder. | 38 // NotificationResponseBuilder. |
| 33 - (void)notificationClick:(NSDictionary*)notificationResponseData; | 39 - (void)notificationClick:(NSDictionary*)notificationResponseData; |
| 34 | 40 |
| 35 @end | 41 @end |
| 36 | 42 |
| 37 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ | 43 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ |
| OLD | NEW |