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

Side by Side Diff: chrome/browser/notifications/platform_notification_service_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 base::Closure* cancel_callback) override; 88 base::Closure* cancel_callback) override;
89 void DisplayPersistentNotification( 89 void DisplayPersistentNotification(
90 content::BrowserContext* browser_context, 90 content::BrowserContext* browser_context,
91 const std::string& notification_id, 91 const std::string& notification_id,
92 const GURL& service_worker_scope, 92 const GURL& service_worker_scope,
93 const GURL& origin, 93 const GURL& origin,
94 const content::PlatformNotificationData& notification_data, 94 const content::PlatformNotificationData& notification_data,
95 const content::NotificationResources& notification_resources) override; 95 const content::NotificationResources& notification_resources) override;
96 void ClosePersistentNotification(content::BrowserContext* browser_context, 96 void ClosePersistentNotification(content::BrowserContext* browser_context,
97 const std::string& notification_id) override; 97 const std::string& notification_id) override;
98 bool GetDisplayedNotifications( 98 void GetDisplayedNotifications(
99 content::BrowserContext* browser_context, 99 content::BrowserContext* browser_context,
100 std::set<std::string>* displayed_notifications) override; 100 const DisplayedNotificationsCallback& callback) override;
101 101
102 private: 102 private:
103 friend struct base::DefaultSingletonTraits<PlatformNotificationServiceImpl>; 103 friend struct base::DefaultSingletonTraits<PlatformNotificationServiceImpl>;
104 friend class PlatformNotificationServiceBrowserTest; 104 friend class PlatformNotificationServiceBrowserTest;
105 friend class PlatformNotificationServiceTest; 105 friend class PlatformNotificationServiceTest;
106 friend class PushMessagingBrowserTest; 106 friend class PushMessagingBrowserTest;
107 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, 107 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest,
108 CreateNotificationFromData); 108 CreateNotificationFromData);
109 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, 109 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest,
110 DisplayNameForContextMessage); 110 DisplayNameForContextMessage);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // programmatically to avoid dispatching close events for them. 158 // programmatically to avoid dispatching close events for them.
159 std::unordered_set<std::string> closed_notifications_; 159 std::unordered_set<std::string> closed_notifications_;
160 160
161 // Only set and used for tests, owned by the caller in that case. 161 // Only set and used for tests, owned by the caller in that case.
162 NotificationDisplayService* test_display_service_; 162 NotificationDisplayService* test_display_service_;
163 163
164 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); 164 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl);
165 }; 165 };
166 166
167 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 167 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698