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 468bf68b735f47f20706ca76760ef2e6345faee1..a9b2a45d3ef5e3fc0ffc9a38f2341530f82ba7b9 100644 |
--- a/content/browser/host_zoom_map_impl.h |
+++ b/content/browser/host_zoom_map_impl.h |
@@ -29,6 +29,10 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap), |
~HostZoomMapImpl() override; |
// HostZoomMap implementation: |
+ void SetPageScaleFactorIsOneForView( |
+ int render_process_id, int render_view_id, bool is_one) override; |
+ void ClearPageScaleFactorIsOneForView( |
+ int render_process_id, int render_view_id) override; |
void CopyFrom(HostZoomMap* copy) override; |
double GetZoomLevelForHostAndScheme(const std::string& scheme, |
const std::string& host) const override; |
@@ -58,6 +62,9 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap), |
double GetZoomLevelForWebContents( |
const WebContentsImpl& web_contents_impl) const; |
+ bool PageScaleFactorIsOneForWebContents( |
+ const WebContentsImpl& web_contents_impl) const; |
+ |
// Sets the zoom level for this WebContents. If this WebContents is using |
// a temporary zoom level, then level is only applied to this WebContents. |
// Otherwise, the level will be applied on a host level. |
@@ -112,6 +119,7 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap), |
}; |
typedef std::map<RenderViewKey, double> TemporaryZoomLevels; |
+ typedef std::map<RenderViewKey, bool> ViewPageScaleFactorsAreOne; |
double GetZoomLevelForHost(const std::string& host) const; |
@@ -137,12 +145,16 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap), |
SchemeHostZoomLevels scheme_host_zoom_levels_; |
double default_zoom_level_; |
+ // Page scale factor data for each renderer. |
+ ViewPageScaleFactorsAreOne view_page_scale_factors_are_one_; |
+ |
// Don't expect more than a couple of tabs that are using a temporary zoom |
// level, so vector is fine for now. |
TemporaryZoomLevels temporary_zoom_levels_; |
- // Used around accesses to |host_zoom_levels_|, |default_zoom_level_| and |
- // |temporary_zoom_levels_| to guarantee thread safety. |
+ // Used around accesses to |host_zoom_levels_|, |default_zoom_level_|, |
+ // |temporary_zoom_levels_|, and |view_page_scale_factors_are_one_| to |
+ // guarantee thread safety. |
mutable base::Lock lock_; |
NotificationRegistrar registrar_; |