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

Side by Side Diff: cc/trees/tree_scroll_elasticity_client.h

Issue 704463003: Move overscroll bounce to impl thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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_impl.cc ('k') | cc/trees/tree_scroll_elasticity_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_TREES_TREE_SCROLL_ELASTICITY_CLIENT_H_
6 #define CC_TREES_TREE_SCROLL_ELASTICITY_CLIENT_H_
7
8 #include "cc/input/scroll_elasticity_controller.h"
9
10 namespace cc {
11
12 class LayerTreeHostImpl;
13
14 class TreeScrollElasticityClient
15 : public ScrollElasticityControllerClient {
16 public:
17 TreeScrollElasticityClient(LayerTreeHostImpl* tree);
18 virtual ~TreeScrollElasticityClient();
19
20 ScrollElasticityController* controller() const { return controller_; }
21
22 // cc::ScrollElasticityControllerClient implementation:
23 void BindToController(ScrollElasticityController* controller) override;
24 bool allowsHorizontalStretching() const override;
25 bool allowsVerticalStretching() const override;
26 gfx::Vector2dF stretchAmount() const override;
27 bool pinnedInDirection(const gfx::Vector2dF& delta) const override;
28 bool canScrollHorizontally() const override;
29 bool canScrollVertically() const override;
30 gfx::Vector2dF absoluteScrollPosition() const override;
31 void immediateScrollBy(const gfx::Vector2dF& delta) override;
32 void immediateScrollByWithoutContentEdgeConstraints(const gfx::Vector2dF& delt a) override;
33 void startSnapRubberbandTimer() override;
34 void stopSnapRubberbandTimer() override;
35 void adjustScrollPositionToBoundsIfNecessary() override;
36
37 private:
38 LayerTreeHostImpl* tree_;
39 gfx::Vector2dF stretch_offset_;
40 bool timer_active_;
41 ScrollElasticityController* controller_;
42 };
43
44 } // namespace cc
45
46 #endif // CC_TREES_TREE_SCROLL_ELASTICITY_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/tree_scroll_elasticity_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698