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

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

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test compilation. Created 6 years, 4 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_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "components/domain_reliability/clear_mode.h" 15 #include "components/domain_reliability/clear_mode.h"
16 #include "content/public/browser/browser_context.h" 16 #include "content/public/browser/browser_context.h"
17 #include "content/public/browser/content_browser_client.h" 17 #include "content/public/browser/content_browser_client.h"
18 #include "content/public/browser/host_zoom_map.h"
18 19
19 class ChromeAppCacheService; 20 class ChromeAppCacheService;
20 class DevToolsNetworkController; 21 class DevToolsNetworkController;
21 class ExtensionSpecialStoragePolicy; 22 class ExtensionSpecialStoragePolicy;
22 class FaviconService; 23 class FaviconService;
23 class HostContentSettingsMap; 24 class HostContentSettingsMap;
24 class PrefProxyConfigTracker; 25 class PrefProxyConfigTracker;
25 class PrefService; 26 class PrefService;
26 class PromoCounter; 27 class PromoCounter;
27 class ProtocolHandlerRegistry; 28 class ProtocolHandlerRegistry;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 bool IsSyncAccessible(); 378 bool IsSyncAccessible();
378 379
379 // Send NOTIFICATION_PROFILE_DESTROYED for this Profile, if it has not 380 // Send NOTIFICATION_PROFILE_DESTROYED for this Profile, if it has not
380 // already been sent. It is necessary because most Profiles are destroyed by 381 // already been sent. It is necessary because most Profiles are destroyed by
381 // ProfileDestroyer, but in tests, some are not. 382 // ProfileDestroyer, but in tests, some are not.
382 void MaybeSendDestroyedNotification(); 383 void MaybeSendDestroyedNotification();
383 384
384 // Creates an OffTheRecordProfile which points to this Profile. 385 // Creates an OffTheRecordProfile which points to this Profile.
385 Profile* CreateOffTheRecordProfile(); 386 Profile* CreateOffTheRecordProfile();
386 387
388 // Convenience method to retrieve the default zoom level for the default
389 // storage partition.
390 double GetDefaultZoomLevel();
391
392 // Convenience method to retrieve the zool level prefs for the default storage
awong 2014/08/20 19:56:58 zool -> zoom
wjmaclean 2014/08/20 20:15:45 Done.
393 // partition.
394 PrefService* GetZoomLevelPrefs();
395
396 protected:
397 // Allows a profile to track changes in zoom levels in another profile.
398 // This function, along with TrackZoomLevelChanged(), are placed in Profile
399 // to facilitate testing with TestingProfile.
400 void TrackZoomLevelsFromParent(Profile* parent);
401
387 private: 402 private:
403 // Callback function for tracking parent's zoom level changes.
404 void TrackZoomLevelChanged(
405 const content::HostZoomMap::ZoomLevelChange& change);
406
407 scoped_ptr<content::HostZoomMap::Subscription> track_zoom_subscription_;
408
388 bool restored_last_session_; 409 bool restored_last_session_;
389 410
390 // Used to prevent the notification that this Profile is destroyed from 411 // Used to prevent the notification that this Profile is destroyed from
391 // being sent twice. 412 // being sent twice.
392 bool sent_destroyed_notification_; 413 bool sent_destroyed_notification_;
393 414
394 // Accessibility events will only be propagated when the pause 415 // Accessibility events will only be propagated when the pause
395 // level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents 416 // level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents
396 // increment and decrement the level, respectively, rather than set it to 417 // increment and decrement the level, respectively, rather than set it to
397 // true or false, so that calls can be nested. 418 // true or false, so that calls can be nested.
(...skipping 14 matching lines...) Expand all
412 struct hash<Profile*> { 433 struct hash<Profile*> {
413 std::size_t operator()(Profile* const& p) const { 434 std::size_t operator()(Profile* const& p) const {
414 return reinterpret_cast<std::size_t>(p); 435 return reinterpret_cast<std::size_t>(p);
415 } 436 }
416 }; 437 };
417 438
418 } // namespace BASE_HASH_NAMESPACE 439 } // namespace BASE_HASH_NAMESPACE
419 #endif 440 #endif
420 441
421 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 442 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698