| 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_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 bool has_gpu_rasterization_trigger() const { | 205 bool has_gpu_rasterization_trigger() const { |
| 206 return has_gpu_rasterization_trigger_; | 206 return has_gpu_rasterization_trigger_; |
| 207 } | 207 } |
| 208 void SetHasGpuRasterizationTrigger(bool has_trigger); | 208 void SetHasGpuRasterizationTrigger(bool has_trigger); |
| 209 bool UseGpuRasterization() const; | 209 bool UseGpuRasterization() const; |
| 210 GpuRasterizationStatus GetGpuRasterizationStatus() const; | 210 GpuRasterizationStatus GetGpuRasterizationStatus() const; |
| 211 | 211 |
| 212 void SetViewportSize(const gfx::Size& device_viewport_size); | 212 void SetViewportSize(const gfx::Size& device_viewport_size); |
| 213 void SetTopControlsShrinkBlinkSize(bool shrink); | 213 void SetTopControlsShrinkBlinkSize(bool shrink); |
| 214 void SetTopControlsHeight(float height); | 214 void SetTopControlsHeight(float height); |
| 215 void SetTopControlsContentOffset(float offset); | 215 void SetTopControlsShownRatio(float ratio); |
| 216 | 216 |
| 217 gfx::Size device_viewport_size() const { return device_viewport_size_; } | 217 gfx::Size device_viewport_size() const { return device_viewport_size_; } |
| 218 | 218 |
| 219 void ApplyPageScaleDeltaFromImplSide(float page_scale_delta); | 219 void ApplyPageScaleDeltaFromImplSide(float page_scale_delta); |
| 220 void SetPageScaleFactorAndLimits(float page_scale_factor, | 220 void SetPageScaleFactorAndLimits(float page_scale_factor, |
| 221 float min_page_scale_factor, | 221 float min_page_scale_factor, |
| 222 float max_page_scale_factor); | 222 float max_page_scale_factor); |
| 223 float page_scale_factor() const { return page_scale_factor_; } | 223 float page_scale_factor() const { return page_scale_factor_; } |
| 224 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; } | 224 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; } |
| 225 | 225 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } | 267 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } |
| 268 | 268 |
| 269 Proxy* proxy() const { return proxy_.get(); } | 269 Proxy* proxy() const { return proxy_.get(); } |
| 270 | 270 |
| 271 AnimationRegistrar* animation_registrar() const { | 271 AnimationRegistrar* animation_registrar() const { |
| 272 return animation_registrar_.get(); | 272 return animation_registrar_.get(); |
| 273 } | 273 } |
| 274 | 274 |
| 275 // Obtains a thorough dump of the LayerTreeHost as a value. | 275 // Obtains a thorough dump of the LayerTreeHost as a value. |
| 276 void AsValueInto(base::debug::TracedValue* value) const; | 276 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 277 | 277 |
| 278 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } | 278 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } |
| 279 | 279 |
| 280 // CreateUIResource creates a resource given a bitmap. The bitmap is | 280 // CreateUIResource creates a resource given a bitmap. The bitmap is |
| 281 // generated via an interface function, which is called when initializing the | 281 // generated via an interface function, which is called when initializing the |
| 282 // resource and when the resource has been lost (due to lost context). The | 282 // resource and when the resource has been lost (due to lost context). The |
| 283 // parameter of the interface is a single boolean, which indicates whether the | 283 // parameter of the interface is a single boolean, which indicates whether the |
| 284 // resource has been lost or not. CreateUIResource returns an Id of the | 284 // resource has been lost or not. CreateUIResource returns an Id of the |
| 285 // resource, which is always positive. | 285 // resource, which is always positive. |
| 286 virtual UIResourceId CreateUIResource(UIResourceClient* client); | 286 virtual UIResourceId CreateUIResource(UIResourceClient* client); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 | 409 |
| 410 base::WeakPtr<InputHandler> input_handler_weak_ptr_; | 410 base::WeakPtr<InputHandler> input_handler_weak_ptr_; |
| 411 base::WeakPtr<TopControlsManager> top_controls_manager_weak_ptr_; | 411 base::WeakPtr<TopControlsManager> top_controls_manager_weak_ptr_; |
| 412 | 412 |
| 413 const LayerTreeSettings settings_; | 413 const LayerTreeSettings settings_; |
| 414 LayerTreeDebugState debug_state_; | 414 LayerTreeDebugState debug_state_; |
| 415 | 415 |
| 416 gfx::Size device_viewport_size_; | 416 gfx::Size device_viewport_size_; |
| 417 bool top_controls_shrink_blink_size_; | 417 bool top_controls_shrink_blink_size_; |
| 418 float top_controls_height_; | 418 float top_controls_height_; |
| 419 float top_controls_content_offset_; | 419 float top_controls_shown_ratio_; |
| 420 float device_scale_factor_; | 420 float device_scale_factor_; |
| 421 | 421 |
| 422 bool visible_; | 422 bool visible_; |
| 423 | 423 |
| 424 base::OneShotTimer<LayerTreeHost> rate_limit_timer_; | 424 base::OneShotTimer<LayerTreeHost> rate_limit_timer_; |
| 425 | 425 |
| 426 float page_scale_factor_; | 426 float page_scale_factor_; |
| 427 float min_page_scale_factor_; | 427 float min_page_scale_factor_; |
| 428 float max_page_scale_factor_; | 428 float max_page_scale_factor_; |
| 429 gfx::Vector2dF elastic_overscroll_; | 429 gfx::Vector2dF elastic_overscroll_; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 480 |
| 481 uint32_t surface_id_namespace_; | 481 uint32_t surface_id_namespace_; |
| 482 uint32_t next_surface_sequence_; | 482 uint32_t next_surface_sequence_; |
| 483 | 483 |
| 484 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 484 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 485 }; | 485 }; |
| 486 | 486 |
| 487 } // namespace cc | 487 } // namespace cc |
| 488 | 488 |
| 489 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 489 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |