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 26 matching lines...) Expand all Loading... |
37 namespace gfx { | 37 namespace gfx { |
38 class Image; | 38 class Image; |
39 } | 39 } |
40 | 40 |
41 namespace user_prefs { | 41 namespace user_prefs { |
42 class PrefRegistrySyncable; | 42 class PrefRegistrySyncable; |
43 } | 43 } |
44 | 44 |
45 // The DesktopNotificationService is an object, owned by the Profile, | 45 // The DesktopNotificationService is an object, owned by the Profile, |
46 // which provides the creation of desktop "toasts" to web pages and workers. | 46 // which provides the creation of desktop "toasts" to web pages and workers. |
47 class DesktopNotificationService : public ProfileKeyedService, | 47 class DesktopNotificationService : public BrowserContextKeyedService, |
48 public content::NotificationObserver { | 48 public content::NotificationObserver { |
49 public: | 49 public: |
50 enum DesktopNotificationSource { | 50 enum DesktopNotificationSource { |
51 PageNotification, | 51 PageNotification, |
52 WorkerNotification | 52 WorkerNotification |
53 }; | 53 }; |
54 | 54 |
55 // Register profile-specific prefs of notifications. | 55 // Register profile-specific prefs of notifications. |
56 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* prefs); | 56 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* prefs); |
57 | 57 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // On-memory data for the availability of system_component. | 212 // On-memory data for the availability of system_component. |
213 std::set<std::string> disabled_system_component_ids_; | 213 std::set<std::string> disabled_system_component_ids_; |
214 | 214 |
215 // Registrar for the other kind of notifications (event signaling). | 215 // Registrar for the other kind of notifications (event signaling). |
216 content::NotificationRegistrar registrar_; | 216 content::NotificationRegistrar registrar_; |
217 | 217 |
218 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); | 218 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); |
219 }; | 219 }; |
220 | 220 |
221 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ | 221 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ |
OLD | NEW |