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

Unified Diff: content/browser/host_zoom_map_impl.h

Issue 23851016: Convert zoom callbacks to use CallbackRegistry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge Created 7 years, 3 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.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 216c83ebc17e2187984657b1edd8ef0e04097be3..eab10402b092f50a965ffb2f5bb366641e036cc1 100644
--- a/content/browser/host_zoom_map_impl.h
+++ b/content/browser/host_zoom_map_impl.h
@@ -42,9 +42,7 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
double level) OVERRIDE;
virtual double GetDefaultZoomLevel() const OVERRIDE;
virtual void SetDefaultZoomLevel(double level) OVERRIDE;
- virtual void AddZoomLevelChangedCallback(
- const ZoomLevelChangedCallback& callback) OVERRIDE;
- virtual void RemoveZoomLevelChangedCallback(
+ virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback(
const ZoomLevelChangedCallback& callback) OVERRIDE;
// Returns the temporary zoom level that's only valid for the lifetime of
@@ -75,7 +73,8 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
typedef std::map<std::string, HostZoomLevels> SchemeHostZoomLevels;
// Callbacks called when zoom level changes.
- std::vector<ZoomLevelChangedCallback> zoom_level_changed_callbacks_;
+ base::CallbackList<void(const ZoomLevelChange&)>
+ zoom_level_changed_callbacks_;
// Copy of the pref data, so that we can read it on the IO thread.
HostZoomLevels host_zoom_levels_;
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller.cc ('k') | content/browser/host_zoom_map_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698