summaryrefslogtreecommitdiffstats
path: root/chrome/browser/host_zoom_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/host_zoom_map.h')
-rw-r--r--chrome/browser/host_zoom_map.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/chrome/browser/host_zoom_map.h b/chrome/browser/host_zoom_map.h
index 87dee2c..648162c 100644
--- a/chrome/browser/host_zoom_map.h
+++ b/chrome/browser/host_zoom_map.h
@@ -17,6 +17,7 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+class GURL;
class PrefService;
class Profile;
@@ -27,19 +28,21 @@ class HostZoomMap : public NotificationObserver,
static void RegisterUserPrefs(PrefService* prefs);
- // Returns the zoom level for a given hostname. In most cases, there is no
- // custom zoom level, and this returns 0. Otherwise, returns the saved zoom
- // level, which may be positive (to zoom in) or negative (to zoom out).
+ // Returns the zoom level 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 0. 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.
- int GetZoomLevel(const std::string& host) const;
+ int GetZoomLevel(const GURL& url) const;
- // Sets the zoom level for a given hostname to |level|. If the level is 0,
+ // Sets the zoom level for a given url to |level|. If the level is 0,
// the host is erased from the saved preferences; otherwise the new value is
// written out.
//
// This should only be called on the UI thread.
- void SetZoomLevel(const std::string& host, int level);
+ void SetZoomLevel(const GURL& url, int level);
// Resets all zoom levels.
//