| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1839 FROM_HERE, | 1839 FROM_HERE, |
| 1840 base::Bind(&LayerTreeHostScrollTestElasticOverscroll::BindInputHandler, | 1840 base::Bind(&LayerTreeHostScrollTestElasticOverscroll::BindInputHandler, |
| 1841 base::Unretained(this), | 1841 base::Unretained(this), |
| 1842 layer_tree_host()->GetInputHandler())); | 1842 layer_tree_host()->GetInputHandler())); |
| 1843 PostSetNeedsCommitToMainThread(); | 1843 PostSetNeedsCommitToMainThread(); |
| 1844 } | 1844 } |
| 1845 | 1845 |
| 1846 void BindInputHandler(const base::WeakPtr<InputHandler> input_handler) { | 1846 void BindInputHandler(const base::WeakPtr<InputHandler> input_handler) { |
| 1847 DCHECK(task_runner_provider()->IsImplThread()); | 1847 DCHECK(task_runner_provider()->IsImplThread()); |
| 1848 input_handler->BindToClient(&input_handler_client_); | 1848 input_handler->BindToClient(&input_handler_client_); |
| 1849 scroll_elasticity_helper_ = input_handler->CreateScrollElasticityHelper(); | 1849 scroll_elasticity_helper_ = |
| 1850 input_handler->CreateRootScrollElasticityHelper(); |
| 1850 DCHECK(scroll_elasticity_helper_); | 1851 DCHECK(scroll_elasticity_helper_); |
| 1851 } | 1852 } |
| 1852 | 1853 |
| 1853 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, | 1854 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, |
| 1854 const gfx::Vector2dF& outer_delta, | 1855 const gfx::Vector2dF& outer_delta, |
| 1855 const gfx::Vector2dF& elastic_overscroll_delta, | 1856 const gfx::Vector2dF& elastic_overscroll_delta, |
| 1856 float scale, | 1857 float scale, |
| 1857 float top_controls_delta) override { | 1858 float top_controls_delta) override { |
| 1858 DCHECK_NE(0, num_begin_main_frames_main_thread_) | 1859 DCHECK_NE(0, num_begin_main_frames_main_thread_) |
| 1859 << "The first BeginMainFrame has no deltas to report"; | 1860 << "The first BeginMainFrame has no deltas to report"; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2041 private: | 2042 private: |
| 2042 gfx::ScrollOffset initial_scroll_; | 2043 gfx::ScrollOffset initial_scroll_; |
| 2043 gfx::ScrollOffset second_scroll_; | 2044 gfx::ScrollOffset second_scroll_; |
| 2044 gfx::Vector2dF scroll_amount_; | 2045 gfx::Vector2dF scroll_amount_; |
| 2045 }; | 2046 }; |
| 2046 | 2047 |
| 2047 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestPropertyTreeUpdate); | 2048 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestPropertyTreeUpdate); |
| 2048 | 2049 |
| 2049 } // namespace | 2050 } // namespace |
| 2050 } // namespace cc | 2051 } // namespace cc |
| OLD | NEW |