Chromium Code Reviews| 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|. | |
| 20 - (void)closeNotification:(NSString*)notificationId | |
|
Robert Sesek
2016/10/10 18:22:47
I'd name this -closeNotificationWithId:withProfile
Miguel Garcia
2016/10/11 11:55:41
Done.
| |
| 21 withProfile:(NSString*)profileId; | |
| 22 | |
| 23 // Closes all the alerts being displayed. | |
| 24 - (void)closeAllNotifications; | |
| 19 @end | 25 @end |
| 20 | 26 |
| 21 // Response protocol for the XPC notification service to notify Chrome of | 27 // Response protocol for the XPC notification service to notify Chrome of |
| 22 // notification interactions. | 28 // notification interactions. |
| 23 @protocol NotificationReply | 29 @protocol NotificationReply |
| 24 | 30 |
| 25 // |notificationResponseData| is generated through a | 31 // |notificationResponseData| is generated through a |
| 26 // NotificationResponseBuilder. | 32 // NotificationResponseBuilder. |
| 27 - (void)notificationClick:(NSDictionary*)notificationResponseData; | 33 - (void)notificationClick:(NSDictionary*)notificationResponseData; |
| 28 | 34 |
| 29 @end | 35 @end |
| 30 | 36 |
| 31 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ | 37 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ |
| OLD | NEW |