OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_TREES_LAYER_TREE_HOST_COMMON_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // current page scale, the two must be committed at the same time to prevent | 168 // current page scale, the two must be committed at the same time to prevent |
169 // clamping. | 169 // clamping. |
170 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll; | 170 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll; |
171 | 171 |
172 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; | 172 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; |
173 float page_scale_delta; | 173 float page_scale_delta; |
174 gfx::Vector2dF elastic_overscroll_delta; | 174 gfx::Vector2dF elastic_overscroll_delta; |
175 float top_controls_delta; | 175 float top_controls_delta; |
176 std::vector<LayerTreeHostCommon::ScrollbarsUpdateInfo> scrollbars; | 176 std::vector<LayerTreeHostCommon::ScrollbarsUpdateInfo> scrollbars; |
177 std::vector<std::unique_ptr<SwapPromise>> swap_promises; | 177 std::vector<std::unique_ptr<SwapPromise>> swap_promises; |
| 178 bool has_scrolled_by_wheel; |
| 179 bool has_scrolled_by_touch; |
178 | 180 |
179 private: | 181 private: |
180 DISALLOW_COPY_AND_ASSIGN(ScrollAndScaleSet); | 182 DISALLOW_COPY_AND_ASSIGN(ScrollAndScaleSet); |
181 }; | 183 }; |
182 | 184 |
183 template <typename Function> | 185 template <typename Function> |
184 void LayerTreeHostCommon::CallFunctionForEveryLayer(LayerTreeHost* host, | 186 void LayerTreeHostCommon::CallFunctionForEveryLayer(LayerTreeHost* host, |
185 const Function& function) { | 187 const Function& function) { |
186 for (auto* layer : *host) { | 188 for (auto* layer : *host) { |
187 function(layer); | 189 function(layer); |
(...skipping 12 matching lines...) Expand all Loading... |
200 function(tree_impl->LayerById(id)); | 202 function(tree_impl->LayerById(id)); |
201 } | 203 } |
202 } | 204 } |
203 | 205 |
204 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); | 206 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); |
205 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); | 207 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); |
206 | 208 |
207 } // namespace cc | 209 } // namespace cc |
208 | 210 |
209 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 211 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
OLD | NEW |