Chromium Code Reviews| 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 e98e74e424ec5b5c4e7c5ec1f4807a1757ffcdef..c97885d1b33829b96661eb1ce79213f9de98ef76 100644 |
| --- a/content/public/browser/host_zoom_map.h |
| +++ b/content/public/browser/host_zoom_map.h |
| @@ -78,6 +78,13 @@ class HostZoomMap { |
| const std::string& scheme, |
| const std::string& host) const = 0; |
| + // Returns true if the specified |scheme| and/or |host| has a zoom level |
| + // currently set. |
| + // |
| + // This may be called on any thread. |
| + virtual bool HasZoomLevelInMap(const std::string& scheme, |
|
Fady Samuel
2014/06/09 15:43:21
I'm not a fan of calling this thing a map at all a
wjmaclean
2014/06/09 17:23:29
Done.
|
| + const std::string& host) const = 0; |
| + |
| // Returns all non-temporary zoom levels. Can only be called on any thread. |
| virtual ZoomLevelVector GetAllZoomLevels() const = 0; |
| @@ -102,13 +109,29 @@ class HostZoomMap { |
| const std::string& host, |
| double level) = 0; |
| + // Sets the temporary zoom level that's only valid for the lifetime of this |
| + // WebContents. |
| + // |
| + // This should only be called on the UI thread. |
| + virtual void SetTemporaryZoomLevel(int render_process_id, |
| + int render_view_id, |
| + const std::string& host, |
| + double level, |
| + bool send_level_to_view) =0; |
|
Fady Samuel
2014/06/09 15:43:21
This last parameter is really confusing at an API
wjmaclean
2014/06/09 17:23:29
Ok, I can look into separating this.
One consider
wjmaclean
2014/06/10 13:20:09
Done.
|
| + |
| + // Erases the temporary zoom level stored for this WebContents. |
| + // |
| + // This should only be called on the UI thread. |
| + virtual void EraseTemporaryZoomLevel(int render_process_id, |
|
Fady Samuel
2014/06/09 15:43:21
name: ClearTemporaryZoomLevel
wjmaclean
2014/06/09 17:23:29
Done.
|
| + int render_view_id) = 0; |
| + |
| // Get/Set the default zoom level for pages that don't override it. |
| virtual double GetDefaultZoomLevel() const = 0; |
| virtual void SetDefaultZoomLevel(double level) = 0;; |
| typedef base::Callback<void(const ZoomLevelChange&)> ZoomLevelChangedCallback; |
| typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription |
| - Subscription; |
| + Subscription; |
| // Add and remove zoom level changed callbacks. |
| virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback( |
| const ZoomLevelChangedCallback& callback) = 0; |