summaryrefslogtreecommitdiffstats
path: root/chrome/browser/host_zoom_map.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-11-18 18:32:45 +0000
committerBen Murdoch <benm@google.com>2010-11-18 18:38:07 +0000
commit513209b27ff55e2841eac0e4120199c23acce758 (patch)
treeaeba30bb08c5f47c57003544e378a377c297eee6 /chrome/browser/host_zoom_map.h
parent164f7496de0fbee436b385a79ead9e3cb81a50c1 (diff)
downloadexternal_chromium-513209b27ff55e2841eac0e4120199c23acce758.zip
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.gz
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.bz2
Merge Chromium at r65505: Initial merge by git.
Change-Id: I31d8f1d8cd33caaf7f47ffa7350aef42d5fbdb45
Diffstat (limited to 'chrome/browser/host_zoom_map.h')
-rw-r--r--chrome/browser/host_zoom_map.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/host_zoom_map.h b/chrome/browser/host_zoom_map.h
index b75dcea..10f512e 100644
--- a/chrome/browser/host_zoom_map.h
+++ b/chrome/browser/host_zoom_map.h
@@ -34,22 +34,22 @@ class HostZoomMap : public NotificationObserver,
// Returns the zoom level for a given url. The zoom level is determined by
// the host portion of the URL, or (in the absence of a host) the complete
// spec of the URL. In most cases, there is no custom zoom level, and this
- // returns 0. Otherwise, returns the saved zoom level, which may be positive
- // (to zoom in) or negative (to zoom out).
+ // returns the user's default zoom level. Otherwise, returns the saved zoom
+ // level, which may be positive (to zoom in) or negative (to zoom out).
//
// This may be called on any thread.
double GetZoomLevel(const GURL& url) const;
- // Sets the zoom level for a given url to |level|. If the level is 0,
- // the host is erased from the saved preferences; otherwise the new value is
- // written out.
+ // Sets the zoom level for a given url to |level|. If the level matches the
+ // current default zoom level, the host is erased from the saved preferences;
+ // otherwise the new value is written out.
//
// This should only be called on the UI thread.
void SetZoomLevel(const GURL& url, double level);
// Returns the temporary zoom level that's only valid for the lifetime of
// the given tab (i.e. isn't saved and doesn't affect other tabs) if it
- // exists, 0 otherwise.
+ // exists, the default zoom level otherwise.
//
// This may be called on any thread.
double GetTemporaryZoomLevel(int render_process_id,
@@ -92,6 +92,7 @@ class HostZoomMap : public NotificationObserver,
// Copy of the pref data, so that we can read it on the IO thread.
HostZoomLevels host_zoom_levels_;
+ double default_zoom_level_;
struct TemporaryZoomLevel {
int render_process_id;
@@ -103,8 +104,8 @@ class HostZoomMap : public NotificationObserver,
// level, so vector is fine for now.
std::vector<TemporaryZoomLevel> temporary_zoom_levels_;
- // Used around accesses to |host_zoom_levels_| and |temporary_zoom_levels_| to
- // guarantee thread safety.
+ // Used around accesses to |host_zoom_levels_|, |default_zoom_level_| and
+ // |temporary_zoom_levels_| to guarantee thread safety.
mutable Lock lock_;
// Whether we are currently updating preferences, this is used to ignore