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

Side by Side Diff: chrome/browser/ui/cocoa/notifications/notification_delivery.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 // 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 #import "chrome/browser/ui/cocoa/notifications/xpc_mach_port.h" 10 #import "chrome/browser/ui/cocoa/notifications/xpc_mach_port.h"
11 11
12 // Collection of protocols used for XPC communication between chrome 12 // Collection of protocols used for XPC communication between chrome
13 // and the alert notification xpc service. 13 // and the alert notification xpc service.
14 14
15 // Protocol for the XPC notification service. 15 // Protocol for the XPC notification service.
16 @protocol NotificationDelivery 16 @protocol NotificationDelivery
17 17
18 // Sets the Mach exception handler port to use for the XPCService. 18 // Sets the Mach exception handler port to use for the XPCService.
19 - (void)setMachExceptionPort:(CrXPCMachPort*)port; 19 - (void)setMachExceptionPort:(CrXPCMachPort*)port;
20 20
21 // |notificationData| is generated using a NofiticationBuilder object. 21 // |notificationData| is generated using a NofiticationBuilder object.
22 - (void)deliverNotification:(NSDictionary*)notificationData; 22 - (void)deliverNotification:(NSDictionary*)notificationData;
23 23
24 // Closes an alert with the given |notificationId| and |profileId|. 24 // Closes an alert with the given |notificationId| and |profileId|.
25 - (void)closeNotificationWithId:(NSString*)notificationId 25 - (void)closeNotificationWithId:(NSString*)notificationId
26 withProfileId:(NSString*)profileId; 26 withProfileId:(NSString*)profileId;
27 27
28 // Closes all the alerts being displayed. 28 // Closes all the alerts being displayed.
29 - (void)closeAllNotifications; 29 - (void)closeAllNotifications;
30
31 // Will invoke |reply| with the alerts for |profileId| being displayed.
Robert Sesek 2017/04/03 16:51:24 … alerts "as an array of NSString notification IDs
Miguel Garcia 2017/04/04 12:21:26 Done.
32 - (void)getDisplayedAlertsForProfileId:(NSString*)profileId
33 withReply:(void (^)(NSArray*))reply;
30 @end 34 @end
31 35
32 // Response protocol for the XPC notification service to notify Chrome of 36 // Response protocol for the XPC notification service to notify Chrome of
33 // notification interactions. 37 // notification interactions.
34 @protocol NotificationReply 38 @protocol NotificationReply
35 39
36 // |notificationResponseData| is generated through a 40 // |notificationResponseData| is generated through a
37 // NotificationResponseBuilder. 41 // NotificationResponseBuilder.
38 - (void)notificationClick:(NSDictionary*)notificationResponseData; 42 - (void)notificationClick:(NSDictionary*)notificationResponseData;
39 43
40 @end 44 @end
41 45
42 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_ 46 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_DELIVERY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698