| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 return data_.current_native_scrolling_node(); | 76 return data_.current_native_scrolling_node(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 bool delta_consumed_for_scroll_sequence() const { | 79 bool delta_consumed_for_scroll_sequence() const { |
| 80 return data_.delta_consumed_for_scroll_sequence; | 80 return data_.delta_consumed_for_scroll_sequence; |
| 81 } | 81 } |
| 82 void set_delta_consumed_for_scroll_sequence(bool delta_consumed) { | 82 void set_delta_consumed_for_scroll_sequence(bool delta_consumed) { |
| 83 data_.delta_consumed_for_scroll_sequence = delta_consumed; | 83 data_.delta_consumed_for_scroll_sequence = delta_consumed; |
| 84 } | 84 } |
| 85 | 85 |
| 86 bool FullyConsumed() const { return !data_.delta_x && !data_.delta_y; } | 86 bool FullyConsumed() const { |
| 87 return !data_.delta_x && !data_.delta_y /* && !data_.overscroll_pending */; |
| 88 } |
| 87 | 89 |
| 88 void set_caused_scroll(bool x, bool y) { | 90 void set_caused_scroll(bool x, bool y) { |
| 89 data_.caused_scroll_x |= x; | 91 data_.caused_scroll_x |= x; |
| 90 data_.caused_scroll_y |= y; | 92 data_.caused_scroll_y |= y; |
| 91 } | 93 } |
| 92 | 94 |
| 93 bool caused_scroll_x() const { return data_.caused_scroll_x; } | 95 bool caused_scroll_x() const { return data_.caused_scroll_x; } |
| 94 bool caused_scroll_y() const { return data_.caused_scroll_y; } | 96 bool caused_scroll_y() const { return data_.caused_scroll_y; } |
| 95 | 97 |
| 96 LayerTreeImpl* layer_tree_impl() { return layer_tree_impl_; } | 98 LayerTreeImpl* layer_tree_impl() { return layer_tree_impl_; } |
| 97 ScrollStateData* data() { return &data_; } | 99 ScrollStateData* data() { return &data_; } |
| 98 | 100 |
| 99 private: | 101 private: |
| 100 ScrollStateData data_; | 102 ScrollStateData data_; |
| 101 LayerTreeImpl* layer_tree_impl_; | 103 LayerTreeImpl* layer_tree_impl_; |
| 102 std::list<const ScrollNode*> scroll_chain_; | 104 std::list<const ScrollNode*> scroll_chain_; |
| 103 }; | 105 }; |
| 104 | 106 |
| 105 } // namespace cc | 107 } // namespace cc |
| 106 | 108 |
| 107 #endif // CC_INPUT_SCROLL_STATE_H_ | 109 #endif // CC_INPUT_SCROLL_STATE_H_ |
| OLD | NEW |