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

Unified Diff: content/public/browser/host_zoom_map.h

Issue 12039058: content: convert zoom notifications to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: callbacks Created 7 years, 11 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
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 1e32e79383702721f3128efef30a2e0fff8f82eb..4ff11222dbf655d5b32b037766866a7ccd132b92 100644
--- a/content/public/browser/host_zoom_map.h
+++ b/content/public/browser/host_zoom_map.h
@@ -10,11 +10,13 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "content/common/content_export.h"
namespace content {
class BrowserContext;
+class HostZoomMapImpl;
jam 2013/01/30 17:50:44 nit: not needed anymore
class ResourceContext;
// Maps hostnames to custom zoom levels. Written on the UI thread and read on
@@ -22,6 +24,8 @@ class ResourceContext;
// thread, and it'll delete itself on the UI thread as well.
class HostZoomMap {
public:
+ typedef base::Callback<void(const std::string&)> ZoomLevelChangedCallback;
jam 2013/01/30 17:50:44 nit: the convention in the content api is to decla
+
CONTENT_EXPORT static HostZoomMap* GetForBrowserContext(
BrowserContext* browser_context);
@@ -50,6 +54,12 @@ class HostZoomMap {
virtual double GetDefaultZoomLevel() const = 0;
virtual void SetDefaultZoomLevel(double level) = 0;;
+ // Add and remove zoom level changed callbacks.
+ virtual void AddZoomLevelChangedCallback(
+ ZoomLevelChangedCallback callback) = 0;
jam 2013/01/30 17:50:44 nit: callbacks, like other complex types, are pass
+ virtual void RemoveZoomLevelChangedCallback(
+ ZoomLevelChangedCallback callback) = 0;
+
protected:
virtual ~HostZoomMap() {}
};

Powered by Google App Engine
This is Rietveld 408576698