| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void set_is_ending(bool is_ending) { data_.is_ending = is_ending; } | 54 void set_is_ending(bool is_ending) { data_.is_ending = is_ending; } |
| 55 | 55 |
| 56 // True if this scroll is allowed to bubble upwards. | 56 // True if this scroll is allowed to bubble upwards. |
| 57 bool should_propagate() const { return data_.should_propagate; } | 57 bool should_propagate() const { return data_.should_propagate; } |
| 58 // True if the user interacts directly with the screen, e.g., via touch. | 58 // True if the user interacts directly with the screen, e.g., via touch. |
| 59 bool is_direct_manipulation() const { return data_.is_direct_manipulation; } | 59 bool is_direct_manipulation() const { return data_.is_direct_manipulation; } |
| 60 void set_is_direct_manipulation(bool is_direct_manipulation) { | 60 void set_is_direct_manipulation(bool is_direct_manipulation) { |
| 61 data_.is_direct_manipulation = is_direct_manipulation; | 61 data_.is_direct_manipulation = is_direct_manipulation; |
| 62 } | 62 } |
| 63 | 63 |
| 64 void set_scroll_chain_and_layer_tree(std::list<ScrollNode*>* scroll_chain, | 64 void set_scroll_chain_and_layer_tree( |
| 65 LayerTreeImpl* layer_tree_impl) { | 65 const std::list<ScrollNode*>& scroll_chain, |
| 66 LayerTreeImpl* layer_tree_impl) { |
| 66 layer_tree_impl_ = layer_tree_impl; | 67 layer_tree_impl_ = layer_tree_impl; |
| 67 scroll_chain_ = *scroll_chain; | 68 scroll_chain_ = scroll_chain; |
| 68 } | 69 } |
| 69 | 70 |
| 70 void set_current_native_scrolling_node(ScrollNode* scroll_node) { | 71 void set_current_native_scrolling_node(ScrollNode* scroll_node) { |
| 71 data_.set_current_native_scrolling_node(scroll_node); | 72 data_.set_current_native_scrolling_node(scroll_node); |
| 72 } | 73 } |
| 73 | 74 |
| 74 ScrollNode* current_native_scrolling_node() const { | 75 ScrollNode* current_native_scrolling_node() const { |
| 75 return data_.current_native_scrolling_node(); | 76 return data_.current_native_scrolling_node(); |
| 76 } | 77 } |
| 77 | 78 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 97 | 98 |
| 98 private: | 99 private: |
| 99 ScrollStateData data_; | 100 ScrollStateData data_; |
| 100 LayerTreeImpl* layer_tree_impl_; | 101 LayerTreeImpl* layer_tree_impl_; |
| 101 std::list<ScrollNode*> scroll_chain_; | 102 std::list<ScrollNode*> scroll_chain_; |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace cc | 105 } // namespace cc |
| 105 | 106 |
| 106 #endif // CC_INPUT_SCROLL_STATE_H_ | 107 #endif // CC_INPUT_SCROLL_STATE_H_ |
| OLD | NEW |