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

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

Issue 2713713002: Reconstitute const-ref parameter to set_scroll_chain_and_layer_tree (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698