Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: chrome/browser/notifications/alert_dispatcher_mac.h

Issue 2709213005: [Mac] Add XPC alerts to GetDisplayedNotifications (Closed)
Patch Set: Rebase after making the whole flow async in a different patch Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1
Peter Beverloo 2017/04/03 12:33:28 revert
Miguel Garcia 2017/04/04 12:21:26 Done.
1 // Copyright 2016 The Chromium Authors. All rights reserved. 2 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 4 // found in the LICENSE file.
4 5
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_ 6 #ifndef CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_ 7 #define CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_
7 8
8 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
9 10
11 #include "base/callback_forward.h"
12
13 namespace {
14
15 using DisplayedNotificationsCallback =
Robert Sesek 2017/04/03 16:51:24 Why isn't this using NotificationDisplayService::D
Miguel Garcia 2017/04/04 12:21:26 Do you think it's worth including the display_serv
Robert Sesek 2017/04/04 15:31:48 The supports_synchronization parameter is complete
16 base::Callback<void(std::unique_ptr<std::set<std::string>>,
17 bool /* supports_synchronization */)>;
18 } // namespace
Peter Beverloo 2017/04/03 12:33:28 We shouldn't use anonymous namespaces in header fi
Miguel Garcia 2017/04/04 12:21:26 I went with inlining (which is a pity since I need
Robert Sesek 2017/04/04 15:31:48 Why can't you just declare this in the header with
19
10 // Interface to communicate with the Alert XPC service. 20 // Interface to communicate with the Alert XPC service.
11 @protocol AlertDispatcher<NSObject> 21 @protocol AlertDispatcher<NSObject>
12 22
13 // Deliver a notification to the XPC service to be displayed as an alert. 23 // Deliver a notification to the XPC service to be displayed as an alert.
14 - (void)dispatchNotification:(NSDictionary*)data; 24 - (void)dispatchNotification:(NSDictionary*)data;
15 25
16 // Close a notification for a given |notificationId| and |profileId|. 26 // Close a notification for a given |notificationId| and |profileId|.
17 - (void)closeNotificationWithId:(NSString*)notificationId 27 - (void)closeNotificationWithId:(NSString*)notificationId
18 withProfileId:(NSString*)profileId; 28 withProfileId:(NSString*)profileId;
19 29
20 // Close all notifications. 30 // Close all notifications.
21 - (void)closeAllNotifications; 31 - (void)closeAllNotifications;
22 32
33 // Get currently displayed notifications.
34 - (void)getDisplayedAlertsForProfileId:(NSString*)profileId
35 withNotificationCenter:
36 (NSUserNotificationCenter*)notificationCenter
37 callback:(DisplayedNotificationsCallback)callback;
23 @end 38 @end
24 39
25 #endif // CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_ 40 #endif // CHROME_BROWSER_NOTIFICATIONS_ALERT_DISPATCHER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698