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

Unified Diff: content/browser/host_zoom_map_impl.h

Issue 12039058: content: convert zoom notifications to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller_unittest.cc ('k') | content/browser/host_zoom_map_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/host_zoom_map_impl.h
diff --git a/content/browser/host_zoom_map_impl.h b/content/browser/host_zoom_map_impl.h
index 7840188c0d747399cd59fbb42d0871237aafe74f..4e6eff4d626cb3aaaee1f1bea22a7d07bd5cf8ab 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_;
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller_unittest.cc ('k') | content/browser/host_zoom_map_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698