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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 class Layer; | 52 class Layer; |
53 class LayerTreeHostClient; | 53 class LayerTreeHostClient; |
54 class LayerTreeHostImpl; | 54 class LayerTreeHostImpl; |
55 class LayerTreeHostImplClient; | 55 class LayerTreeHostImplClient; |
56 class LayerTreeHostSingleThreadClient; | 56 class LayerTreeHostSingleThreadClient; |
57 class LayerTreeMutator; | 57 class LayerTreeMutator; |
58 class MutatorEvents; | 58 class MutatorEvents; |
59 class MutatorHost; | 59 class MutatorHost; |
60 struct PendingPageScaleAnimation; | 60 struct PendingPageScaleAnimation; |
61 class RenderingStatsInstrumentation; | 61 class RenderingStatsInstrumentation; |
| 62 struct ScrollBoundaryBehavior; |
62 class TaskGraphRunner; | 63 class TaskGraphRunner; |
63 class UIResourceManager; | 64 class UIResourceManager; |
64 struct RenderingStats; | 65 struct RenderingStats; |
65 struct ScrollAndScaleSet; | 66 struct ScrollAndScaleSet; |
66 | 67 |
67 class CC_EXPORT LayerTreeHost : public NON_EXPORTED_BASE(SurfaceReferenceOwner), | 68 class CC_EXPORT LayerTreeHost : public NON_EXPORTED_BASE(SurfaceReferenceOwner), |
68 public NON_EXPORTED_BASE(MutatorHostClient) { | 69 public NON_EXPORTED_BASE(MutatorHostClient) { |
69 public: | 70 public: |
70 // TODO(sad): InitParams should be a movable type so that it can be | 71 // TODO(sad): InitParams should be a movable type so that it can be |
71 // std::move()d to the Create* functions. | 72 // std::move()d to the Create* functions. |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 EventListenerClass event_class) const { | 273 EventListenerClass event_class) const { |
273 return event_listener_properties_[static_cast<size_t>(event_class)]; | 274 return event_listener_properties_[static_cast<size_t>(event_class)]; |
274 } | 275 } |
275 | 276 |
276 void SetViewportSize(const gfx::Size& device_viewport_size); | 277 void SetViewportSize(const gfx::Size& device_viewport_size); |
277 gfx::Size device_viewport_size() const { return device_viewport_size_; } | 278 gfx::Size device_viewport_size() const { return device_viewport_size_; } |
278 | 279 |
279 void SetBrowserControlsHeight(float height, bool shrink); | 280 void SetBrowserControlsHeight(float height, bool shrink); |
280 void SetBrowserControlsShownRatio(float ratio); | 281 void SetBrowserControlsShownRatio(float ratio); |
281 void SetBottomControlsHeight(float height); | 282 void SetBottomControlsHeight(float height); |
| 283 void SetScrollBoundaryBehavior( |
| 284 ScrollBoundaryBehavior scroll_boundary_behavior); |
282 | 285 |
283 void SetPageScaleFactorAndLimits(float page_scale_factor, | 286 void SetPageScaleFactorAndLimits(float page_scale_factor, |
284 float min_page_scale_factor, | 287 float min_page_scale_factor, |
285 float max_page_scale_factor); | 288 float max_page_scale_factor); |
286 float page_scale_factor() const { return page_scale_factor_; } | 289 float page_scale_factor() const { return page_scale_factor_; } |
287 float min_page_scale_factor() const { return min_page_scale_factor_; } | 290 float min_page_scale_factor() const { return min_page_scale_factor_; } |
288 float max_page_scale_factor() const { return max_page_scale_factor_; } | 291 float max_page_scale_factor() const { return max_page_scale_factor_; } |
289 | 292 |
290 void set_background_color(SkColor color) { background_color_ = color; } | 293 void set_background_color(SkColor color) { background_color_ = color; } |
291 SkColor background_color() const { return background_color_; } | 294 SkColor background_color() const { return background_color_; } |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 scoped_refptr<Layer> root_layer_; | 565 scoped_refptr<Layer> root_layer_; |
563 | 566 |
564 scoped_refptr<Layer> overscroll_elasticity_layer_; | 567 scoped_refptr<Layer> overscroll_elasticity_layer_; |
565 scoped_refptr<Layer> page_scale_layer_; | 568 scoped_refptr<Layer> page_scale_layer_; |
566 scoped_refptr<Layer> inner_viewport_scroll_layer_; | 569 scoped_refptr<Layer> inner_viewport_scroll_layer_; |
567 scoped_refptr<Layer> outer_viewport_scroll_layer_; | 570 scoped_refptr<Layer> outer_viewport_scroll_layer_; |
568 | 571 |
569 float top_controls_height_ = 0.f; | 572 float top_controls_height_ = 0.f; |
570 float top_controls_shown_ratio_ = 0.f; | 573 float top_controls_shown_ratio_ = 0.f; |
571 bool browser_controls_shrink_blink_size_ = false; | 574 bool browser_controls_shrink_blink_size_ = false; |
| 575 ScrollBoundaryBehavior scroll_boundary_behavior_; |
572 | 576 |
573 float bottom_controls_height_ = 0.f; | 577 float bottom_controls_height_ = 0.f; |
574 | 578 |
575 float device_scale_factor_ = 1.f; | 579 float device_scale_factor_ = 1.f; |
576 float painted_device_scale_factor_ = 1.f; | 580 float painted_device_scale_factor_ = 1.f; |
577 float page_scale_factor_ = 1.f; | 581 float page_scale_factor_ = 1.f; |
578 float min_page_scale_factor_ = 1.f; | 582 float min_page_scale_factor_ = 1.f; |
579 float max_page_scale_factor_ = 1.f; | 583 float max_page_scale_factor_ = 1.f; |
580 gfx::ColorSpace raster_color_space_; | 584 gfx::ColorSpace raster_color_space_; |
581 | 585 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 queued_image_decodes_; | 630 queued_image_decodes_; |
627 | 631 |
628 bool did_navigate_ = false; | 632 bool did_navigate_ = false; |
629 | 633 |
630 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 634 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
631 }; | 635 }; |
632 | 636 |
633 } // namespace cc | 637 } // namespace cc |
634 | 638 |
635 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 639 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |