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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 bool FullyConsumed() const { return !data_.delta_x && !data_.delta_y; } | 90 bool FullyConsumed() const { return !data_.delta_x && !data_.delta_y; } |
91 | 91 |
92 void set_caused_scroll(bool x, bool y) { | 92 void set_caused_scroll(bool x, bool y) { |
93 data_.caused_scroll_x |= x; | 93 data_.caused_scroll_x |= x; |
94 data_.caused_scroll_y |= y; | 94 data_.caused_scroll_y |= y; |
95 } | 95 } |
96 | 96 |
97 bool caused_scroll_x() const { return data_.caused_scroll_x; } | 97 bool caused_scroll_x() const { return data_.caused_scroll_x; } |
98 bool caused_scroll_y() const { return data_.caused_scroll_y; } | 98 bool caused_scroll_y() const { return data_.caused_scroll_y; } |
99 | 99 |
| 100 void set_scroll_chain_cut(bool cut) { data_.is_scroll_chain_cut = cut; } |
| 101 |
| 102 bool is_scroll_chain_cut() const { return data_.is_scroll_chain_cut; } |
| 103 |
100 LayerTreeImpl* layer_tree_impl() { return layer_tree_impl_; } | 104 LayerTreeImpl* layer_tree_impl() { return layer_tree_impl_; } |
101 ScrollStateData* data() { return &data_; } | 105 ScrollStateData* data() { return &data_; } |
102 | 106 |
103 private: | 107 private: |
104 ScrollStateData data_; | 108 ScrollStateData data_; |
105 LayerTreeImpl* layer_tree_impl_; | 109 LayerTreeImpl* layer_tree_impl_; |
106 std::list<ScrollNode*> scroll_chain_; | 110 std::list<ScrollNode*> scroll_chain_; |
107 }; | 111 }; |
108 | 112 |
109 } // namespace cc | 113 } // namespace cc |
110 | 114 |
111 #endif // CC_INPUT_SCROLL_STATE_H_ | 115 #endif // CC_INPUT_SCROLL_STATE_H_ |
OLD | NEW |