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