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

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

Issue 2194833002: Overscroll and Elasticity for views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-RouteThroughInputHandler
Patch Set: Restore functionality and fix bugs \o/ Created 4 years, 1 month 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 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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