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 // This class gathers state related to a single user profile. | 5 // This class gathers state related to a single user profile. |
6 | 6 |
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/prefs/public/pref_change_registrar.h" | 16 #include "base/prefs/public/pref_change_registrar.h" |
17 #include "base/timer.h" | 17 #include "base/timer.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/profiles/profile_impl_io_data.h" | 19 #include "chrome/browser/profiles/profile_impl_io_data.h" |
| 20 #include "content/public/browser/host_zoom_map.h" |
20 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
21 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
22 | 23 |
23 class NetPrefObserver; | 24 class NetPrefObserver; |
24 class PrefServiceSyncable; | 25 class PrefServiceSyncable; |
25 class PrefServiceBase; | 26 class PrefServiceBase; |
26 class SSLConfigServiceManager; | 27 class SSLConfigServiceManager; |
27 | 28 |
28 #if defined(OS_CHROMEOS) | 29 #if defined(OS_CHROMEOS) |
29 namespace chromeos { | 30 namespace chromeos { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 Delegate* delegate, | 153 Delegate* delegate, |
153 CreateMode create_mode, | 154 CreateMode create_mode, |
154 base::SequencedTaskRunner* sequenced_task_runner); | 155 base::SequencedTaskRunner* sequenced_task_runner); |
155 | 156 |
156 // Does final initialization. Should be called after prefs were loaded. | 157 // Does final initialization. Should be called after prefs were loaded. |
157 void DoFinalInit(bool is_new_profile); | 158 void DoFinalInit(bool is_new_profile); |
158 | 159 |
159 void InitHostZoomMap(); | 160 void InitHostZoomMap(); |
160 | 161 |
161 void OnDefaultZoomLevelChanged(); | 162 void OnDefaultZoomLevelChanged(); |
| 163 void OnZoomLevelChanged(const std::string& host); |
162 | 164 |
163 void OnInitializationCompleted(PrefServiceBase* pref_service, | 165 void OnInitializationCompleted(PrefServiceBase* pref_service, |
164 bool succeeded); | 166 bool succeeded); |
165 | 167 |
166 // Does final prefs initialization and calls Init(). | 168 // Does final prefs initialization and calls Init(). |
167 void OnPrefsLoaded(bool success); | 169 void OnPrefsLoaded(bool success); |
168 | 170 |
169 FilePath GetPrefFilePath(); | 171 FilePath GetPrefFilePath(); |
170 | 172 |
171 #if defined(ENABLE_SESSION_SERVICE) | 173 #if defined(ENABLE_SESSION_SERVICE) |
(...skipping 13 matching lines...) Expand all Loading... |
185 void UpdateProfileNameCache(); | 187 void UpdateProfileNameCache(); |
186 void UpdateProfileAvatarCache(); | 188 void UpdateProfileAvatarCache(); |
187 | 189 |
188 void GetCacheParameters(bool is_media_context, | 190 void GetCacheParameters(bool is_media_context, |
189 FilePath* cache_path, | 191 FilePath* cache_path, |
190 int* max_size); | 192 int* max_size); |
191 | 193 |
192 virtual base::Callback<ChromeURLDataManagerBackend*(void)> | 194 virtual base::Callback<ChromeURLDataManagerBackend*(void)> |
193 GetChromeURLDataManagerBackendGetter() const OVERRIDE; | 195 GetChromeURLDataManagerBackendGetter() const OVERRIDE; |
194 | 196 |
| 197 content::HostZoomMap::ZoomLevelChangedCallback zoom_callback_; |
195 content::NotificationRegistrar registrar_; | 198 content::NotificationRegistrar registrar_; |
196 PrefChangeRegistrar pref_change_registrar_; | 199 PrefChangeRegistrar pref_change_registrar_; |
197 | 200 |
198 FilePath path_; | 201 FilePath path_; |
199 FilePath base_cache_path_; | 202 FilePath base_cache_path_; |
200 | 203 |
201 // !!! BIG HONKING WARNING !!! | 204 // !!! BIG HONKING WARNING !!! |
202 // The order of the members below is important. Do not change it unless | 205 // The order of the members below is important. Do not change it unless |
203 // you know what you're doing. Also, if adding a new member here make sure | 206 // you know what you're doing. Also, if adding a new member here make sure |
204 // that the declaration occurs AFTER things it depends on as destruction | 207 // that the declaration occurs AFTER things it depends on as destruction |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} | 273 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} |
271 | 274 |
272 Profile::Delegate* delegate_; | 275 Profile::Delegate* delegate_; |
273 | 276 |
274 chrome_browser_net::Predictor* predictor_; | 277 chrome_browser_net::Predictor* predictor_; |
275 | 278 |
276 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 279 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
277 }; | 280 }; |
278 | 281 |
279 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 282 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
OLD | NEW |