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
diff --git a/content/browser/host_zoom_map_impl.h b/content/browser/host_zoom_map_impl.h
index 4e6eff4d..216c83eb 100644
--- a/content/browser/host_zoom_map_impl.h
+++ b/content/browser/host_zoom_map_impl.h
@@ -30,8 +30,16 @@
// 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 @@
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 {