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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 InputHandler::ScrollInputType type) OVERRIDE; | 116 InputHandler::ScrollInputType type) OVERRIDE; |
117 virtual bool ScrollBy(const gfx::Point& viewport_point, | 117 virtual bool ScrollBy(const gfx::Point& viewport_point, |
118 const gfx::Vector2dF& scroll_delta) OVERRIDE; | 118 const gfx::Vector2dF& scroll_delta) OVERRIDE; |
119 virtual bool ScrollVerticallyByPage(const gfx::Point& viewport_point, | 119 virtual bool ScrollVerticallyByPage(const gfx::Point& viewport_point, |
120 ScrollDirection direction) OVERRIDE; | 120 ScrollDirection direction) OVERRIDE; |
121 virtual void SetRootLayerScrollOffsetDelegate( | 121 virtual void SetRootLayerScrollOffsetDelegate( |
122 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE; | 122 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE; |
123 virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE; | 123 virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE; |
124 virtual void ScrollEnd() OVERRIDE; | 124 virtual void ScrollEnd() OVERRIDE; |
125 virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE; | 125 virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE; |
| 126 virtual void NotifyCurrentFlingVelocity( |
| 127 const gfx::Vector2dF& velocity) OVERRIDE; |
126 virtual void MouseMoveAt(const gfx::Point& viewport_point) OVERRIDE; | 128 virtual void MouseMoveAt(const gfx::Point& viewport_point) OVERRIDE; |
127 virtual void PinchGestureBegin() OVERRIDE; | 129 virtual void PinchGestureBegin() OVERRIDE; |
128 virtual void PinchGestureUpdate(float magnify_delta, | 130 virtual void PinchGestureUpdate(float magnify_delta, |
129 const gfx::Point& anchor) OVERRIDE; | 131 const gfx::Point& anchor) OVERRIDE; |
130 virtual void PinchGestureEnd() OVERRIDE; | 132 virtual void PinchGestureEnd() OVERRIDE; |
131 virtual void StartPageScaleAnimation(const gfx::Vector2d& target_offset, | 133 virtual void StartPageScaleAnimation(const gfx::Vector2d& target_offset, |
132 bool anchor_point, | 134 bool anchor_point, |
133 float page_scale, | 135 float page_scale, |
134 base::TimeDelta duration) OVERRIDE; | 136 base::TimeDelta duration) OVERRIDE; |
135 virtual void ScheduleAnimation() OVERRIDE; | 137 virtual void ScheduleAnimation() OVERRIDE; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 } | 373 } |
372 size_t RenderPassListNext(size_t it) const { return it + 1; } | 374 size_t RenderPassListNext(size_t it) const { return it + 1; } |
373 }; | 375 }; |
374 | 376 |
375 template <typename RenderPassCuller> | 377 template <typename RenderPassCuller> |
376 static void RemoveRenderPasses(RenderPassCuller culler, FrameData* frame); | 378 static void RemoveRenderPasses(RenderPassCuller culler, FrameData* frame); |
377 | 379 |
378 gfx::Vector2dF accumulated_root_overscroll() const { | 380 gfx::Vector2dF accumulated_root_overscroll() const { |
379 return accumulated_root_overscroll_; | 381 return accumulated_root_overscroll_; |
380 } | 382 } |
| 383 gfx::Vector2dF current_fling_velocity() const { |
| 384 return current_fling_velocity_; |
| 385 } |
381 | 386 |
382 bool pinch_gesture_active() const { return pinch_gesture_active_; } | 387 bool pinch_gesture_active() const { return pinch_gesture_active_; } |
383 | 388 |
384 void SetTreePriority(TreePriority priority); | 389 void SetTreePriority(TreePriority priority); |
385 | 390 |
386 void UpdateCurrentFrameTime(); | 391 void UpdateCurrentFrameTime(); |
387 void ResetCurrentFrameTimeForNextFrame(); | 392 void ResetCurrentFrameTimeForNextFrame(); |
388 virtual base::TimeTicks CurrentFrameTimeTicks(); | 393 virtual base::TimeTicks CurrentFrameTimeTicks(); |
389 | 394 |
390 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } | 395 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 bool tile_priorities_dirty_; | 562 bool tile_priorities_dirty_; |
558 | 563 |
559 // The optional delegate for the root layer scroll offset. | 564 // The optional delegate for the root layer scroll offset. |
560 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 565 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
561 LayerTreeSettings settings_; | 566 LayerTreeSettings settings_; |
562 LayerTreeDebugState debug_state_; | 567 LayerTreeDebugState debug_state_; |
563 bool visible_; | 568 bool visible_; |
564 ManagedMemoryPolicy cached_managed_memory_policy_; | 569 ManagedMemoryPolicy cached_managed_memory_policy_; |
565 | 570 |
566 gfx::Vector2dF accumulated_root_overscroll_; | 571 gfx::Vector2dF accumulated_root_overscroll_; |
| 572 gfx::Vector2dF current_fling_velocity_; |
567 | 573 |
568 bool pinch_gesture_active_; | 574 bool pinch_gesture_active_; |
569 bool pinch_gesture_end_should_clear_scrolling_layer_; | 575 bool pinch_gesture_end_should_clear_scrolling_layer_; |
570 gfx::Point previous_pinch_anchor_; | 576 gfx::Point previous_pinch_anchor_; |
571 | 577 |
572 scoped_ptr<TopControlsManager> top_controls_manager_; | 578 scoped_ptr<TopControlsManager> top_controls_manager_; |
573 | 579 |
574 scoped_ptr<PageScaleAnimation> page_scale_animation_; | 580 scoped_ptr<PageScaleAnimation> page_scale_animation_; |
575 | 581 |
576 // This is used for ticking animations slowly when hidden. | 582 // This is used for ticking animations slowly when hidden. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 int id_; | 653 int id_; |
648 | 654 |
649 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 655 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
650 | 656 |
651 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 657 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
652 }; | 658 }; |
653 | 659 |
654 } // namespace cc | 660 } // namespace cc |
655 | 661 |
656 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 662 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |