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

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

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Mark OverscrollRefresh() as protected. Created 3 years, 4 months 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
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
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; }
dcheng 2017/08/25 23:12:17 Nit: for symmetry I would name this set_is_scroll_
sunyunjia 2017/08/29 17:32:30 Done.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698