diff options
author | antrim@chromium.org <antrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-11 18:59:02 +0000 |
---|---|---|
committer | antrim@chromium.org <antrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-11 18:59:02 +0000 |
commit | 367c5c1dca6bf8db4ad9249913d757e7ff70b788 (patch) | |
tree | a9edcaebc1c97cdf375410f5363ee2597ef825bb /content/browser/host_zoom_map_impl.h | |
parent | c3ac41e102fce7be051e017265a6b6ff5593605d (diff) | |
download | chromium_src-367c5c1dca6bf8db4ad9249913d757e7ff70b788.zip chromium_src-367c5c1dca6bf8db4ad9249913d757e7ff70b788.tar.gz chromium_src-367c5c1dca6bf8db4ad9249913d757e7ff70b788.tar.bz2 |
Web Content zoom settings should not apply to login/lock screen
Add scheme to HostZoomMap, use it to specify unmodifiable zoom level for internal ui pages.
Reason : Currently, zoom settings are remebered on a per-host basis, and ignore scheme.
It works nice for http/https access for the same host, but it is not possible to distinguish between
internal ui (with chrome:// scheme) and some intranet sites (having https://login/ does not seem unlikely).
BUG=164269
Review URL: https://chromiumcodereview.appspot.com/11866004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/host_zoom_map_impl.h')
-rw-r--r-- | content/browser/host_zoom_map_impl.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/content/browser/host_zoom_map_impl.h b/content/browser/host_zoom_map_impl.h index 4e6eff4..216c83e 100644 --- a/content/browser/host_zoom_map_impl.h +++ b/content/browser/host_zoom_map_impl.h @@ -30,8 +30,16 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap), // HostZoomMap implementation: virtual void CopyFrom(HostZoomMap* copy) OVERRIDE; - virtual double GetZoomLevel(const std::string& host) const OVERRIDE; - virtual void SetZoomLevel(const std::string& host, double level) OVERRIDE; + virtual double GetZoomLevelForHostAndScheme( + const std::string& scheme, + const std::string& host) const OVERRIDE; + virtual void SetZoomLevelForHost( + const std::string& host, + double level) OVERRIDE; + virtual void SetZoomLevelForHostAndScheme( + const std::string& scheme, + const std::string& host, + double level) OVERRIDE; virtual double GetDefaultZoomLevel() const OVERRIDE; virtual void SetDefaultZoomLevel(double level) OVERRIDE; virtual void AddZoomLevelChangedCallback( @@ -61,13 +69,17 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap), const NotificationDetails& details) OVERRIDE; private: + double GetZoomLevelForHost(const std::string& host) const; + typedef std::map<std::string, double> HostZoomLevels; + typedef std::map<std::string, HostZoomLevels> SchemeHostZoomLevels; // Callbacks called when zoom level changes. std::vector<ZoomLevelChangedCallback> zoom_level_changed_callbacks_; // Copy of the pref data, so that we can read it on the IO thread. HostZoomLevels host_zoom_levels_; + SchemeHostZoomLevels scheme_host_zoom_levels_; double default_zoom_level_; struct TemporaryZoomLevel { |