Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 2189583004: [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 FROM_HERE, 1838 FROM_HERE,
1839 base::Bind(&LayerTreeHostScrollTestElasticOverscroll::BindInputHandler, 1839 base::Bind(&LayerTreeHostScrollTestElasticOverscroll::BindInputHandler,
1840 base::Unretained(this), 1840 base::Unretained(this),
1841 layer_tree_host()->GetInputHandler())); 1841 layer_tree_host()->GetInputHandler()));
1842 PostSetNeedsCommitToMainThread(); 1842 PostSetNeedsCommitToMainThread();
1843 } 1843 }
1844 1844
1845 void BindInputHandler(const base::WeakPtr<InputHandler> input_handler) { 1845 void BindInputHandler(const base::WeakPtr<InputHandler> input_handler) {
1846 DCHECK(task_runner_provider()->IsImplThread()); 1846 DCHECK(task_runner_provider()->IsImplThread());
1847 input_handler->BindToClient(&input_handler_client_); 1847 input_handler->BindToClient(&input_handler_client_);
1848 scroll_elasticity_helper_ = input_handler->CreateScrollElasticityHelper(); 1848 scroll_elasticity_helper_ =
1849 input_handler->CreateRootScrollElasticityHelper();
1849 DCHECK(scroll_elasticity_helper_); 1850 DCHECK(scroll_elasticity_helper_);
1850 } 1851 }
1851 1852
1852 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, 1853 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta,
1853 const gfx::Vector2dF& outer_delta, 1854 const gfx::Vector2dF& outer_delta,
1854 const gfx::Vector2dF& elastic_overscroll_delta, 1855 const gfx::Vector2dF& elastic_overscroll_delta,
1855 float scale, 1856 float scale,
1856 float top_controls_delta) override { 1857 float top_controls_delta) override {
1857 DCHECK_NE(0, num_begin_main_frames_main_thread_) 1858 DCHECK_NE(0, num_begin_main_frames_main_thread_)
1858 << "The first BeginMainFrame has no deltas to report"; 1859 << "The first BeginMainFrame has no deltas to report";
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 1974
1974 const gfx::Vector2dF elastic_overscroll_test_cases_[5] = { 1975 const gfx::Vector2dF elastic_overscroll_test_cases_[5] = {
1975 gfx::Vector2dF(0, 0), gfx::Vector2dF(5, 10), gfx::Vector2dF(5, 5), 1976 gfx::Vector2dF(0, 0), gfx::Vector2dF(5, 10), gfx::Vector2dF(5, 5),
1976 gfx::Vector2dF(-4, -5), gfx::Vector2dF(0, 0)}; 1977 gfx::Vector2dF(-4, -5), gfx::Vector2dF(0, 0)};
1977 }; 1978 };
1978 1979
1979 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestElasticOverscroll); 1980 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestElasticOverscroll);
1980 1981
1981 } // namespace 1982 } // namespace
1982 } // namespace cc 1983 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698