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

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: Eliminate old methods in interface Created 7 years, 10 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..1e356227f61025a0bd5a7455010073b913a2e092 100644
--- a/content/public/browser/host_zoom_map.h
+++ b/content/public/browser/host_zoom_map.h
@@ -29,22 +29,31 @@ class HostZoomMap {
// thread.
virtual void CopyFrom(HostZoomMap* copy) = 0;
- // Returns the zoom level for the host or spec 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 the user's default zoom level. Otherwise,
- // returns the saved zoom level, which may be positive (to zoom in) or
- // negative (to zoom out).
+ // Returns the zoom level for the host or spec for a given url, taking
+ // |scheme| in account. If |scheme| is specified and there is specific zoom
+ // level specified for given |scheme| and |host| pair, it will be returned.
+ // In other cases 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 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.
- virtual double GetZoomLevel(const std::string& host) const = 0;
+ virtual double GetZoomLevel(const std::string& scheme,
+ 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.
+ // Sets the zoom level for the |scheme|/|host| pair to |level|. If |scheme|
+ // is not specified, 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.
+ //
+ // Only values without specified scheme will be stored in preferences.
//
// This should only be called on the UI thread.
- virtual void SetZoomLevel(const std::string& host, double level) = 0;
+ 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;

Powered by Google App Engine
This is Rietveld 408576698