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 #include <map> | 9 #include <map> |
johnme
2015/05/14 15:22:32
+<set> & <string>
Peter Beverloo
2015/05/14 16:03:34
Done.
| |
10 | 10 |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "chrome/browser/notifications/notification.h" | 14 #include "chrome/browser/notifications/notification.h" |
15 #include "content/public/browser/platform_notification_service.h" | 15 #include "content/public/browser/platform_notification_service.h" |
16 #include "content/public/common/persistent_notification_status.h" | 16 #include "content/public/common/persistent_notification_status.h" |
17 | 17 |
18 class NotificationDelegate; | 18 class NotificationDelegate; |
19 class NotificationUIManager; | 19 class NotificationUIManager; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 base::Closure* cancel_callback) override; | 71 base::Closure* cancel_callback) override; |
72 void DisplayPersistentNotification( | 72 void DisplayPersistentNotification( |
73 content::BrowserContext* browser_context, | 73 content::BrowserContext* browser_context, |
74 int64_t persistent_notification_id, | 74 int64_t persistent_notification_id, |
75 const GURL& origin, | 75 const GURL& origin, |
76 const SkBitmap& icon, | 76 const SkBitmap& icon, |
77 const content::PlatformNotificationData& notification_data) override; | 77 const content::PlatformNotificationData& notification_data) override; |
78 void ClosePersistentNotification( | 78 void ClosePersistentNotification( |
79 content::BrowserContext* browser_context, | 79 content::BrowserContext* browser_context, |
80 int64_t persistent_notification_id) override; | 80 int64_t persistent_notification_id) override; |
81 bool GetDisplayedPersistentNotifications( | |
82 content::BrowserContext* browser_context, | |
83 std::set<std::string>* displayed_notifications) override; | |
81 | 84 |
82 private: | 85 private: |
83 friend struct DefaultSingletonTraits<PlatformNotificationServiceImpl>; | 86 friend struct DefaultSingletonTraits<PlatformNotificationServiceImpl>; |
84 friend class PlatformNotificationServiceBrowserTest; | 87 friend class PlatformNotificationServiceBrowserTest; |
85 friend class PlatformNotificationServiceTest; | 88 friend class PlatformNotificationServiceTest; |
86 friend class PushMessagingBrowserTest; | 89 friend class PushMessagingBrowserTest; |
87 FRIEND_TEST_ALL_PREFIXES( | 90 FRIEND_TEST_ALL_PREFIXES( |
88 PlatformNotificationServiceTest, DisplayNameForOrigin); | 91 PlatformNotificationServiceTest, DisplayNameForOrigin); |
89 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, | 92 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, |
90 TestWebOriginDisplayName); | 93 TestWebOriginDisplayName); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 NotificationUIManager* notification_ui_manager_for_tests_; | 126 NotificationUIManager* notification_ui_manager_for_tests_; |
124 | 127 |
125 // Mapping between a persistent notification id and the id of the associated | 128 // Mapping between a persistent notification id and the id of the associated |
126 // message_center::Notification object. Must only be used on the UI thread. | 129 // message_center::Notification object. Must only be used on the UI thread. |
127 std::map<int64_t, std::string> persistent_notifications_; | 130 std::map<int64_t, std::string> persistent_notifications_; |
128 | 131 |
129 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); | 132 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); |
130 }; | 133 }; |
131 | 134 |
132 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ | 135 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ |
OLD | NEW |