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

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

Issue 1841083007: Remove SendBeginFramesToChildren plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scheduler_output_surface_client_set_beginframesource
Patch Set: Rebase Created 4 years, 8 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <set> 13 #include <set>
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/callback.h" 17 #include "base/callback.h"
18 #include "base/gtest_prod_util.h" 18 #include "base/gtest_prod_util.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/linked_ptr.h" 20 #include "base/memory/linked_ptr.h"
21 #include "base/memory/ref_counted.h" 21 #include "base/memory/ref_counted.h"
22 #include "base/memory/weak_ptr.h" 22 #include "base/memory/weak_ptr.h"
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "cc/scheduler/begin_frame_source.h"
24 #include "content/browser/accessibility/browser_accessibility_manager.h" 25 #include "content/browser/accessibility/browser_accessibility_manager.h"
25 #include "content/browser/compositor/image_transport_factory.h" 26 #include "content/browser/compositor/image_transport_factory.h"
26 #include "content/browser/compositor/owned_mailbox.h" 27 #include "content/browser/compositor/owned_mailbox.h"
27 #include "content/browser/renderer_host/begin_frame_observer_proxy.h"
28 #include "content/browser/renderer_host/delegated_frame_host.h" 28 #include "content/browser/renderer_host/delegated_frame_host.h"
29 #include "content/browser/renderer_host/render_widget_host_view_base.h" 29 #include "content/browser/renderer_host/render_widget_host_view_base.h"
30 #include "content/common/content_export.h" 30 #include "content/common/content_export.h"
31 #include "content/common/cursors/webcursor.h" 31 #include "content/common/cursors/webcursor.h"
32 #include "content/public/common/context_menu_params.h" 32 #include "content/public/common/context_menu_params.h"
33 #include "third_party/skia/include/core/SkRegion.h" 33 #include "third_party/skia/include/core/SkRegion.h"
34 #include "ui/aura/client/cursor_client_observer.h" 34 #include "ui/aura/client/cursor_client_observer.h"
35 #include "ui/aura/client/focus_change_observer.h" 35 #include "ui/aura/client/focus_change_observer.h"
36 #include "ui/aura/window_delegate.h" 36 #include "ui/aura/window_delegate.h"
37 #include "ui/aura/window_tree_host_observer.h" 37 #include "ui/aura/window_tree_host_observer.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 class RenderFrameHostImpl; 85 class RenderFrameHostImpl;
86 class RenderViewHostDelegateView; 86 class RenderViewHostDelegateView;
87 class RenderWidgetHostImpl; 87 class RenderWidgetHostImpl;
88 class RenderWidgetHostView; 88 class RenderWidgetHostView;
89 class TouchSelectionControllerClientAura; 89 class TouchSelectionControllerClientAura;
90 90
91 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. 91 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
92 class CONTENT_EXPORT RenderWidgetHostViewAura 92 class CONTENT_EXPORT RenderWidgetHostViewAura
93 : public RenderWidgetHostViewBase, 93 : public RenderWidgetHostViewBase,
94 public DelegatedFrameHostClient, 94 public DelegatedFrameHostClient,
95 public BeginFrameObserverProxyClient,
96 public ui::TextInputClient, 95 public ui::TextInputClient,
97 public gfx::DisplayObserver, 96 public gfx::DisplayObserver,
98 public aura::WindowTreeHostObserver, 97 public aura::WindowTreeHostObserver,
99 public aura::WindowDelegate, 98 public aura::WindowDelegate,
100 public aura::client::ActivationDelegate, 99 public aura::client::ActivationDelegate,
101 public aura::client::FocusChangeObserver, 100 public aura::client::FocusChangeObserver,
102 public aura::client::CursorClientObserver { 101 public aura::client::CursorClientObserver,
102 public cc::BeginFrameObserverBase {
103 public: 103 public:
104 // When |is_guest_view_hack| is true, this view isn't really the view for 104 // When |is_guest_view_hack| is true, this view isn't really the view for
105 // the |widget|, a RenderWidgetHostViewGuest is. 105 // the |widget|, a RenderWidgetHostViewGuest is.
106 // 106 //
107 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated 107 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated
108 // to use RWHVChildFrame (http://crbug.com/330264). 108 // to use RWHVChildFrame (http://crbug.com/330264).
109 RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack); 109 RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack);
110 110
111 // RenderWidgetHostView implementation. 111 // RenderWidgetHostView implementation.
112 bool OnMessageReceived(const IPC::Message& msg) override; 112 bool OnMessageReceived(const IPC::Message& msg) override;
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 void DelegatedFrameHostSendCompositorSwapAck( 453 void DelegatedFrameHostSendCompositorSwapAck(
454 int output_surface_id, 454 int output_surface_id,
455 const cc::CompositorFrameAck& ack) override; 455 const cc::CompositorFrameAck& ack) override;
456 void DelegatedFrameHostSendReclaimCompositorResources( 456 void DelegatedFrameHostSendReclaimCompositorResources(
457 int output_surface_id, 457 int output_surface_id,
458 const cc::CompositorFrameAck& ack) override; 458 const cc::CompositorFrameAck& ack) override;
459 void DelegatedFrameHostOnLostCompositorResources() override; 459 void DelegatedFrameHostOnLostCompositorResources() override;
460 void DelegatedFrameHostUpdateVSyncParameters( 460 void DelegatedFrameHostUpdateVSyncParameters(
461 const base::TimeTicks& timebase, 461 const base::TimeTicks& timebase,
462 const base::TimeDelta& interval) override; 462 const base::TimeDelta& interval) override;
463 void SetBeginFrameSource(cc::BeginFrameSource* source) override;
463 464
464 // BeginFrameObserverProxyClient implementation. 465 // cc::BeginFrameObserverBase implementation.
465 void SendBeginFrame(const cc::BeginFrameArgs& args) override; 466 bool OnBeginFrameDerivedImpl(const cc::BeginFrameArgs& args) override;
467 void OnBeginFrameSourcePausedChanged(bool paused) override;
466 468
467 // Detaches |this| from the input method object. 469 // Detaches |this| from the input method object.
468 void DetachFromInputMethod(); 470 void DetachFromInputMethod();
469 471
470 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method 472 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method
471 // calls our keybindings handler against the event and send matched 473 // calls our keybindings handler against the event and send matched
472 // edit commands to renderer instead. 474 // edit commands to renderer instead.
473 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event); 475 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event);
474 476
475 // Dismisses a Web Popup on a mouse or touch press outside the popup and its 477 // Dismisses a Web Popup on a mouse or touch press outside the popup and its
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 587
586 // Indicates if there is onging composition text. 588 // Indicates if there is onging composition text.
587 bool has_composition_text_; 589 bool has_composition_text_;
588 590
589 // Whether return characters should be passed on to the RenderWidgetHostImpl. 591 // Whether return characters should be passed on to the RenderWidgetHostImpl.
590 bool accept_return_character_; 592 bool accept_return_character_;
591 593
592 // Current tooltip text. 594 // Current tooltip text.
593 base::string16 tooltip_; 595 base::string16 tooltip_;
594 596
597 // The begin frame source being observed. Null if none.
598 cc::BeginFrameSource* begin_frame_source_;
599 bool needs_begin_frames_;
600
595 // Used to record the last position of the mouse. 601 // Used to record the last position of the mouse.
596 // While the mouse is locked, they store the last known position just as mouse 602 // While the mouse is locked, they store the last known position just as mouse
597 // lock was entered. 603 // lock was entered.
598 // Relative to the upper-left corner of the view. 604 // Relative to the upper-left corner of the view.
599 gfx::Point unlocked_mouse_position_; 605 gfx::Point unlocked_mouse_position_;
600 // Relative to the upper-left corner of the screen. 606 // Relative to the upper-left corner of the screen.
601 gfx::Point unlocked_global_mouse_position_; 607 gfx::Point unlocked_global_mouse_position_;
602 // Last cursor position relative to screen. Used to compute movementX/Y. 608 // Last cursor position relative to screen. Used to compute movementX/Y.
603 gfx::Point global_mouse_position_; 609 gfx::Point global_mouse_position_;
604 // In mouse locked mode, we synthetically move the mouse cursor to the center 610 // In mouse locked mode, we synthetically move the mouse cursor to the center
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 // RenderWidgetHostViewGuest. 669 // RenderWidgetHostViewGuest.
664 bool is_guest_view_hack_; 670 bool is_guest_view_hack_;
665 671
666 gfx::Rect disambiguation_target_rect_; 672 gfx::Rect disambiguation_target_rect_;
667 673
668 // The last scroll offset when we start to render the link disambiguation 674 // The last scroll offset when we start to render the link disambiguation
669 // view, so we can ensure the window hasn't moved between copying from the 675 // view, so we can ensure the window hasn't moved between copying from the
670 // compositing surface and showing the disambiguation popup. 676 // compositing surface and showing the disambiguation popup.
671 gfx::Vector2dF disambiguation_scroll_offset_; 677 gfx::Vector2dF disambiguation_scroll_offset_;
672 678
673 BeginFrameObserverProxy begin_frame_observer_proxy_;
674
675 // This flag when set ensures that we send over a notification to blink that 679 // This flag when set ensures that we send over a notification to blink that
676 // the current view has focus. Defaults to false. 680 // the current view has focus. Defaults to false.
677 bool set_focus_on_mouse_down_or_key_event_; 681 bool set_focus_on_mouse_down_or_key_event_;
678 682
679 float device_scale_factor_; 683 float device_scale_factor_;
680 684
681 // Allows tests to send gesture events for testing without first sending a 685 // Allows tests to send gesture events for testing without first sending a
682 // corresponding touch sequence, as would be required by 686 // corresponding touch sequence, as would be required by
683 // RenderWidgetHostInputEventRouter. 687 // RenderWidgetHostInputEventRouter.
684 bool disable_input_event_router_for_testing_; 688 bool disable_input_event_router_for_testing_;
685 689
686 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 690 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
687 691
688 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 692 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
689 }; 693 };
690 694
691 } // namespace content 695 } // namespace content
692 696
693 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 697 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.cc ('k') | 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