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

Unified Diff: content/browser/host_zoom_map_impl.h

Issue 302603012: Zoom Extension API (content changes) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | content/browser/host_zoom_map_impl.cc » ('j') | content/renderer/render_thread_impl.cc » ('J')
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 096e64de674594da3a84a122a308d5c7b9fa4547..5e1856a176770d1ea01c8de7739cfdb5dd8f07e8 100644
--- a/content/browser/host_zoom_map_impl.h
+++ b/content/browser/host_zoom_map_impl.h
@@ -41,6 +41,12 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
const std::string& scheme,
const std::string& host,
double level) OVERRIDE;
+ virtual void SetTemporaryZoomLevel(int render_process_id,
+ int render_view_id,
+ const std::string& host,
+ double level) OVERRIDE;
+ virtual void EraseTemporaryZoomLevel(int render_process_id,
+ int render_view_id) OVERRIDE;
virtual double GetDefaultZoomLevel() const OVERRIDE;
virtual void SetDefaultZoomLevel(double level) OVERRIDE;
virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback(
@@ -83,22 +89,20 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
double GetTemporaryZoomLevel(int render_process_id,
int render_view_id) const;
- // Sets the temporary zoom level that's only valid for the lifetime of this
- // WebContents.
- //
- // This should only be called on the UI thread.
- void SetTemporaryZoomLevel(int render_process_id,
- int render_view_id,
- double level);
-
// NotificationObserver implementation.
virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
- private:
+private:
double GetZoomLevelForHost(const std::string& host) const;
+ // Notifies the renderers from this browser context to change the zoom level
+ // for the specified host and scheme.
+ void SendZoomLevelChange(const std::string& scheme,
+ const std::string& host,
+ double level);
+
typedef std::map<std::string, double> HostZoomLevels;
typedef std::map<std::string, HostZoomLevels> SchemeHostZoomLevels;
« no previous file with comments | « no previous file | content/browser/host_zoom_map_impl.cc » ('j') | content/renderer/render_thread_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698