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/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
21 #include "content/public/browser/notification_registrar.h" | 21 #include "content/public/browser/notification_registrar.h" |
| 22 #include "content/public/browser/host_zoom_map.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 { |
30 class EnterpriseExtensionObserver; | 31 class EnterpriseExtensionObserver; |
31 class LocaleChangeGuard; | 32 class LocaleChangeGuard; |
(...skipping 120 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 11 matching lines...) Expand all Loading... |
183 | 185 |
184 // Updates the ProfileInfoCache with data from this profile. | 186 // Updates the ProfileInfoCache with data from this profile. |
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 content::NotificationRegistrar registrar_; | 194 content::NotificationRegistrar registrar_; |
| 195 content::HostZoomMap::ZoomLevelChangedCallback zoom_callback_; |
193 PrefChangeRegistrar pref_change_registrar_; | 196 PrefChangeRegistrar pref_change_registrar_; |
194 | 197 |
195 FilePath path_; | 198 FilePath path_; |
196 FilePath base_cache_path_; | 199 FilePath base_cache_path_; |
197 | 200 |
198 // !!! BIG HONKING WARNING !!! | 201 // !!! BIG HONKING WARNING !!! |
199 // The order of the members below is important. Do not change it unless | 202 // The order of the members below is important. Do not change it unless |
200 // you know what you're doing. Also, if adding a new member here make sure | 203 // you know what you're doing. Also, if adding a new member here make sure |
201 // that the declaration occurs AFTER things it depends on as destruction | 204 // that the declaration occurs AFTER things it depends on as destruction |
202 // happens in reverse order of declaration. | 205 // happens in reverse order of declaration. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} | 270 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} |
268 | 271 |
269 Profile::Delegate* delegate_; | 272 Profile::Delegate* delegate_; |
270 | 273 |
271 chrome_browser_net::Predictor* predictor_; | 274 chrome_browser_net::Predictor* predictor_; |
272 | 275 |
273 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 276 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
274 }; | 277 }; |
275 | 278 |
276 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 279 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
OLD | NEW |