| 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 <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 // the viewport. | 288 // the viewport. |
| 289 void GetViewportSelection(ViewportSelectionBound* start, | 289 void GetViewportSelection(ViewportSelectionBound* start, |
| 290 ViewportSelectionBound* end); | 290 ViewportSelectionBound* end); |
| 291 | 291 |
| 292 void RegisterPictureLayerImpl(PictureLayerImpl* layer); | 292 void RegisterPictureLayerImpl(PictureLayerImpl* layer); |
| 293 void UnregisterPictureLayerImpl(PictureLayerImpl* layer); | 293 void UnregisterPictureLayerImpl(PictureLayerImpl* layer); |
| 294 | 294 |
| 295 void set_top_controls_layout_height(float height) { | 295 void set_top_controls_layout_height(float height) { |
| 296 top_controls_layout_height_ = height; | 296 top_controls_layout_height_ = height; |
| 297 } | 297 } |
| 298 void set_top_controls_top_offset(float offset) { | 298 void set_top_controls_content_offset(float offset) { |
| 299 top_controls_top_offset_ = offset; | 299 top_controls_content_offset_ = offset; |
| 300 } | 300 } |
| 301 void set_top_controls_delta(float delta) { | 301 void set_top_controls_delta(float delta) { |
| 302 top_controls_delta_ = delta; | 302 top_controls_delta_ = delta; |
| 303 } | 303 } |
| 304 void set_sent_top_controls_delta(float sent_delta) { | 304 void set_sent_top_controls_delta(float sent_delta) { |
| 305 sent_top_controls_delta_ = sent_delta; | 305 sent_top_controls_delta_ = sent_delta; |
| 306 } | 306 } |
| 307 | 307 |
| 308 float top_controls_layout_height() const { | 308 float top_controls_layout_height() const { |
| 309 return top_controls_layout_height_; | 309 return top_controls_layout_height_; |
| 310 } | 310 } |
| 311 float top_controls_top_offset() const { | 311 float top_controls_content_offset() const { |
| 312 return top_controls_top_offset_; | 312 return top_controls_content_offset_; |
| 313 } | 313 } |
| 314 float top_controls_delta() const { | 314 float top_controls_delta() const { |
| 315 return top_controls_delta_; | 315 return top_controls_delta_; |
| 316 } | 316 } |
| 317 float sent_top_controls_delta() const { | 317 float sent_top_controls_delta() const { |
| 318 return sent_top_controls_delta_; | 318 return sent_top_controls_delta_; |
| 319 } | 319 } |
| 320 float total_top_controls_top_offset() const { | 320 float total_top_controls_content_offset() const { |
| 321 return top_controls_top_offset_ + top_controls_delta_; | 321 return top_controls_content_offset_ + top_controls_delta_; |
| 322 } | 322 } |
| 323 | 323 |
| 324 protected: | 324 protected: |
| 325 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 325 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
| 326 void ReleaseResourcesRecursive(LayerImpl* current); | 326 void ReleaseResourcesRecursive(LayerImpl* current); |
| 327 | 327 |
| 328 LayerTreeHostImpl* layer_tree_host_impl_; | 328 LayerTreeHostImpl* layer_tree_host_impl_; |
| 329 int source_frame_number_; | 329 int source_frame_number_; |
| 330 scoped_ptr<LayerImpl> root_layer_; | 330 scoped_ptr<LayerImpl> root_layer_; |
| 331 HeadsUpDisplayLayerImpl* hud_layer_; | 331 HeadsUpDisplayLayerImpl* hud_layer_; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 | 381 |
| 382 int render_surface_layer_list_id_; | 382 int render_surface_layer_list_id_; |
| 383 | 383 |
| 384 // The top controls content offset at the time of the last layout (and thus, | 384 // The top controls content offset at the time of the last layout (and thus, |
| 385 // viewport resize) in Blink. i.e. How much the viewport was shrunk by the top | 385 // viewport resize) in Blink. i.e. How much the viewport was shrunk by the top |
| 386 // controls. | 386 // controls. |
| 387 float top_controls_layout_height_; | 387 float top_controls_layout_height_; |
| 388 | 388 |
| 389 // The up-to-date content offset of the top controls, i.e. the amount that the | 389 // The up-to-date content offset of the top controls, i.e. the amount that the |
| 390 // web contents have been shifted down from the top of the device viewport. | 390 // web contents have been shifted down from the top of the device viewport. |
| 391 float top_controls_top_offset_; | 391 float top_controls_content_offset_; |
| 392 float top_controls_delta_; | 392 float top_controls_delta_; |
| 393 float sent_top_controls_delta_; | 393 float sent_top_controls_delta_; |
| 394 | 394 |
| 395 private: | 395 private: |
| 396 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 396 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 397 }; | 397 }; |
| 398 | 398 |
| 399 } // namespace cc | 399 } // namespace cc |
| 400 | 400 |
| 401 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 401 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |