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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.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
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_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <IOSurface/IOSurface.h> 9 #include <IOSurface/IOSurface.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) override; 313 gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) override;
314 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override; 314 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override;
315 315
316 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; 316 bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
317 gfx::Rect GetBoundsInRootWindow() override; 317 gfx::Rect GetBoundsInRootWindow() override;
318 void LockCompositingSurface() override; 318 void LockCompositingSurface() override;
319 void UnlockCompositingSurface() override; 319 void UnlockCompositingSurface() override;
320 320
321 bool LockMouse() override; 321 bool LockMouse() override;
322 void UnlockMouse() override; 322 void UnlockMouse() override;
323 void OnSetNeedsFlushInput() override;
323 void GestureEventAck(const blink::WebGestureEvent& event, 324 void GestureEventAck(const blink::WebGestureEvent& event,
324 InputEventAckState ack_result) override; 325 InputEventAckState ack_result) override;
325 326
326 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() 327 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget()
327 override; 328 override;
328 329
329 uint32_t GetSurfaceClientId() override; 330 uint32_t GetSurfaceClientId() override;
330 uint32_t SurfaceClientIdAtPoint(cc::SurfaceHittestDelegate* delegate, 331 uint32_t SurfaceClientIdAtPoint(cc::SurfaceHittestDelegate* delegate,
331 const gfx::Point& point, 332 const gfx::Point& point,
332 gfx::Point* transformed_point) override; 333 gfx::Point* transformed_point) override;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 494
494 // Send updated vsync parameters to the top level display. 495 // Send updated vsync parameters to the top level display.
495 void UpdateDisplayVSyncParameters(); 496 void UpdateDisplayVSyncParameters();
496 497
497 // Dispatches a TTS session. 498 // Dispatches a TTS session.
498 void SpeakText(const std::string& text); 499 void SpeakText(const std::string& text);
499 500
500 // Get the focused view that should be used for retrieving the text selection. 501 // Get the focused view that should be used for retrieving the text selection.
501 RenderWidgetHostViewBase* GetFocusedViewForTextSelection(); 502 RenderWidgetHostViewBase* GetFocusedViewForTextSelection();
502 503
504 // Adds/Removes frame observer based on state.
505 void UpdateNeedsBeginFramesInternal();
506
503 // The associated view. This is weak and is inserted into the view hierarchy 507 // The associated view. This is weak and is inserted into the view hierarchy
504 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the 508 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the
505 // destructor. 509 // destructor.
506 RenderWidgetHostViewCocoa* cocoa_view_; 510 RenderWidgetHostViewCocoa* cocoa_view_;
507 511
508 // Indicates if the page is loading. 512 // Indicates if the page is loading.
509 bool is_loading_; 513 bool is_loading_;
510 514
511 // Whether it's allowed to pause waiting for a new frame. 515 // Whether it's allowed to pause waiting for a new frame.
512 bool allow_pause_for_resize_or_repaint_; 516 bool allow_pause_for_resize_or_repaint_;
(...skipping 25 matching lines...) Expand all
538 542
539 // The current VSync timebase and interval. This is zero until the first call 543 // The current VSync timebase and interval. This is zero until the first call
540 // to SendVSyncParametersToRenderer(), and refreshed regularly thereafter. 544 // to SendVSyncParametersToRenderer(), and refreshed regularly thereafter.
541 base::TimeTicks vsync_timebase_; 545 base::TimeTicks vsync_timebase_;
542 base::TimeDelta vsync_interval_; 546 base::TimeDelta vsync_interval_;
543 547
544 // The current composition character range and its bounds. 548 // The current composition character range and its bounds.
545 gfx::Range composition_range_; 549 gfx::Range composition_range_;
546 std::vector<gfx::Rect> composition_bounds_; 550 std::vector<gfx::Rect> composition_bounds_;
547 551
552 // Whether a request for begin frames has been issued.
553 bool needs_begin_frames_;
554
555 // Whether a request to flush input has been issued.
556 bool needs_flush_input_;
557
548 // Factory used to safely scope delayed calls to ShutdownHost(). 558 // Factory used to safely scope delayed calls to ShutdownHost().
549 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 559 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
550 560
551 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 561 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
552 }; 562 };
553 563
554 } // namespace content 564 } // namespace content
555 565
556 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 566 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698