OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // shown. | 72 // shown. |
73 bool CancelDesktopNotification(int process_id, | 73 bool CancelDesktopNotification(int process_id, |
74 int route_id, | 74 int route_id, |
75 int notification_id); | 75 int notification_id); |
76 | 76 |
77 // Methods to setup and modify permission preferences. | 77 // Methods to setup and modify permission preferences. |
78 void GrantPermission(const GURL& origin); | 78 void GrantPermission(const GURL& origin); |
79 void DenyPermission(const GURL& origin); | 79 void DenyPermission(const GURL& origin); |
80 | 80 |
81 // NotificationObserver implementation. | 81 // NotificationObserver implementation. |
82 virtual void Observe(NotificationType type, | 82 virtual void Observe(int type, |
83 const NotificationSource& source, | 83 const NotificationSource& source, |
84 const NotificationDetails& details); | 84 const NotificationDetails& details); |
85 | 85 |
86 NotificationsPrefsCache* prefs_cache() { return prefs_cache_; } | 86 NotificationsPrefsCache* prefs_cache() { return prefs_cache_; } |
87 | 87 |
88 // Creates a data:xxxx URL which contains the full HTML for a notification | 88 // Creates a data:xxxx URL which contains the full HTML for a notification |
89 // using supplied icon, title, and text, run through a template which contains | 89 // using supplied icon, title, and text, run through a template which contains |
90 // the standard formatting for notifications. | 90 // the standard formatting for notifications. |
91 static string16 CreateDataUrl(const GURL& icon_url, | 91 static string16 CreateDataUrl(const GURL& icon_url, |
92 const string16& title, | 92 const string16& title, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 scoped_ptr<content_settings::NotificationProvider> provider_; | 164 scoped_ptr<content_settings::NotificationProvider> provider_; |
165 | 165 |
166 PrefChangeRegistrar prefs_registrar_; | 166 PrefChangeRegistrar prefs_registrar_; |
167 NotificationRegistrar notification_registrar_; | 167 NotificationRegistrar notification_registrar_; |
168 | 168 |
169 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); | 169 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); |
170 }; | 170 }; |
171 | 171 |
172 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ | 172 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ |
OLD | NEW |