OLD | NEW |
---|---|
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 Loading... | |
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 | 101 |
Peter Beverloo
2017/02/24 16:12:24
nit: drop the linebreak
Miguel Garcia
2017/03/22 22:00:09
Done.
| |
102 void GetDisplayedNotificationsAsync( | |
103 content::BrowserContext* browser_context, | |
104 const NotificationCommon::NotificationResultCallback& callback) override; | |
105 | |
102 private: | 106 private: |
103 friend struct base::DefaultSingletonTraits<PlatformNotificationServiceImpl>; | 107 friend struct base::DefaultSingletonTraits<PlatformNotificationServiceImpl>; |
104 friend class PlatformNotificationServiceBrowserTest; | 108 friend class PlatformNotificationServiceBrowserTest; |
105 friend class PlatformNotificationServiceTest; | 109 friend class PlatformNotificationServiceTest; |
106 friend class PushMessagingBrowserTest; | 110 friend class PushMessagingBrowserTest; |
107 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, | 111 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, |
108 CreateNotificationFromData); | 112 CreateNotificationFromData); |
109 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, | 113 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, |
110 DisplayNameForContextMessage); | 114 DisplayNameForContextMessage); |
111 | 115 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 // programmatically to avoid dispatching close events for them. | 162 // programmatically to avoid dispatching close events for them. |
159 std::unordered_set<std::string> closed_notifications_; | 163 std::unordered_set<std::string> closed_notifications_; |
160 | 164 |
161 // Only set and used for tests, owned by the caller in that case. | 165 // Only set and used for tests, owned by the caller in that case. |
162 NotificationDisplayService* test_display_service_; | 166 NotificationDisplayService* test_display_service_; |
163 | 167 |
164 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); | 168 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); |
165 }; | 169 }; |
166 | 170 |
167 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ | 171 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ |
OLD | NEW |