| Index: cc/layer_tree_impl.cc
|
| diff --git a/cc/layer_tree_impl.cc b/cc/layer_tree_impl.cc
|
| index d434bb0e6a2a4f78f1706fa3740720224f8bc1d0..60e85decb6cf191cb9c234784d61e7b7f177b9b9 100644
|
| --- a/cc/layer_tree_impl.cc
|
| +++ b/cc/layer_tree_impl.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "cc/layer_tree_host_common.h"
|
| #include "cc/layer_tree_host_impl.h"
|
| +#include "cc/pinch_zoom_scrollbars_manager.h"
|
|
|
| namespace cc {
|
|
|
| @@ -13,9 +14,13 @@ LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl)
|
| : layer_tree_host_impl_(layer_tree_host_impl)
|
| , source_frame_number_(-1)
|
| , hud_layer_(0)
|
| + , pinch_zoom_scrollbar_vertical_(0)
|
| + , pinch_zoom_scrollbar_horizontal_(0)
|
| , root_scroll_layer_(0)
|
| , currently_scrolling_layer_(0)
|
| , scrolling_layer_id_from_previous_tree_(0) {
|
| + if (settings().pageScalePinchZoomEnabled)
|
| + pinch_zoom_scrollbars_ = PinchZoomScrollbarsManager::create();
|
| }
|
|
|
| LayerTreeImpl::~LayerTreeImpl() {
|
| @@ -54,6 +59,20 @@ void LayerTreeImpl::SetRootLayer(scoped_ptr<LayerImpl> layer) {
|
| layer_tree_host_impl_->OnCanDrawStateChangedForTree(this);
|
| }
|
|
|
| +void LayerTreeImpl::set_pinch_zoom_scrollbar_vertical(ScrollbarLayerImpl* layer_impl)
|
| +{
|
| + pinch_zoom_scrollbar_vertical_ = layer_impl;
|
| + if (pinch_zoom_scrollbars_)
|
| + pinch_zoom_scrollbars_->setScrollbarVertical(layer_impl);
|
| +}
|
| +
|
| +void LayerTreeImpl::set_pinch_zoom_scrollbar_horizontal(ScrollbarLayerImpl* layer_impl)
|
| +{
|
| + pinch_zoom_scrollbar_horizontal_ = layer_impl;
|
| + if (pinch_zoom_scrollbars_)
|
| + pinch_zoom_scrollbars_->setScrollbarHorizontal(layer_impl);
|
| +}
|
| +
|
| scoped_ptr<LayerImpl> LayerTreeImpl::DetachLayerTree() {
|
| // Clear all data structures that have direct references to the layer tree.
|
| scrolling_layer_id_from_previous_tree_ =
|
|
|