Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: cc/input/scroll_state.h

Issue 2194833002: Overscroll and Elasticity for views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-RouteThroughInputHandler
Patch Set: Restore functionality and fix bugs \o/ Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/input/scroll_elasticity_helper.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « cc/input/scroll_elasticity_helper.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698