OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 const LayerSelectionBound& end); | 284 const LayerSelectionBound& end); |
285 | 285 |
286 // Compute the current selection handle location and visbility with respect to | 286 // Compute the current selection handle location and visbility with respect to |
287 // the viewport. | 287 // the viewport. |
288 void GetViewportSelection(ViewportSelectionBound* start, | 288 void GetViewportSelection(ViewportSelectionBound* start, |
289 ViewportSelectionBound* end); | 289 ViewportSelectionBound* end); |
290 | 290 |
291 void RegisterPictureLayerImpl(PictureLayerImpl* layer); | 291 void RegisterPictureLayerImpl(PictureLayerImpl* layer); |
292 void UnregisterPictureLayerImpl(PictureLayerImpl* layer); | 292 void UnregisterPictureLayerImpl(PictureLayerImpl* layer); |
293 | 293 |
| 294 void set_top_controls_content_offset(float offset) { |
| 295 top_controls_content_offset_ = offset; |
| 296 } |
| 297 void set_top_controls_delta(float delta) { |
| 298 top_controls_delta_ = delta; |
| 299 } |
| 300 void set_sent_top_controls_delta(float sent_delta) { |
| 301 sent_top_controls_delta_ = sent_delta; |
| 302 } |
| 303 |
| 304 float top_controls_content_offset() const { |
| 305 return top_controls_content_offset_; |
| 306 } |
| 307 float top_controls_delta() const { |
| 308 return top_controls_delta_; |
| 309 } |
| 310 float sent_top_controls_delta() const { |
| 311 return sent_top_controls_delta_; |
| 312 } |
| 313 float total_top_controls_content_offset() const { |
| 314 return top_controls_content_offset_ + top_controls_delta_; |
| 315 } |
| 316 |
294 protected: | 317 protected: |
295 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 318 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
296 void ReleaseResourcesRecursive(LayerImpl* current); | 319 void ReleaseResourcesRecursive(LayerImpl* current); |
297 | 320 |
298 LayerTreeHostImpl* layer_tree_host_impl_; | 321 LayerTreeHostImpl* layer_tree_host_impl_; |
299 int source_frame_number_; | 322 int source_frame_number_; |
300 scoped_ptr<LayerImpl> root_layer_; | 323 scoped_ptr<LayerImpl> root_layer_; |
301 HeadsUpDisplayLayerImpl* hud_layer_; | 324 HeadsUpDisplayLayerImpl* hud_layer_; |
302 LayerImpl* currently_scrolling_layer_; | 325 LayerImpl* currently_scrolling_layer_; |
303 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 326 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 bool next_activation_forces_redraw_; | 367 bool next_activation_forces_redraw_; |
345 | 368 |
346 bool has_ever_been_drawn_; | 369 bool has_ever_been_drawn_; |
347 | 370 |
348 ScopedPtrVector<SwapPromise> swap_promise_list_; | 371 ScopedPtrVector<SwapPromise> swap_promise_list_; |
349 | 372 |
350 UIResourceRequestQueue ui_resource_request_queue_; | 373 UIResourceRequestQueue ui_resource_request_queue_; |
351 | 374 |
352 int render_surface_layer_list_id_; | 375 int render_surface_layer_list_id_; |
353 | 376 |
| 377 // Height of the top controls as known by Blink. |
| 378 float top_controls_content_offset_; |
| 379 float top_controls_delta_; |
| 380 float sent_top_controls_delta_; |
| 381 |
354 private: | 382 private: |
355 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 383 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
356 }; | 384 }; |
357 | 385 |
358 } // namespace cc | 386 } // namespace cc |
359 | 387 |
360 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 388 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |