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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 2372873003: Move synthetic gesture input to be aligned with BeginFrame. (Closed)
Patch Set: Fix unittests Created 4 years, 2 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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;
165 void WheelEventAck(const blink::WebMouseWheelEvent& event, 166 void WheelEventAck(const blink::WebMouseWheelEvent& event,
166 InputEventAckState ack_result) override; 167 InputEventAckState ack_result) override;
167 void GestureEventAck(const blink::WebGestureEvent& event, 168 void GestureEventAck(const blink::WebGestureEvent& event,
168 InputEventAckState ack_result) override; 169 InputEventAckState ack_result) override;
169 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, 170 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
170 InputEventAckState ack_result) override; 171 InputEventAckState ack_result) override;
171 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() 172 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget()
172 override; 173 override;
173 InputEventAckState FilterInputEvent( 174 InputEventAckState FilterInputEvent(
174 const blink::WebInputEvent& input_event) override; 175 const blink::WebInputEvent& input_event) override;
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 // Helper function to create a selection controller. 526 // Helper function to create a selection controller.
526 void CreateSelectionController(); 527 void CreateSelectionController();
527 528
528 // Performs gesture handling needed for touch text selection. Sets event as 529 // Performs gesture handling needed for touch text selection. Sets event as
529 // handled if it should not be further processed. 530 // handled if it should not be further processed.
530 void HandleGestureForTouchSelection(ui::GestureEvent* event); 531 void HandleGestureForTouchSelection(ui::GestureEvent* event);
531 532
532 // Forwards a mouse event to this view's parent window delegate. 533 // Forwards a mouse event to this view's parent window delegate.
533 void ForwardMouseEventToParent(ui::MouseEvent* event); 534 void ForwardMouseEventToParent(ui::MouseEvent* event);
534 535
536 // Adds/Removes frame observer based on state.
537 void UpdateNeedsBeginFramesInternal();
538
535 // Returns the RenderViewHostDelegateView instance for this view. Returns 539 // Returns the RenderViewHostDelegateView instance for this view. Returns
536 // NULL on failure. 540 // NULL on failure.
537 RenderViewHostDelegateView* GetRenderViewHostDelegateView(); 541 RenderViewHostDelegateView* GetRenderViewHostDelegateView();
538 542
539 // The model object. 543 // The model object.
540 RenderWidgetHostImpl* const host_; 544 RenderWidgetHostImpl* const host_;
541 545
542 aura::Window* window_; 546 aura::Window* window_;
543 547
544 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_; 548 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 589
586 // Whether return characters should be passed on to the RenderWidgetHostImpl. 590 // Whether return characters should be passed on to the RenderWidgetHostImpl.
587 bool accept_return_character_; 591 bool accept_return_character_;
588 592
589 // Current tooltip text. 593 // Current tooltip text.
590 base::string16 tooltip_; 594 base::string16 tooltip_;
591 595
592 // The begin frame source being observed. Null if none. 596 // The begin frame source being observed. Null if none.
593 cc::BeginFrameSource* begin_frame_source_; 597 cc::BeginFrameSource* begin_frame_source_;
594 cc::BeginFrameArgs last_begin_frame_args_; 598 cc::BeginFrameArgs last_begin_frame_args_;
599
600 // Whether a request for begin frames has been issued.
595 bool needs_begin_frames_; 601 bool needs_begin_frames_;
596 602
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
597 // Used to record the last position of the mouse. 609 // Used to record the last position of the mouse.
598 // While the mouse is locked, they store the last known position just as mouse 610 // While the mouse is locked, they store the last known position just as mouse
599 // lock was entered. 611 // lock was entered.
600 // Relative to the upper-left corner of the view. 612 // Relative to the upper-left corner of the view.
601 gfx::Point unlocked_mouse_position_; 613 gfx::Point unlocked_mouse_position_;
602 // Relative to the upper-left corner of the screen. 614 // Relative to the upper-left corner of the screen.
603 gfx::Point unlocked_global_mouse_position_; 615 gfx::Point unlocked_global_mouse_position_;
604 // Last cursor position relative to screen. Used to compute movementX/Y. 616 // Last cursor position relative to screen. Used to compute movementX/Y.
605 gfx::Point global_mouse_position_; 617 gfx::Point global_mouse_position_;
606 // In mouse locked mode, we synthetically move the mouse cursor to the center 618 // 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
687 int32_t last_active_widget_routing_id_; 699 int32_t last_active_widget_routing_id_;
688 700
689 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 701 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
690 702
691 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 703 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
692 }; 704 };
693 705
694 } // namespace content 706 } // namespace content
695 707
696 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 708 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698