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

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

Issue 2714743002: Retrive displayed notifications asynchronously
Patch Set: apply review comments from https://codereview.chromium.org/2709213005/ 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool GetDisplayedNotifications(
99 content::BrowserContext* browser_context, 99 content::BrowserContext* browser_context,
100 std::set<std::string>* displayed_notifications) override; 100 std::set<std::string>* displayed_notifications) override;
101 void GetDisplayedNotificationsAsync(
102 content::BrowserContext* browser_context,
103 const NotificationCommon::NotificationResultCallback& callback) override;
101 104
102 private: 105 private:
103 friend struct base::DefaultSingletonTraits<PlatformNotificationServiceImpl>; 106 friend struct base::DefaultSingletonTraits<PlatformNotificationServiceImpl>;
104 friend class PlatformNotificationServiceBrowserTest; 107 friend class PlatformNotificationServiceBrowserTest;
105 friend class PlatformNotificationServiceTest; 108 friend class PlatformNotificationServiceTest;
106 friend class PushMessagingBrowserTest; 109 friend class PushMessagingBrowserTest;
107 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, 110 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest,
108 CreateNotificationFromData); 111 CreateNotificationFromData);
109 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, 112 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest,
110 DisplayNameForContextMessage); 113 DisplayNameForContextMessage);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // programmatically to avoid dispatching close events for them. 161 // programmatically to avoid dispatching close events for them.
159 std::unordered_set<std::string> closed_notifications_; 162 std::unordered_set<std::string> closed_notifications_;
160 163
161 // Only set and used for tests, owned by the caller in that case. 164 // Only set and used for tests, owned by the caller in that case.
162 NotificationDisplayService* test_display_service_; 165 NotificationDisplayService* test_display_service_;
163 166
164 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); 167 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl);
165 }; 168 };
166 169
167 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 170 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698