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

Side by Side Diff: cc/input/scroll_elasticity_helper.h

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/input/input_handler.h ('k') | cc/input/scroll_elasticity_helper.cc » ('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 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 #ifndef CC_INPUT_SCROLL_ELASTICITY_HELPER_H_ 5 #ifndef CC_INPUT_SCROLL_ELASTICITY_HELPER_H_
6 #define CC_INPUT_SCROLL_ELASTICITY_HELPER_H_ 6 #define CC_INPUT_SCROLL_ELASTICITY_HELPER_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "ui/gfx/geometry/scroll_offset.h" 10 #include "ui/gfx/geometry/scroll_offset.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // would be possible, in principle, for LayerTreeHostImpl to implement this 45 // would be possible, in principle, for LayerTreeHostImpl to implement this
46 // interface itself. This artificial boundary is introduced to reduce the amount 46 // interface itself. This artificial boundary is introduced to reduce the amount
47 // of logic and state held directly inside LayerTreeHostImpl. 47 // of logic and state held directly inside LayerTreeHostImpl.
48 class CC_EXPORT ScrollElasticityHelper { 48 class CC_EXPORT ScrollElasticityHelper {
49 public: 49 public:
50 static ScrollElasticityHelper* CreateForLayerTreeHostImpl( 50 static ScrollElasticityHelper* CreateForLayerTreeHostImpl(
51 LayerTreeHostImpl* layer_tree_host_impl); 51 LayerTreeHostImpl* layer_tree_host_impl);
52 52
53 virtual ~ScrollElasticityHelper() {} 53 virtual ~ScrollElasticityHelper() {}
54 54
55 virtual bool IsUserScrollable() const = 0;
56
57 // The amount that the view is stretched past the normal allowable bounds. 55 // The amount that the view is stretched past the normal allowable bounds.
58 virtual gfx::Vector2dF StretchAmount() const = 0; 56 virtual gfx::Vector2dF StretchAmount() const = 0;
59 virtual void SetStretchAmount(const gfx::Vector2dF& stretch_amount) = 0; 57 virtual void SetStretchAmount(const gfx::Vector2dF& stretch_amount) = 0;
60 58
61 // Functions for the scrolling of the root scroll layer. 59 // Functions for the scrolling of the root scroll layer.
62 virtual gfx::ScrollOffset ScrollOffset() const = 0; 60 virtual gfx::ScrollOffset ScrollOffset() const = 0;
63 virtual gfx::ScrollOffset MaxScrollOffset() const = 0; 61 virtual gfx::ScrollOffset MaxScrollOffset() const = 0;
64 virtual void ScrollBy(const gfx::Vector2dF& delta) = 0; 62 virtual void ScrollBy(const gfx::Vector2dF& delta) = 0;
65 63
66 // Request that the controller have its Animate method called for the next 64 // Request that the controller have its Animate method called for the next
67 // frame. 65 // frame.
68 virtual void RequestAnimate() = 0; 66 virtual void RequestAnimate() = 0;
69 }; 67 };
70 68
71 } // namespace cc 69 } // namespace cc
72 70
73 #endif // CC_INPUT_SCROLL_ELASTICITY_HELPER_H_ 71 #endif // CC_INPUT_SCROLL_ELASTICITY_HELPER_H_
OLDNEW
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/input/scroll_elasticity_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698