| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/input/scroll_elasticity_helper.h" | 5 #include "cc/input/scroll_elasticity_helper.h" |
| 6 | 6 |
| 7 #include "cc/layers/layer_impl.h" | 7 #include "cc/layers/layer_impl.h" |
| 8 #include "cc/trees/layer_tree_host_impl.h" | 8 #include "cc/trees/layer_tree_host_impl.h" |
| 9 #include "cc/trees/layer_tree_impl.h" | 9 #include "cc/trees/layer_tree_impl.h" |
| 10 | 10 |
| 11 namespace cc { | 11 namespace cc { |
| 12 | 12 |
| 13 class ScrollElasticityHelperImpl : public ScrollElasticityHelper { | 13 class ScrollElasticityHelperImpl : public ScrollElasticityHelper { |
| 14 public: | 14 public: |
| 15 explicit ScrollElasticityHelperImpl(LayerTreeHostImpl* layer_tree_host_impl); | 15 explicit ScrollElasticityHelperImpl(LayerTreeHostImpl* layer_tree_host_impl); |
| 16 virtual ~ScrollElasticityHelperImpl(); | 16 ~ScrollElasticityHelperImpl() override; |
| 17 | 17 |
| 18 // The amount that the view is stretched past the normal allowable bounds. | 18 // The amount that the view is stretched past the normal allowable bounds. |
| 19 // The "overhang" amount. | 19 // The "overhang" amount. |
| 20 gfx::Vector2dF StretchAmount() override; | 20 gfx::Vector2dF StretchAmount() override; |
| 21 void SetStretchAmount(const gfx::Vector2dF& stretch_amount) override; | 21 void SetStretchAmount(const gfx::Vector2dF& stretch_amount) override; |
| 22 bool PinnedInDirection(const gfx::Vector2dF& direction) override; | 22 bool PinnedInDirection(const gfx::Vector2dF& direction) override; |
| 23 bool CanScrollHorizontally() override; | 23 bool CanScrollHorizontally() override; |
| 24 bool CanScrollVertically() override; | 24 bool CanScrollVertically() override; |
| 25 void RequestAnimate() override; | 25 void RequestAnimate() override; |
| 26 | 26 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 layer_tree_host_impl_->SetNeedsAnimate(); | 84 layer_tree_host_impl_->SetNeedsAnimate(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 // static | 87 // static |
| 88 ScrollElasticityHelper* ScrollElasticityHelper::CreateForLayerTreeHostImpl( | 88 ScrollElasticityHelper* ScrollElasticityHelper::CreateForLayerTreeHostImpl( |
| 89 LayerTreeHostImpl* layer_tree_host_impl) { | 89 LayerTreeHostImpl* layer_tree_host_impl) { |
| 90 return new ScrollElasticityHelperImpl(layer_tree_host_impl); | 90 return new ScrollElasticityHelperImpl(layer_tree_host_impl); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace cc | 93 } // namespace cc |
| OLD | NEW |