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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 // used by tests. Tests are responsible for cleaning up after themselves. | 90 // used by tests. Tests are responsible for cleaning up after themselves. |
91 void SetNotificationUIManagerForTesting(NotificationUIManager* manager); | 91 void SetNotificationUIManagerForTesting(NotificationUIManager* manager); |
92 | 92 |
93 // Returns a display name for an origin in the process id, to be used in | 93 // Returns a display name for an origin in the process id, to be used in |
94 // permission infobar or on the frame of the notification toast. Different | 94 // permission infobar or on the frame of the notification toast. Different |
95 // from the origin itself when dealing with extensions. | 95 // from the origin itself when dealing with extensions. |
96 base::string16 DisplayNameForOriginInProcessId(Profile* profile, | 96 base::string16 DisplayNameForOriginInProcessId(Profile* profile, |
97 const GURL& origin, | 97 const GURL& origin, |
98 int process_id) const; | 98 int process_id) const; |
99 | 99 |
100 #if defined(ENABLE_EXTENSIONS) | |
101 bool ExtensionDisplayName(Profile* profile, | |
102 const GURL& origin, | |
103 int process_id, | |
104 base::string16* out) const; | |
105 #endif | |
106 | |
107 static base::string16 OriginDisplayName(const GURL& origin, | |
Peter Beverloo
2015/01/10 00:03:33
Muh. I feel like this shouldn't be something in ou
dewittj
2015/01/13 22:18:01
right, that's the reason this patch has been in li
Peter Beverloo
2015/01/14 19:18:14
Agreed.
| |
108 const std::string& languages); | |
109 | |
100 // Weak reference. Ownership maintains with the test. | 110 // Weak reference. Ownership maintains with the test. |
101 NotificationUIManager* notification_ui_manager_for_tests_; | 111 NotificationUIManager* notification_ui_manager_for_tests_; |
102 | 112 |
103 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); | 113 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); |
104 }; | 114 }; |
105 | 115 |
106 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ | 116 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ |
OLD | NEW |