Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: chrome/browser/notifications/desktop_notification_service.h

Issue 6813116: Revert 81277 - Profile shouldn't own DesktopNotificationService.DesktopNotificationService is now... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/notifications_apitest.cc ('k') | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698