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

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

Issue 2749453002: Make GetDisplayedNotifications asynchronous. (Closed)
Patch Set: review 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_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 20 matching lines...) Expand all
31 Profile* profile, 31 Profile* profile,
32 NotificationPlatformBridge* notification_bridge); 32 NotificationPlatformBridge* notification_bridge);
33 ~NativeNotificationDisplayService() override; 33 ~NativeNotificationDisplayService() override;
34 34
35 // NotificationDisplayService implementation. 35 // NotificationDisplayService implementation.
36 void Display(NotificationCommon::Type notification_type, 36 void Display(NotificationCommon::Type notification_type,
37 const std::string& notification_id, 37 const std::string& notification_id,
38 const Notification& notification) override; 38 const Notification& notification) override;
39 void Close(NotificationCommon::Type notification_type, 39 void Close(NotificationCommon::Type notification_type,
40 const std::string& notification_id) override; 40 const std::string& notification_id) override;
41 bool GetDisplayed(std::set<std::string>* notifications) const override; 41 void GetDisplayed(
42 const DisplayedNotificationsCallback& callback) const override;
42 43
43 // Used by the notification bridge to propagate back events (click, close...). 44 // Used by the notification bridge to propagate back events (click, close...).
44 void ProcessNotificationOperation(NotificationCommon::Operation operation, 45 void ProcessNotificationOperation(NotificationCommon::Operation operation,
45 NotificationCommon::Type notification_type, 46 NotificationCommon::Type notification_type,
46 const std::string& origin, 47 const std::string& origin,
47 const std::string& notification_id, 48 const std::string& notification_id,
48 int action_index, 49 int action_index,
49 const base::NullableString16& reply); 50 const base::NullableString16& reply);
50 51
51 // Registers an implementation object to handle notification operations 52 // Registers an implementation object to handle notification operations
(...skipping 10 matching lines...) Expand all
62 63
63 Profile* profile_; 64 Profile* profile_;
64 NotificationPlatformBridge* notification_bridge_; 65 NotificationPlatformBridge* notification_bridge_;
65 std::map<NotificationCommon::Type, std::unique_ptr<NotificationHandler>> 66 std::map<NotificationCommon::Type, std::unique_ptr<NotificationHandler>>
66 notification_handlers_; 67 notification_handlers_;
67 68
68 DISALLOW_COPY_AND_ASSIGN(NativeNotificationDisplayService); 69 DISALLOW_COPY_AND_ASSIGN(NativeNotificationDisplayService);
69 }; 70 };
70 71
71 #endif // CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_ 72 #endif // CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698