Index: cc/pinch_zoom_viewport.h |
diff --git a/cc/pinch_zoom_viewport.h b/cc/pinch_zoom_viewport.h |
index 0b55a3fe97df425ff9806172abb22739a1e92221..7c70a261cef219c168916b5beab975cd557e3c05 100644 |
--- a/cc/pinch_zoom_viewport.h |
+++ b/cc/pinch_zoom_viewport.h |
@@ -6,18 +6,22 @@ |
#define CC_PINCH_ZOOM_VIEWPORT_H_ |
#include "cc/cc_export.h" |
+#include "cc/pinch_zoom_scrollbar_layer_impl.h" |
#include "ui/gfx/rect.h" |
#include "ui/gfx/transform.h" |
namespace cc { |
+class LayerTreeHostImpl; |
+ |
// PinchZoomViewport models the bounds and offset of the viewport that is used |
// during a pinch-zoom operation. It tracks the layout-space dimensions of the |
// viewport before any applied scale, and then tracks the layout-space |
// coordinates of the viewport respecting the pinch settings. |
class CC_EXPORT PinchZoomViewport { |
public: |
- PinchZoomViewport(); |
+ PinchZoomViewport(LayerTreeHostImpl*); |
+ ~PinchZoomViewport(); |
float total_page_scale_factor() const { |
return page_scale_factor_ * page_scale_delta_; |
@@ -58,6 +62,9 @@ class CC_EXPORT PinchZoomViewport { |
void set_layout_viewport_size(const gfx::SizeF& size) { |
layout_viewport_size_ = size; |
} |
+ gfx::SizeF layout_viewport_size() { |
+ return layout_viewport_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 |
@@ -71,6 +78,11 @@ class CC_EXPORT PinchZoomViewport { |
// implTransform = S[pageScale] * Tr[-zoomedDeviceViewportOffset] |
gfx::Transform ImplTransform(bool page_scale_pinch_zoom_enabled) const; |
+ LayerImpl* root_scroll_layer(); |
+ LayerImpl* currently_scrolling_layer() const; |
+ |
+ void AddPinchZoomScrollbarsToTree(LayerTreeImpl*); |
+ |
private: |
float page_scale_factor_; |
float page_scale_delta_; |
@@ -81,6 +93,10 @@ class CC_EXPORT PinchZoomViewport { |
gfx::Vector2dF zoomed_viewport_offset_; |
gfx::SizeF layout_viewport_size_; |
+ |
+ PinchZoomScrollbarState vertical_scrollbar_client_; |
+ PinchZoomScrollbarState horizontal_scrollbar_client_; |
+ LayerTreeHostImpl* owner_; |
}; |
} // namespace cc |