| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 void CopyFromCompositingSurfaceToVideoFrame( | 155 void CopyFromCompositingSurfaceToVideoFrame( |
| 156 const gfx::Rect& src_subrect, | 156 const gfx::Rect& src_subrect, |
| 157 const scoped_refptr<media::VideoFrame>& target, | 157 const scoped_refptr<media::VideoFrame>& target, |
| 158 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; | 158 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; |
| 159 bool CanCopyToVideoFrame() const override; | 159 bool CanCopyToVideoFrame() const override; |
| 160 void BeginFrameSubscription( | 160 void BeginFrameSubscription( |
| 161 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; | 161 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; |
| 162 void EndFrameSubscription() override; | 162 void EndFrameSubscription() override; |
| 163 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; | 163 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; |
| 164 gfx::Rect GetBoundsInRootWindow() override; | 164 gfx::Rect GetBoundsInRootWindow() override; |
| 165 void OnSetNeedsFlushInput() override; | |
| 166 void WheelEventAck(const blink::WebMouseWheelEvent& event, | 165 void WheelEventAck(const blink::WebMouseWheelEvent& event, |
| 167 InputEventAckState ack_result) override; | 166 InputEventAckState ack_result) override; |
| 168 void GestureEventAck(const blink::WebGestureEvent& event, | 167 void GestureEventAck(const blink::WebGestureEvent& event, |
| 169 InputEventAckState ack_result) override; | 168 InputEventAckState ack_result) override; |
| 170 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, | 169 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, |
| 171 InputEventAckState ack_result) override; | 170 InputEventAckState ack_result) override; |
| 172 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() | 171 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() |
| 173 override; | 172 override; |
| 174 InputEventAckState FilterInputEvent( | 173 InputEventAckState FilterInputEvent( |
| 175 const blink::WebInputEvent& input_event) override; | 174 const blink::WebInputEvent& input_event) override; |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 // Helper function to create a selection controller. | 525 // Helper function to create a selection controller. |
| 527 void CreateSelectionController(); | 526 void CreateSelectionController(); |
| 528 | 527 |
| 529 // Performs gesture handling needed for touch text selection. Sets event as | 528 // Performs gesture handling needed for touch text selection. Sets event as |
| 530 // handled if it should not be further processed. | 529 // handled if it should not be further processed. |
| 531 void HandleGestureForTouchSelection(ui::GestureEvent* event); | 530 void HandleGestureForTouchSelection(ui::GestureEvent* event); |
| 532 | 531 |
| 533 // Forwards a mouse event to this view's parent window delegate. | 532 // Forwards a mouse event to this view's parent window delegate. |
| 534 void ForwardMouseEventToParent(ui::MouseEvent* event); | 533 void ForwardMouseEventToParent(ui::MouseEvent* event); |
| 535 | 534 |
| 536 // Adds/Removes frame observer based on state. | |
| 537 void UpdateNeedsBeginFramesInternal(); | |
| 538 | |
| 539 // Returns the RenderViewHostDelegateView instance for this view. Returns | 535 // Returns the RenderViewHostDelegateView instance for this view. Returns |
| 540 // NULL on failure. | 536 // NULL on failure. |
| 541 RenderViewHostDelegateView* GetRenderViewHostDelegateView(); | 537 RenderViewHostDelegateView* GetRenderViewHostDelegateView(); |
| 542 | 538 |
| 543 // The model object. | 539 // The model object. |
| 544 RenderWidgetHostImpl* const host_; | 540 RenderWidgetHostImpl* const host_; |
| 545 | 541 |
| 546 aura::Window* window_; | 542 aura::Window* window_; |
| 547 | 543 |
| 548 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_; | 544 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 | 585 |
| 590 // Whether return characters should be passed on to the RenderWidgetHostImpl. | 586 // Whether return characters should be passed on to the RenderWidgetHostImpl. |
| 591 bool accept_return_character_; | 587 bool accept_return_character_; |
| 592 | 588 |
| 593 // Current tooltip text. | 589 // Current tooltip text. |
| 594 base::string16 tooltip_; | 590 base::string16 tooltip_; |
| 595 | 591 |
| 596 // The begin frame source being observed. Null if none. | 592 // The begin frame source being observed. Null if none. |
| 597 cc::BeginFrameSource* begin_frame_source_; | 593 cc::BeginFrameSource* begin_frame_source_; |
| 598 cc::BeginFrameArgs last_begin_frame_args_; | 594 cc::BeginFrameArgs last_begin_frame_args_; |
| 599 | |
| 600 // Whether a request for begin frames has been issued. | |
| 601 bool needs_begin_frames_; | 595 bool needs_begin_frames_; |
| 602 | 596 |
| 603 // Whether a request to flush input has been issued. | |
| 604 bool needs_flush_input_; | |
| 605 | |
| 606 // Whether we have added ourselves as a frame observer or not. | |
| 607 bool added_frame_observer_; | |
| 608 | |
| 609 // Used to record the last position of the mouse. | 597 // Used to record the last position of the mouse. |
| 610 // While the mouse is locked, they store the last known position just as mouse | 598 // While the mouse is locked, they store the last known position just as mouse |
| 611 // lock was entered. | 599 // lock was entered. |
| 612 // Relative to the upper-left corner of the view. | 600 // Relative to the upper-left corner of the view. |
| 613 gfx::Point unlocked_mouse_position_; | 601 gfx::Point unlocked_mouse_position_; |
| 614 // Relative to the upper-left corner of the screen. | 602 // Relative to the upper-left corner of the screen. |
| 615 gfx::Point unlocked_global_mouse_position_; | 603 gfx::Point unlocked_global_mouse_position_; |
| 616 // Last cursor position relative to screen. Used to compute movementX/Y. | 604 // Last cursor position relative to screen. Used to compute movementX/Y. |
| 617 gfx::Point global_mouse_position_; | 605 gfx::Point global_mouse_position_; |
| 618 // In mouse locked mode, we synthetically move the mouse cursor to the center | 606 // In mouse locked mode, we synthetically move the mouse cursor to the center |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 int32_t last_active_widget_routing_id_; | 687 int32_t last_active_widget_routing_id_; |
| 700 | 688 |
| 701 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 689 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
| 702 | 690 |
| 703 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 691 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 704 }; | 692 }; |
| 705 | 693 |
| 706 } // namespace content | 694 } // namespace content |
| 707 | 695 |
| 708 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 696 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |