Chromium Code Reviews| Index: cc/pinch_zoom_viewport.h |
| diff --git a/cc/pinch_zoom_viewport.h b/cc/pinch_zoom_viewport.h |
| index 0b55a3fe97df425ff9806172abb22739a1e92221..31bd2a4ddc9c6ef6f367362e031edd42325c38d0 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,9 @@ class CC_EXPORT PinchZoomViewport { |
| void set_layout_viewport_size(const gfx::SizeF& size) { |
| layout_viewport_size_ = size; |
| } |
| + void set_device_viewport_size(const gfx::SizeF& size) { |
|
wjmaclean
2013/01/17 19:45:52
Perhaps add a comment explaining why we need to st
aelias_OOO_until_Jul13
2013/01/17 19:59:46
Done.
|
| + 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 +85,7 @@ class CC_EXPORT PinchZoomViewport { |
| gfx::Vector2dF zoomed_viewport_offset_; |
| gfx::SizeF layout_viewport_size_; |
| + gfx::SizeF device_viewport_size_; |
| }; |
| } // namespace cc |