OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_MESSAGE_CENTER_SETTINGS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_SETTINGS_CONTROLLER_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_SETTINGS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_SETTINGS_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "chrome/browser/extensions/app_icon_loader.h" | 16 #include "chrome/browser/extensions/app_icon_loader.h" |
17 #include "chrome/common/content_settings.h" | 17 #include "chrome/common/content_settings.h" |
18 #include "content/public/browser/notification_details.h" | 18 #include "content/public/browser/notification_details.h" |
19 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
20 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
21 #include "content/public/browser/notification_source.h" | 21 #include "content/public/browser/notification_source.h" |
22 #include "ui/message_center/notifier_settings.h" | 22 #include "ui/message_center/notifier_settings.h" |
23 | 23 |
24 #if defined(OS_CHROMEOS) | 24 #if defined(OS_CHROMEOS) |
25 #include "chrome/browser/chromeos/login/user_manager.h" | 25 #include "chrome/browser/chromeos/login/user_manager.h" |
26 #endif | 26 #endif |
27 | 27 |
28 class CancelableTaskTracker; | |
29 class Profile; | 28 class Profile; |
30 class ProfileInfoCache; | 29 class ProfileInfoCache; |
31 | 30 |
| 31 namespace base { |
| 32 class CancelableTaskTracker; |
| 33 } |
| 34 |
32 namespace chrome { | 35 namespace chrome { |
33 struct FaviconImageResult; | 36 struct FaviconImageResult; |
34 } | 37 } |
35 | 38 |
36 namespace message_center { | 39 namespace message_center { |
37 class ProfileNotifierGroup; | 40 class ProfileNotifierGroup; |
38 } | 41 } |
39 | 42 |
40 // The class to bridge between the settings UI of notifiers and the preference | 43 // The class to bridge between the settings UI of notifiers and the preference |
41 // storage. | 44 // storage. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // RebuildNotifierGroups(). | 102 // RebuildNotifierGroups(). |
100 void CreateNotifierGroupForGuestLogin(); | 103 void CreateNotifierGroupForGuestLogin(); |
101 #endif | 104 #endif |
102 | 105 |
103 void RebuildNotifierGroups(); | 106 void RebuildNotifierGroups(); |
104 | 107 |
105 // The views displaying notifier settings. | 108 // The views displaying notifier settings. |
106 ObserverList<message_center::NotifierSettingsObserver> observers_; | 109 ObserverList<message_center::NotifierSettingsObserver> observers_; |
107 | 110 |
108 // The task tracker for loading favicons. | 111 // The task tracker for loading favicons. |
109 scoped_ptr<CancelableTaskTracker> favicon_tracker_; | 112 scoped_ptr<base::CancelableTaskTracker> favicon_tracker_; |
110 | 113 |
111 scoped_ptr<extensions::AppIconLoader> app_icon_loader_; | 114 scoped_ptr<extensions::AppIconLoader> app_icon_loader_; |
112 | 115 |
113 std::map<base::string16, ContentSettingsPattern> patterns_; | 116 std::map<base::string16, ContentSettingsPattern> patterns_; |
114 | 117 |
115 // The list of all configurable notifier groups. This is each profile that is | 118 // The list of all configurable notifier groups. This is each profile that is |
116 // loaded (and in the ProfileInfoCache - so no incognito profiles go here). | 119 // loaded (and in the ProfileInfoCache - so no incognito profiles go here). |
117 ScopedVector<message_center::ProfileNotifierGroup> notifier_groups_; | 120 ScopedVector<message_center::ProfileNotifierGroup> notifier_groups_; |
118 size_t current_notifier_group_; | 121 size_t current_notifier_group_; |
119 | 122 |
120 content::NotificationRegistrar registrar_; | 123 content::NotificationRegistrar registrar_; |
121 | 124 |
122 ProfileInfoCache* profile_info_cache_; | 125 ProfileInfoCache* profile_info_cache_; |
123 | 126 |
124 base::WeakPtrFactory<MessageCenterSettingsController> weak_factory_; | 127 base::WeakPtrFactory<MessageCenterSettingsController> weak_factory_; |
125 | 128 |
126 DISALLOW_COPY_AND_ASSIGN(MessageCenterSettingsController); | 129 DISALLOW_COPY_AND_ASSIGN(MessageCenterSettingsController); |
127 }; | 130 }; |
128 | 131 |
129 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_SETTINGS_CONTROLLER_H_ | 132 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_SETTINGS_CONTROLLER_H_ |
OLD | NEW |