| 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 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 bool FullyConsumed() const { return !data_.delta_x && !data_.delta_y; } | 86 bool FullyConsumed() const { return !data_.delta_x && !data_.delta_y; } |
| 87 | 87 |
| 88 void set_caused_scroll(bool x, bool y) { | 88 void set_caused_scroll(bool x, bool y) { |
| 89 data_.caused_scroll_x |= x; | 89 data_.caused_scroll_x |= x; |
| 90 data_.caused_scroll_y |= y; | 90 data_.caused_scroll_y |= y; |
| 91 } | 91 } |
| 92 | 92 |
| 93 bool caused_scroll_x() const { return data_.caused_scroll_x; } | 93 bool caused_scroll_x() const { return data_.caused_scroll_x; } |
| 94 bool caused_scroll_y() const { return data_.caused_scroll_y; } | 94 bool caused_scroll_y() const { return data_.caused_scroll_y; } |
| 95 | 95 |
| 96 LayerTreeImpl* layer_tree_impl() { return layer_tree_impl_; } |
| 96 ScrollStateData* data() { return &data_; } | 97 ScrollStateData* data() { return &data_; } |
| 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<const ScrollNode*> scroll_chain_; | 102 std::list<const 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 |