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 "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const SkBitmap& icon, | 68 const SkBitmap& icon, |
69 const content::PlatformNotificationData& notification_data) override; | 69 const content::PlatformNotificationData& notification_data) override; |
70 void ClosePersistentNotification( | 70 void ClosePersistentNotification( |
71 content::BrowserContext* browser_context, | 71 content::BrowserContext* browser_context, |
72 const std::string& persistent_notification_id) override; | 72 const std::string& persistent_notification_id) override; |
73 | 73 |
74 private: | 74 private: |
75 friend struct DefaultSingletonTraits<PlatformNotificationServiceImpl>; | 75 friend struct DefaultSingletonTraits<PlatformNotificationServiceImpl>; |
76 friend class PlatformNotificationServiceBrowserTest; | 76 friend class PlatformNotificationServiceBrowserTest; |
77 friend class PlatformNotificationServiceTest; | 77 friend class PlatformNotificationServiceTest; |
78 friend class gcm::PushMessagingBrowserTest; | 78 friend class PushMessagingBrowserTest; |
79 FRIEND_TEST_ALL_PREFIXES( | 79 FRIEND_TEST_ALL_PREFIXES( |
80 PlatformNotificationServiceTest, DisplayNameForOrigin); | 80 PlatformNotificationServiceTest, DisplayNameForOrigin); |
81 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, | 81 FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest, |
82 TestWebOriginDisplayName); | 82 TestWebOriginDisplayName); |
83 | 83 |
84 PlatformNotificationServiceImpl(); | 84 PlatformNotificationServiceImpl(); |
85 ~PlatformNotificationServiceImpl() override; | 85 ~PlatformNotificationServiceImpl() override; |
86 | 86 |
87 // Creates a new Web Notification-based Notification object. | 87 // Creates a new Web Notification-based Notification object. |
88 // TODO(peter): |delegate| can be a scoped_refptr, but properly passing this | 88 // TODO(peter): |delegate| can be a scoped_refptr, but properly passing this |
(...skipping 22 matching lines...) Expand all Loading... |
111 static base::string16 WebOriginDisplayName(const GURL& origin, | 111 static base::string16 WebOriginDisplayName(const GURL& origin, |
112 const std::string& languages); | 112 const std::string& languages); |
113 | 113 |
114 // Weak reference. Ownership maintains with the test. | 114 // Weak reference. Ownership maintains with the test. |
115 NotificationUIManager* notification_ui_manager_for_tests_; | 115 NotificationUIManager* notification_ui_manager_for_tests_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); | 117 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); |
118 }; | 118 }; |
119 | 119 |
120 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ | 120 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ |
OLD | NEW |