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

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

Issue 864333004: Clean up DelegatedFrameHost's interface to its client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorprate review feedback Created 5 years, 11 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_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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 OverscrollController* overscroll_controller() const { 353 OverscrollController* overscroll_controller() const {
354 return overscroll_controller_.get(); 354 return overscroll_controller_.get();
355 } 355 }
356 356
357 protected: 357 protected:
358 ~RenderWidgetHostViewAura() override; 358 ~RenderWidgetHostViewAura() override;
359 359
360 // Exposed for tests. 360 // Exposed for tests.
361 aura::Window* window() { return window_; } 361 aura::Window* window() { return window_; }
362 SkColorType PreferredReadbackFormat() override; 362 SkColorType PreferredReadbackFormat() override;
363 DelegatedFrameHost* GetDelegatedFrameHost() const override; 363 DelegatedFrameHost* GetDelegatedFrameHost() const {
364 return delegated_frame_host_.get();
365 }
364 const ui::MotionEventAura& pointer_state() const { return pointer_state_; } 366 const ui::MotionEventAura& pointer_state() const { return pointer_state_; }
365 367
366 private: 368 private:
367 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 369 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
368 PopupRetainsCaptureAfterMouseRelease); 370 PopupRetainsCaptureAfterMouseRelease);
369 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); 371 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText);
370 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState); 372 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState);
371 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 373 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
372 TouchEventPositionsArentRounded); 374 TouchEventPositionsArentRounded);
373 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync); 375 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync);
376 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, Resize);
374 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow); 377 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow);
375 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, RecreateLayers); 378 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, RecreateLayers);
376 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 379 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
377 SkippedDelegatedFrames); 380 SkippedDelegatedFrames);
378 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange); 381 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange);
379 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 382 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
380 DiscardDelegatedFrames); 383 DiscardDelegatedFrames);
381 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 384 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
382 DiscardDelegatedFramesWithLocking); 385 DiscardDelegatedFramesWithLocking);
383 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SoftwareDPIChange); 386 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SoftwareDPIChange);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 // moved to center. 446 // moved to center.
444 bool ShouldMoveToCenter(); 447 bool ShouldMoveToCenter();
445 448
446 // Called after |window_| is parented to a WindowEventDispatcher. 449 // Called after |window_| is parented to a WindowEventDispatcher.
447 void AddedToRootWindow(); 450 void AddedToRootWindow();
448 451
449 // Called prior to removing |window_| from a WindowEventDispatcher. 452 // Called prior to removing |window_| from a WindowEventDispatcher.
450 void RemovingFromRootWindow(); 453 void RemovingFromRootWindow();
451 454
452 // DelegatedFrameHostClient implementation. 455 // DelegatedFrameHostClient implementation.
453 ui::Layer* GetLayer() override; 456 bool DelegatedFrameHostIsVisible() const override;
454 RenderWidgetHostImpl* GetHost() override; 457 gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override;
455 bool IsVisible() override; 458 bool DelegatedFrameCanCreateResizeLock() const override;
456 scoped_ptr<ResizeLock> CreateResizeLock(bool defer_compositor_lock) override; 459 scoped_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock(
457 gfx::Size DesiredFrameSize() override; 460 bool defer_compositor_lock) override;
458 float CurrentDeviceScaleFactor() override; 461 void DelegatedFrameHostResizeLockWasReleased() override;
459 gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) override; 462 void DelegatedFrameHostSendCompositorSwapAck(
463 int output_surface_id,
464 const cc::CompositorFrameAck& ack) override;
465 void DelegatedFrameHostSendReclaimCompositorResources(
466 int output_surface_id,
467 const cc::CompositorFrameAck& ack) override;
468 void DelegatedFrameHostOnLostCompositorResources() override;
469 void DelegatedFrameHostUpdateVSyncParameters(
470 const base::TimeTicks& timebase,
471 const base::TimeDelta& interval) override;
460 472
461 // Detaches |this| from the input method object. 473 // Detaches |this| from the input method object.
462 void DetachFromInputMethod(); 474 void DetachFromInputMethod();
463 475
464 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method 476 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method
465 // calls our keybindings handler against the event and send matched 477 // calls our keybindings handler against the event and send matched
466 // edit commands to renderer instead. 478 // edit commands to renderer instead.
467 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event); 479 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event);
468 480
469 // Dismisses a Web Popup on a mouse or touch press outside the popup and its 481 // Dismisses a Web Popup on a mouse or touch press outside the popup and its
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 // compositing surface and showing the disambiguation popup. 647 // compositing surface and showing the disambiguation popup.
636 gfx::Vector2dF disambiguation_scroll_offset_; 648 gfx::Vector2dF disambiguation_scroll_offset_;
637 649
638 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 650 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
639 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 651 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
640 }; 652 };
641 653
642 } // namespace content 654 } // namespace content
643 655
644 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 656 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698