OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DESKTOP_NOTIFICATION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 void GetNotificationsSettings(ContentSettingsForOneType* settings); | 144 void GetNotificationsSettings(ContentSettingsForOneType* settings); |
145 | 145 |
146 // Clears the notifications setting for the given pattern. | 146 // Clears the notifications setting for the given pattern. |
147 void ClearSetting(const ContentSettingsPattern& pattern); | 147 void ClearSetting(const ContentSettingsPattern& pattern); |
148 | 148 |
149 // Clears the sets of explicitly allowed and denied origins. | 149 // Clears the sets of explicitly allowed and denied origins. |
150 void ResetAllOrigins(); | 150 void ResetAllOrigins(); |
151 | 151 |
152 ContentSetting GetContentSetting(const GURL& origin); | 152 ContentSetting GetContentSetting(const GURL& origin); |
153 | 153 |
154 // Checks to see if a given origin has permission to create desktop | |
155 // notifications. | |
156 blink::WebNotificationPresenter::Permission | |
157 HasPermission(const GURL& origin); | |
158 | |
159 // Returns true if the notifier with |notifier_id| is allowed to send | 154 // Returns true if the notifier with |notifier_id| is allowed to send |
160 // notifications. | 155 // notifications. |
161 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id); | 156 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id); |
162 | 157 |
163 // Updates the availability of the notifier. | 158 // Updates the availability of the notifier. |
164 void SetNotifierEnabled(const message_center::NotifierId& notifier_id, | 159 void SetNotifierEnabled(const message_center::NotifierId& notifier_id, |
165 bool enabled); | 160 bool enabled); |
166 | 161 |
167 // Adds in a the welcome notification if required for components built | 162 // Adds in a the welcome notification if required for components built |
168 // into Chrome that show notifications like Chrome Now. | 163 // into Chrome that show notifications like Chrome Now. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // Registrar for the other kind of notifications (event signaling). | 227 // Registrar for the other kind of notifications (event signaling). |
233 content::NotificationRegistrar registrar_; | 228 content::NotificationRegistrar registrar_; |
234 | 229 |
235 // Welcome Notification | 230 // Welcome Notification |
236 scoped_ptr<WelcomeNotification> welcome_notification; | 231 scoped_ptr<WelcomeNotification> welcome_notification; |
237 | 232 |
238 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); | 233 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); |
239 }; | 234 }; |
240 | 235 |
241 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ | 236 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ |
OLD | NEW |