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

Unified Diff: content/public/browser/host_zoom_map.h

Issue 11866004: Add scheme to HostZoomMap (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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
Index: content/public/browser/host_zoom_map.h
diff --git a/content/public/browser/host_zoom_map.h b/content/public/browser/host_zoom_map.h
index 1e32e79383702721f3128efef30a2e0fff8f82eb..4e54528be5007c7ddbb9965b556b478140aa534d 100644
--- a/content/public/browser/host_zoom_map.h
+++ b/content/public/browser/host_zoom_map.h
@@ -39,6 +39,15 @@ class HostZoomMap {
// This may be called on any thread.
virtual double GetZoomLevel(const std::string& host) const = 0;
+ // Returns the zoom level for the host or spec for a given url, taking scheme
Nikita (slow) 2013/01/11 15:23:55 nit: |scheme| |host|
Denis Kuznetsov (DE-MUC) 2013/01/11 15:48:59 Done.
+ // in account. If there is specific zoom level specified for given host and
+ // scheme pair, it will be returned. In other cases result is equivalent to
+ // GetZoomLevel(host).
+ //
+ // This may be called on any thread.
+ virtual double GetZoomLevel(const std::string& scheme,
Nikita (slow) 2013/01/11 15:23:55 Maybe name this GetZoomLevelBySchemeHost ? http:/
Denis Kuznetsov (DE-MUC) 2013/01/11 15:48:59 I would prefer to rename or remove old method, as
Nikita (slow) 2013/01/11 15:50:39 I agree that this seems like a better option.
+ const std::string& host) const = 0;
+
// Sets the zoom level for the host or spec 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.
@@ -46,6 +55,13 @@ class HostZoomMap {
// This should only be called on the UI thread.
virtual void SetZoomLevel(const std::string& host, double level) = 0;
+ // Sets the zoom level for the host/scheme pair to |level|.
+ //
+ // This should only be called on the UI thread.
+ virtual void SetZoomLevel(const std::string& scheme,
+ const std::string& host,
+ double level) = 0;
+
// Get/Set the default zoom level for pages that don't override it.
virtual double GetDefaultZoomLevel() const = 0;
virtual void SetDefaultZoomLevel(double level) = 0;;

Powered by Google App Engine
This is Rietveld 408576698