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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 const LayerSelectionBound& end); | 274 const LayerSelectionBound& end); |
275 | 275 |
276 // Compute the current selection handle location and visbility with respect to | 276 // Compute the current selection handle location and visbility with respect to |
277 // the viewport. | 277 // the viewport. |
278 void GetViewportSelection(ViewportSelectionBound* start, | 278 void GetViewportSelection(ViewportSelectionBound* start, |
279 ViewportSelectionBound* end); | 279 ViewportSelectionBound* end); |
280 | 280 |
281 void RegisterPictureLayerImpl(PictureLayerImpl* layer); | 281 void RegisterPictureLayerImpl(PictureLayerImpl* layer); |
282 void UnregisterPictureLayerImpl(PictureLayerImpl* layer); | 282 void UnregisterPictureLayerImpl(PictureLayerImpl* layer); |
283 | 283 |
284 void set_top_controls_layout_height(float height) { | 284 void set_top_controls_shrink_blink_size(bool shrink) { |
285 top_controls_layout_height_ = height; | 285 top_controls_shrink_blink_size_ = shrink; |
286 } | 286 } |
| 287 void set_top_controls_height(float height) { top_controls_height_ = height; } |
287 void set_top_controls_content_offset(float offset) { | 288 void set_top_controls_content_offset(float offset) { |
288 top_controls_content_offset_ = offset; | 289 top_controls_content_offset_ = offset; |
289 } | 290 } |
290 void set_top_controls_delta(float delta) { | 291 void set_top_controls_delta(float delta) { |
291 top_controls_delta_ = delta; | 292 top_controls_delta_ = delta; |
292 } | 293 } |
293 void set_sent_top_controls_delta(float sent_delta) { | 294 void set_sent_top_controls_delta(float sent_delta) { |
294 sent_top_controls_delta_ = sent_delta; | 295 sent_top_controls_delta_ = sent_delta; |
295 } | 296 } |
296 | 297 |
297 float top_controls_layout_height() const { | 298 bool top_controls_shrink_blink_size() const { |
298 return top_controls_layout_height_; | 299 return top_controls_shrink_blink_size_; |
299 } | 300 } |
| 301 float top_controls_height() const { return top_controls_height_; } |
300 float top_controls_content_offset() const { | 302 float top_controls_content_offset() const { |
301 return top_controls_content_offset_; | 303 return top_controls_content_offset_; |
302 } | 304 } |
303 float top_controls_delta() const { | 305 float top_controls_delta() const { |
304 return top_controls_delta_; | 306 return top_controls_delta_; |
305 } | 307 } |
306 float sent_top_controls_delta() const { | 308 float sent_top_controls_delta() const { |
307 return sent_top_controls_delta_; | 309 return sent_top_controls_delta_; |
308 } | 310 } |
309 float total_top_controls_content_offset() const { | 311 float total_top_controls_content_offset() const { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 bool next_activation_forces_redraw_; | 371 bool next_activation_forces_redraw_; |
370 | 372 |
371 bool has_ever_been_drawn_; | 373 bool has_ever_been_drawn_; |
372 | 374 |
373 ScopedPtrVector<SwapPromise> swap_promise_list_; | 375 ScopedPtrVector<SwapPromise> swap_promise_list_; |
374 | 376 |
375 UIResourceRequestQueue ui_resource_request_queue_; | 377 UIResourceRequestQueue ui_resource_request_queue_; |
376 | 378 |
377 int render_surface_layer_list_id_; | 379 int render_surface_layer_list_id_; |
378 | 380 |
379 // The top controls content offset at the time of the last layout (and thus, | 381 // Whether or not Blink's viewport size was shrunk by the height of the top |
380 // viewport resize) in Blink. i.e. How much the viewport was shrunk by the top | 382 // controls at the time of the last layout. |
381 // controls. | 383 float top_controls_shrink_blink_size_; |
382 float top_controls_layout_height_; | 384 |
| 385 float top_controls_height_; |
383 | 386 |
384 // The up-to-date content offset of the top controls, i.e. the amount that the | 387 // The up-to-date content offset of the top controls, i.e. the amount that the |
385 // web contents have been shifted down from the top of the device viewport. | 388 // web contents have been shifted down from the top of the device viewport. |
386 float top_controls_content_offset_; | 389 float top_controls_content_offset_; |
387 float top_controls_delta_; | 390 float top_controls_delta_; |
388 float sent_top_controls_delta_; | 391 float sent_top_controls_delta_; |
389 | 392 |
390 scoped_ptr<PageScaleAnimation> page_scale_animation_; | 393 scoped_ptr<PageScaleAnimation> page_scale_animation_; |
391 | 394 |
392 private: | 395 private: |
393 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 396 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
394 }; | 397 }; |
395 | 398 |
396 } // namespace cc | 399 } // namespace cc |
397 | 400 |
398 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 401 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |