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

Unified Diff: content/browser/host_zoom_map_impl.h

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 6 years, 4 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/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 821fa0e4923e7bc9caaa5548a7592cb2cc0994a5..867e744911b3cce6a8a98cddee153d252c4eda74 100644
--- a/content/browser/host_zoom_map_impl.h
+++ b/content/browser/host_zoom_map_impl.h
@@ -17,6 +17,10 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+namespace base {
+class DictionaryValue;
+}
+
namespace content {
class WebContentsImpl;
@@ -24,10 +28,9 @@ class WebContentsImpl;
// HostZoomMap needs to be deleted on the UI thread because it listens
// to notifications on there (and holds a NotificationRegistrar).
class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
- public NotificationObserver,
- public base::SupportsUserData::Data {
+ public NotificationObserver {
public:
- HostZoomMapImpl();
+ explicit HostZoomMapImpl(double default_zoom_level);
virtual ~HostZoomMapImpl();
// HostZoomMap implementation:
@@ -59,6 +62,12 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback(
const ZoomLevelChangedCallback& callback) OVERRIDE;
+ // Returns a dictionary of ZoomLevels. Schemes are stripped away, but
+ // scheme+host zoom levels are included. Caller assumes ownership of the
awong 2014/08/12 21:07:06 "Caller assumes ownership..." is redundant when sc
wjmaclean 2014/08/13 17:16:03 Done.
+ // returned pointer.
+ // TODO(wjmaclean) Should we return an owned pointer here?
awong 2014/08/12 21:07:06 Unsure what this TODO means. Seems like you alread
wjmaclean 2014/08/13 17:16:03 Ha, probably a stale TODO() comment. Done.
+ scoped_ptr<base::DictionaryValue> ZoomLevelDictionary() const;
+
// Returns the current zoom level for the specified WebContents. This may
// be a temporary zoom level, depending on UsesTemporaryZoomLevel().
double GetZoomLevelForWebContents(

Powered by Google App Engine
This is Rietveld 408576698