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 // Collection of protocols used for XPC communication between chrome | 10 // Collection of protocols used for XPC communication between chrome |
11 // and the alert notification xpc service. | 11 // and the alert notification xpc service. |
12 | 12 |
13 // Protocol for the XPC notification service. | 13 // Protocol for the XPC notification service. |
14 @protocol NotificationDelivery | 14 @protocol NotificationDelivery |
15 | 15 |
16 // |notificationData| is generated using a NofiticationBuilder object. | 16 // |notificationData| is generated using a NofiticationBuilder object. |
17 - (void)deliverNotification:(NSDictionary*)notificationData; | 17 - (void)deliverNotification:(NSDictionary*)notificationData; |
18 | 18 |
19 // Closes an alert with the given |notificationId| and |profileId|. | 19 // Closes an alert with the given |notificationId| and |profileId|. |
20 - (void)closeNotificationWithId:(NSString*)notificationId | 20 - (void)closeNotificationWithId:(NSString*)notificationId |
21 withProfileId:(NSString*)profileId; | 21 withProfileId:(NSString*)profileId; |
22 | 22 |
23 // Closes all the alerts being displayed. | 23 // Closes all the alerts being displayed. |
24 - (void)closeAllNotifications; | 24 - (void)closeAllNotifications; |
25 | |
26 // Returns the alerts currently being displayed for |profileId|. | |
Peter Beverloo
2017/02/24 16:12:24
nit: // Will invoke |reply| with the alerts...
Miguel Garcia
2017/03/22 22:00:10
Done.
| |
27 - (void)getDisplayedAlertIds:(NSString*)profileId | |
Robert Sesek
2017/02/24 22:38:05
Similarly name: getDisplayedAlertsForProfileId:wit
Miguel Garcia
2017/03/22 22:00:10
Done.
| |
28 withReply:(void (^)(NSArray*))reply; | |
25 @end | 29 @end |
26 | 30 |
27 // Response protocol for the XPC notification service to notify Chrome of | 31 // Response protocol for the XPC notification service to notify Chrome of |
28 // notification interactions. | 32 // notification interactions. |
29 @protocol NotificationReply | 33 @protocol NotificationReply |
30 | 34 |
31 // |notificationResponseData| is generated through a | 35 // |notificationResponseData| is generated through a |
32 // NotificationResponseBuilder. | 36 // NotificationResponseBuilder. |
33 - (void)notificationClick:(NSDictionary*)notificationResponseData; | 37 - (void)notificationClick:(NSDictionary*)notificationResponseData; |
34 | 38 |
35 @end | 39 @end |
36 | 40 |
37 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ | 41 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ |
OLD | NEW |