Index: cc/pinch_zoom_viewport.h |
diff --git a/cc/pinch_zoom_viewport.h b/cc/pinch_zoom_viewport.h |
index 0b55a3fe97df425ff9806172abb22739a1e92221..9efe38667345bcbece241c50e5f493250ebe1319 100644 |
--- a/cc/pinch_zoom_viewport.h |
+++ b/cc/pinch_zoom_viewport.h |
@@ -47,9 +47,10 @@ class CC_EXPORT PinchZoomViewport { |
float min_page_scale_factor, |
float max_page_scale_factor); |
- // Returns the bounds and offset of the scaled and translated viewport to use |
- // for pinch-zoom. |
- gfx::RectF Bounds() const; |
+ // Returns the zoomed viewport in layout space. The rect's position is an |
+ // offset from the root layer's scroll position (therefore, zero if fully |
+ // zoomed out). |
+ gfx::RectF ZoomedViewport() const; |
const gfx::Vector2dF& zoomed_viewport_offset() const { |
return zoomed_viewport_offset_; |
@@ -58,6 +59,12 @@ class CC_EXPORT PinchZoomViewport { |
void set_layout_viewport_size(const gfx::SizeF& size) { |
layout_viewport_size_ = size; |
} |
+ // We need to store device_viewport_size separately because in mobile |
+ // fixed-layout mode, there is not necessarily a simple mapping between layout |
+ // viewport size and device viewport size. |
+ void set_device_viewport_size(const gfx::SizeF& size) { |
+ device_viewport_size_ = size; |
+ } |
// Apply the scroll offset in layout space to the offset of the pinch-zoom |
// viewport. The viewport cannot be scrolled outside of the layout viewport |
@@ -81,6 +88,7 @@ class CC_EXPORT PinchZoomViewport { |
gfx::Vector2dF zoomed_viewport_offset_; |
gfx::SizeF layout_viewport_size_; |
+ gfx::SizeF device_viewport_size_; |
}; |
} // namespace cc |