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

Side by Side Diff: chrome/browser/profiles/profile_impl.h

Issue 12039058: content: convert zoom notifications to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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) 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
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl_unittest.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698