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

Unified Diff: content/browser/host_zoom_map_impl.h

Issue 11866004: Add scheme to HostZoomMap (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add namespace Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller_unittest.cc ('k') | content/browser/host_zoom_map_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/host_zoom_map_impl.h
diff --git a/content/browser/host_zoom_map_impl.h b/content/browser/host_zoom_map_impl.h
index 4e6eff4d626cb3aaaee1f1bea22a7d07bd5cf8ab..216c83ebc17e2187984657b1edd8ef0e04097be3 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 {
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller_unittest.cc ('k') | content/browser/host_zoom_map_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698