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 |
11 #include <limits> | 11 #include <limits> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <unordered_map> | 14 #include <unordered_map> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/cancelable_callback.h" | 17 #include "base/cancelable_callback.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
21 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
22 #include "base/time/time.h" | 22 #include "base/time/time.h" |
23 #include "cc/animation/animation.h" | 23 #include "cc/animation/animation.h" |
24 #include "cc/base/cc_export.h" | 24 #include "cc/base/cc_export.h" |
25 #include "cc/debug/frame_timing_tracker.h" | 25 #include "cc/debug/frame_timing_tracker.h" |
26 #include "cc/debug/micro_benchmark.h" | 26 #include "cc/debug/micro_benchmark.h" |
27 #include "cc/debug/micro_benchmark_controller.h" | 27 #include "cc/debug/micro_benchmark_controller.h" |
| 28 #include "cc/input/event_listener_properties.h" |
28 #include "cc/input/input_handler.h" | 29 #include "cc/input/input_handler.h" |
29 #include "cc/input/layer_selection_bound.h" | 30 #include "cc/input/layer_selection_bound.h" |
30 #include "cc/input/scrollbar.h" | 31 #include "cc/input/scrollbar.h" |
31 #include "cc/input/top_controls_state.h" | 32 #include "cc/input/top_controls_state.h" |
32 #include "cc/layers/layer_lists.h" | 33 #include "cc/layers/layer_lists.h" |
33 #include "cc/output/output_surface.h" | 34 #include "cc/output/output_surface.h" |
34 #include "cc/output/renderer_capabilities.h" | 35 #include "cc/output/renderer_capabilities.h" |
35 #include "cc/output/swap_promise.h" | 36 #include "cc/output/swap_promise.h" |
36 #include "cc/resources/resource_format.h" | 37 #include "cc/resources/resource_format.h" |
37 #include "cc/resources/scoped_ui_resource.h" | 38 #include "cc/resources/scoped_ui_resource.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 return outer_viewport_scroll_layer_.get(); | 223 return outer_viewport_scroll_layer_.get(); |
223 } | 224 } |
224 | 225 |
225 void RegisterSelection(const LayerSelection& selection); | 226 void RegisterSelection(const LayerSelection& selection); |
226 | 227 |
227 bool have_scroll_event_handlers() const { | 228 bool have_scroll_event_handlers() const { |
228 return have_scroll_event_handlers_; | 229 return have_scroll_event_handlers_; |
229 } | 230 } |
230 void SetHaveScrollEventHandlers(bool have_event_handlers); | 231 void SetHaveScrollEventHandlers(bool have_event_handlers); |
231 | 232 |
232 bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; } | 233 void SetEventListenerProperties(EventListenerClass event_class, |
233 void SetHaveWheelEventHandlers(bool have_event_handlers); | 234 EventListenerProperties event_properties); |
| 235 EventListenerProperties event_listener_properties( |
| 236 EventListenerClass event_class) const { |
| 237 return event_listener_properties_[static_cast<size_t>(event_class)]; |
| 238 } |
234 | 239 |
235 const LayerTreeSettings& settings() const { return settings_; } | 240 const LayerTreeSettings& settings() const { return settings_; } |
236 | 241 |
237 void SetDebugState(const LayerTreeDebugState& debug_state); | 242 void SetDebugState(const LayerTreeDebugState& debug_state); |
238 const LayerTreeDebugState& debug_state() const { return debug_state_; } | 243 const LayerTreeDebugState& debug_state() const { return debug_state_; } |
239 | 244 |
240 bool has_gpu_rasterization_trigger() const { | 245 bool has_gpu_rasterization_trigger() const { |
241 return has_gpu_rasterization_trigger_; | 246 return has_gpu_rasterization_trigger_; |
242 } | 247 } |
243 void SetHasGpuRasterizationTrigger(bool has_trigger); | 248 void SetHasGpuRasterizationTrigger(bool has_trigger); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 float max_page_scale_factor_; | 536 float max_page_scale_factor_; |
532 gfx::Vector2dF elastic_overscroll_; | 537 gfx::Vector2dF elastic_overscroll_; |
533 bool has_gpu_rasterization_trigger_; | 538 bool has_gpu_rasterization_trigger_; |
534 bool content_is_suitable_for_gpu_rasterization_; | 539 bool content_is_suitable_for_gpu_rasterization_; |
535 bool gpu_rasterization_histogram_recorded_; | 540 bool gpu_rasterization_histogram_recorded_; |
536 | 541 |
537 SkColor background_color_; | 542 SkColor background_color_; |
538 bool has_transparent_background_; | 543 bool has_transparent_background_; |
539 | 544 |
540 bool have_scroll_event_handlers_; | 545 bool have_scroll_event_handlers_; |
541 bool have_wheel_event_handlers_; | 546 EventListenerProperties event_listener_properties_[static_cast<size_t>( |
| 547 EventListenerClass::kNumClasses)]; |
542 | 548 |
543 scoped_ptr<AnimationRegistrar> animation_registrar_; | 549 scoped_ptr<AnimationRegistrar> animation_registrar_; |
544 scoped_ptr<AnimationHost> animation_host_; | 550 scoped_ptr<AnimationHost> animation_host_; |
545 | 551 |
546 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 552 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
547 | 553 |
548 // If set, then page scale animation has completed, but the client hasn't been | 554 // If set, then page scale animation has completed, but the client hasn't been |
549 // notified about it yet. | 555 // notified about it yet. |
550 bool did_complete_scale_animation_; | 556 bool did_complete_scale_animation_; |
551 | 557 |
(...skipping 23 matching lines...) Expand all Loading... |
575 | 581 |
576 uint32_t surface_id_namespace_; | 582 uint32_t surface_id_namespace_; |
577 uint32_t next_surface_sequence_; | 583 uint32_t next_surface_sequence_; |
578 | 584 |
579 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 585 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
580 }; | 586 }; |
581 | 587 |
582 } // namespace cc | 588 } // namespace cc |
583 | 589 |
584 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 590 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |