| 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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/string16.h" | 15 #include "base/string16.h" |
| 16 #include "chrome/browser/content_settings/content_settings_notification_provider
.h" | 16 #include "chrome/browser/content_settings/content_settings_notification_provider
.h" |
| 17 #include "chrome/browser/content_settings/content_settings_provider.h" | 17 #include "chrome/browser/content_settings/content_settings_provider.h" |
| 18 #include "chrome/browser/prefs/pref_change_registrar.h" | 18 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 19 #include "chrome/browser/profiles/profile_keyed_service.h" |
| 19 #include "chrome/common/content_settings.h" | 20 #include "chrome/common/content_settings.h" |
| 20 #include "content/common/notification_observer.h" | 21 #include "content/common/notification_observer.h" |
| 21 #include "content/common/notification_registrar.h" | 22 #include "content/common/notification_registrar.h" |
| 22 #include "googleurl/src/gurl.h" | 23 #include "googleurl/src/gurl.h" |
| 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
| 24 | 25 |
| 25 class Notification; | 26 class Notification; |
| 26 class NotificationUIManager; | 27 class NotificationUIManager; |
| 27 class NotificationsPrefsCache; | 28 class NotificationsPrefsCache; |
| 28 class PrefService; | 29 class PrefService; |
| 29 class Profile; | 30 class Profile; |
| 30 class TabContents; | 31 class TabContents; |
| 31 struct DesktopNotificationHostMsg_Show_Params; | 32 struct DesktopNotificationHostMsg_Show_Params; |
| 32 | 33 |
| 33 // The DesktopNotificationService is an object, owned by the Profile, | 34 // The DesktopNotificationService is an object, owned by the Profile, |
| 34 // which provides the creation of desktop "toasts" to web pages and workers. | 35 // which provides the creation of desktop "toasts" to web pages and workers. |
| 35 class DesktopNotificationService : public NotificationObserver { | 36 class DesktopNotificationService : public NotificationObserver, |
| 37 public ProfileKeyedService { |
| 36 public: | 38 public: |
| 37 enum DesktopNotificationSource { | 39 enum DesktopNotificationSource { |
| 38 PageNotification, | 40 PageNotification, |
| 39 WorkerNotification | 41 WorkerNotification |
| 40 }; | 42 }; |
| 41 | 43 |
| 42 DesktopNotificationService(Profile* profile, | 44 DesktopNotificationService(Profile* profile, |
| 43 NotificationUIManager* ui_manager); | 45 NotificationUIManager* ui_manager); |
| 44 virtual ~DesktopNotificationService(); | 46 virtual ~DesktopNotificationService(); |
| 45 | 47 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 155 |
| 154 scoped_ptr<content_settings::NotificationProvider> provider_; | 156 scoped_ptr<content_settings::NotificationProvider> provider_; |
| 155 | 157 |
| 156 PrefChangeRegistrar prefs_registrar_; | 158 PrefChangeRegistrar prefs_registrar_; |
| 157 NotificationRegistrar notification_registrar_; | 159 NotificationRegistrar notification_registrar_; |
| 158 | 160 |
| 159 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); | 161 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); |
| 160 }; | 162 }; |
| 161 | 163 |
| 162 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ | 164 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ |
| OLD | NEW |