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_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #include "chrome/browser/notifications/notification_common.h" | |
| 11 | |
| 10 // Interface to communicate with the Alert XPC service. | 12 // Interface to communicate with the Alert XPC service. |
| 11 @protocol AlertDispatcher<NSObject> | 13 @protocol AlertDispatcher<NSObject> |
| 12 | 14 |
| 13 // Deliver a notification to the XPC service to be displayed as an alert. | 15 // Deliver a notification to the XPC service to be displayed as an alert. |
| 14 - (void)dispatchNotification:(NSDictionary*)data; | 16 - (void)dispatchNotification:(NSDictionary*)data; |
| 15 | 17 |
| 16 // Close a notification for a given |notificationId| and |profileId|. | 18 // Close a notification for a given |notificationId| and |profileId|. |
| 17 - (void)closeNotificationWithId:(NSString*)notificationId | 19 - (void)closeNotificationWithId:(NSString*)notificationId |
| 18 withProfileId:(NSString*)profileId; | 20 withProfileId:(NSString*)profileId; |
| 19 | 21 |
| 20 // Close all notifications. | 22 // Close all notifications. |
| 21 - (void)closeAllNotifications; | 23 - (void)closeAllNotifications; |
| 22 | 24 |
| 25 // Get currently displayed notifications. | |
| 26 - (void)getDisplayedAlertIds:(NSString*)profileId | |
|
Robert Sesek
2017/02/24 22:38:05
Maybe getDisplayedAlertsForProfileId:withLocalNoti
Miguel Garcia
2017/03/22 22:00:06
Done, but shouldn't it be withCallback or andCallb
Robert Sesek
2017/04/03 16:51:24
Methods with a lot of parameters get too wordy if
Miguel Garcia
2017/04/04 12:21:26
Acknowledged.
| |
| 27 withLocalNotifications:(NSArray*)localNotifications | |
| 28 withCallback: | |
| 29 (NotificationCommon::NotificationResultCallback)callback; | |
| 23 @end | 30 @end |
| 24 | 31 |
| 25 #endif // CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_ | 32 #endif // CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_ |
| OLD | NEW |