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_STUB_ALERT_DISPATCHER_MAC_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_STUB_ALERT_DISPATCHER_MAC_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_STUB_ALERT_DISPATCHER_MAC_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_STUB_ALERT_DISPATCHER_MAC_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #import "chrome/browser/notifications/alert_dispatcher_mac.h" | 10 #include <set> |
11 #include <string> | |
12 | |
13 #include "chrome/browser/notifications/alert_dispatcher_mac.h" | |
14 | |
15 namespace { | |
16 | |
17 using DisplayedNotificationsCallback = | |
Robert Sesek
2017/04/03 16:51:24
Why is this re-declared instead of using the one i
Miguel Garcia
2017/04/04 12:21:26
Moved to inlining as per Peter's comment about ano
| |
18 base::Callback<void(std::unique_ptr<std::set<std::string>>, | |
19 bool /* supports_synchronization */)>; | |
20 } // namespace | |
Peter Beverloo
2017/04/03 12:33:29
dito re: anonymous namespaces in header files
Miguel Garcia
2017/04/04 12:21:26
Acknowledged.
| |
11 | 21 |
12 @interface StubAlertDispatcher : NSObject<AlertDispatcher> | 22 @interface StubAlertDispatcher : NSObject<AlertDispatcher> |
13 | 23 |
14 - (void)dispatchNotification:(NSDictionary*)data; | 24 - (void)dispatchNotification:(NSDictionary*)data; |
Robert Sesek
2017/04/03 16:51:24
Similarly, you can just remove the AlertDispatcher
| |
15 | 25 |
16 - (void)closeNotificationWithId:(NSString*)notificationId | 26 - (void)closeNotificationWithId:(NSString*)notificationId |
17 withProfileId:(NSString*)profileId; | 27 withProfileId:(NSString*)profileId; |
18 | 28 |
19 - (void)closeAllNotifications; | 29 - (void)closeAllNotifications; |
20 | 30 |
31 - (void)getDisplayedAlertsForProfileId:(NSString*)profileId | |
32 withNotificationCenter: | |
33 (NSUserNotificationCenter*)notificationCenter | |
34 callback:(DisplayedNotificationsCallback)callback; | |
35 | |
21 // Stub specific methods. | 36 // Stub specific methods. |
22 - (NSArray*)alerts; | 37 - (NSArray*)alerts; |
23 | 38 |
24 @end | 39 @end |
25 | 40 |
26 #endif // CHROME_BROWSER_NOTIFICATIONS_STUB_ALERT_DISPATCHER_MAC_H_ | 41 #endif // CHROME_BROWSER_NOTIFICATIONS_STUB_ALERT_DISPATCHER_MAC_H_ |
OLD | NEW |