summaryrefslogtreecommitdiffstats
path: root/content/browser/host_zoom_map_impl.h
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 15:08:42 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 15:08:42 +0000
commit89c9aca0f74519e281f1a0ce425a8f6b195c658b (patch)
tree5bcdabc9ac9a1bfac3f7e78dca2ff04f5d39c49d /content/browser/host_zoom_map_impl.h
parent8fbdeb2c722073c80e2c99bd529d274dbe924645 (diff)
downloadchromium_src-89c9aca0f74519e281f1a0ce425a8f6b195c658b.zip
chromium_src-89c9aca0f74519e281f1a0ce425a8f6b195c658b.tar.gz
chromium_src-89c9aca0f74519e281f1a0ce425a8f6b195c658b.tar.bz2
content: convert zoom notifications to callbacks
BUG=170921 Review URL: https://codereview.chromium.org/12039058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181307 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/host_zoom_map_impl.h')
-rw-r--r--content/browser/host_zoom_map_impl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/content/browser/host_zoom_map_impl.h b/content/browser/host_zoom_map_impl.h
index 7840188..4e6eff4 100644
--- a/content/browser/host_zoom_map_impl.h
+++ b/content/browser/host_zoom_map_impl.h
@@ -34,6 +34,10 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
virtual void SetZoomLevel(const std::string& host, double level) OVERRIDE;
virtual double GetDefaultZoomLevel() const OVERRIDE;
virtual void SetDefaultZoomLevel(double level) OVERRIDE;
+ virtual void AddZoomLevelChangedCallback(
+ const ZoomLevelChangedCallback& callback) OVERRIDE;
+ virtual void RemoveZoomLevelChangedCallback(
+ const ZoomLevelChangedCallback& callback) OVERRIDE;
// Returns the temporary zoom level that's only valid for the lifetime of
// the given WebContents (i.e. isn't saved and doesn't affect other
@@ -59,6 +63,9 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
private:
typedef std::map<std::string, double> HostZoomLevels;
+ // 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_;
double default_zoom_level_;