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

Unified Diff: content/public/browser/host_zoom_map.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 | « content/browser/host_zoom_map_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/host_zoom_map.h
diff --git a/content/public/browser/host_zoom_map.h b/content/public/browser/host_zoom_map.h
index 0554c1d4f1e72b08ad41abb6cbb99f022d8e30ae..72c9a1fb62f6531996b4ec72e1061a3261cc1453 100644
--- a/content/public/browser/host_zoom_map.h
+++ b/content/public/browser/host_zoom_map.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/callback_list.h"
#include "content/common/content_export.h"
namespace content {
@@ -91,11 +92,10 @@ class HostZoomMap {
virtual void SetDefaultZoomLevel(double level) = 0;;
typedef base::Callback<void(const ZoomLevelChange&)> ZoomLevelChangedCallback;
-
+ typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription
+ Subscription;
// Add and remove zoom level changed callbacks.
- virtual void AddZoomLevelChangedCallback(
- const ZoomLevelChangedCallback& callback) = 0;
- virtual void RemoveZoomLevelChangedCallback(
+ virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback(
const ZoomLevelChangedCallback& callback) = 0;
protected:
« no previous file with comments | « content/browser/host_zoom_map_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698