OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_STATE_H_ | 5 #ifndef CC_INPUT_SCROLL_STATE_H_ |
6 #define CC_INPUT_SCROLL_STATE_H_ | 6 #define CC_INPUT_SCROLL_STATE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 // Reduce deltas by x, y. | 28 // Reduce deltas by x, y. |
29 void ConsumeDelta(double x, double y); | 29 void ConsumeDelta(double x, double y); |
30 // Pops the first layer off of |scroll_chain_| and calls | 30 // Pops the first layer off of |scroll_chain_| and calls |
31 // |DistributeScroll| on it. | 31 // |DistributeScroll| on it. |
32 void DistributeToScrollChainDescendant(); | 32 void DistributeToScrollChainDescendant(); |
33 // Positive when scrolling right. | 33 // Positive when scrolling right. |
34 double delta_x() const { return data_.delta_x; } | 34 double delta_x() const { return data_.delta_x; } |
35 // Positive when scrolling down. | 35 // Positive when scrolling down. |
36 double delta_y() const { return data_.delta_y; } | 36 double delta_y() const { return data_.delta_y; } |
| 37 // Positive when scrolling right. |
| 38 double delta_x_hint() const { return data_.delta_x_hint; } |
| 39 // Positive when scrolling down. |
| 40 double delta_y_hint() const { return data_.delta_y_hint; } |
| 41 bool ignore_delta_hints() const { return data_.ignore_delta_hints; } |
37 // The location associated with this scroll update. For touch, this is the | 42 // The location associated with this scroll update. For touch, this is the |
38 // position of the finger. For mouse, the location of the cursor. | 43 // position of the finger. For mouse, the location of the cursor. |
39 int position_x() const { return data_.position_x; } | 44 int position_x() const { return data_.position_x; } |
40 int position_y() const { return data_.position_y; } | 45 int position_y() const { return data_.position_y; } |
41 | 46 |
42 double velocity_x() const { return data_.velocity_x; } | 47 double velocity_x() const { return data_.velocity_x; } |
43 double velocity_y() const { return data_.velocity_y; } | 48 double velocity_y() const { return data_.velocity_y; } |
44 | 49 |
45 bool is_beginning() const { return data_.is_beginning; } | 50 bool is_beginning() const { return data_.is_beginning; } |
46 void set_is_beginning(bool is_beginning) { | 51 void set_is_beginning(bool is_beginning) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 103 |
99 private: | 104 private: |
100 ScrollStateData data_; | 105 ScrollStateData data_; |
101 LayerTreeImpl* layer_tree_impl_; | 106 LayerTreeImpl* layer_tree_impl_; |
102 std::list<ScrollNode*> scroll_chain_; | 107 std::list<ScrollNode*> scroll_chain_; |
103 }; | 108 }; |
104 | 109 |
105 } // namespace cc | 110 } // namespace cc |
106 | 111 |
107 #endif // CC_INPUT_SCROLL_STATE_H_ | 112 #endif // CC_INPUT_SCROLL_STATE_H_ |
OLD | NEW |