diff options
Diffstat (limited to 'chrome/browser/host_zoom_map.h')
| -rw-r--r-- | chrome/browser/host_zoom_map.h | 17 |
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 |
