diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 07:17:54 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 07:17:54 +0000 |
commit | 9d797f394f319b754ed91a981dab566d764d2c2e (patch) | |
tree | aee695b1c2af9d540e3fe99d834de015f70665cf /chrome/browser/host_zoom_map.h | |
parent | 97c9e77b34099c518f85571f6d36e178d7695b23 (diff) | |
download | chromium_src-9d797f394f319b754ed91a981dab566d764d2c2e.zip chromium_src-9d797f394f319b754ed91a981dab566d764d2c2e.tar.gz chromium_src-9d797f394f319b754ed91a981dab566d764d2c2e.tar.bz2 |
Send content settings based on the URL to the renderer instead of just the host.
BUG=36025
TEST=manual
Review URL: http://codereview.chromium.org/1744003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45424 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/host_zoom_map.h')
-rw-r--r-- | chrome/browser/host_zoom_map.h | 15 |
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. // |