Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1081)

Side by Side Diff: cc/trees/layer_tree_host.h

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 uint32_t event_properties);
235 uint32_t event_listener_properties(EventListenerClass event_class) const {
236 return event_listener_properties_[static_cast<size_t>(event_class)];
237 }
234 238
235 const LayerTreeSettings& settings() const { return settings_; } 239 const LayerTreeSettings& settings() const { return settings_; }
236 240
237 void SetDebugState(const LayerTreeDebugState& debug_state); 241 void SetDebugState(const LayerTreeDebugState& debug_state);
238 const LayerTreeDebugState& debug_state() const { return debug_state_; } 242 const LayerTreeDebugState& debug_state() const { return debug_state_; }
239 243
240 bool has_gpu_rasterization_trigger() const { 244 bool has_gpu_rasterization_trigger() const {
241 return has_gpu_rasterization_trigger_; 245 return has_gpu_rasterization_trigger_;
242 } 246 }
243 void SetHasGpuRasterizationTrigger(bool has_trigger); 247 void SetHasGpuRasterizationTrigger(bool has_trigger);
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 float max_page_scale_factor_; 535 float max_page_scale_factor_;
532 gfx::Vector2dF elastic_overscroll_; 536 gfx::Vector2dF elastic_overscroll_;
533 bool has_gpu_rasterization_trigger_; 537 bool has_gpu_rasterization_trigger_;
534 bool content_is_suitable_for_gpu_rasterization_; 538 bool content_is_suitable_for_gpu_rasterization_;
535 bool gpu_rasterization_histogram_recorded_; 539 bool gpu_rasterization_histogram_recorded_;
536 540
537 SkColor background_color_; 541 SkColor background_color_;
538 bool has_transparent_background_; 542 bool has_transparent_background_;
539 543
540 bool have_scroll_event_handlers_; 544 bool have_scroll_event_handlers_;
541 bool have_wheel_event_handlers_; 545 uint32_t event_listener_properties_[static_cast<size_t>(
546 EventListenerClass::kNumClasses)];
542 547
543 scoped_ptr<AnimationRegistrar> animation_registrar_; 548 scoped_ptr<AnimationRegistrar> animation_registrar_;
544 scoped_ptr<AnimationHost> animation_host_; 549 scoped_ptr<AnimationHost> animation_host_;
545 550
546 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 551 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
547 552
548 // If set, then page scale animation has completed, but the client hasn't been 553 // If set, then page scale animation has completed, but the client hasn't been
549 // notified about it yet. 554 // notified about it yet.
550 bool did_complete_scale_animation_; 555 bool did_complete_scale_animation_;
551 556
(...skipping 23 matching lines...) Expand all
575 580
576 uint32_t surface_id_namespace_; 581 uint32_t surface_id_namespace_;
577 uint32_t next_surface_sequence_; 582 uint32_t next_surface_sequence_;
578 583
579 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 584 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
580 }; 585 };
581 586
582 } // namespace cc 587 } // namespace cc
583 588
584 #endif // CC_TREES_LAYER_TREE_HOST_H_ 589 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698