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

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

Issue 2242613003: Hoist SetNeedsBeginFrame messages up to the RWHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove base class call Created 4 years, 4 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
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 public cc::BeginFrameObserver { 107 public cc::BeginFrameObserver {
108 public: 108 public:
109 // When |is_guest_view_hack| is true, this view isn't really the view for 109 // When |is_guest_view_hack| is true, this view isn't really the view for
110 // the |widget|, a RenderWidgetHostViewGuest is. 110 // the |widget|, a RenderWidgetHostViewGuest is.
111 // 111 //
112 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated 112 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated
113 // to use RWHVChildFrame (http://crbug.com/330264). 113 // to use RWHVChildFrame (http://crbug.com/330264).
114 RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack); 114 RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack);
115 115
116 // RenderWidgetHostView implementation. 116 // RenderWidgetHostView implementation.
117 bool OnMessageReceived(const IPC::Message& msg) override;
118 void InitAsChild(gfx::NativeView parent_view) override; 117 void InitAsChild(gfx::NativeView parent_view) override;
119 RenderWidgetHost* GetRenderWidgetHost() const override; 118 RenderWidgetHost* GetRenderWidgetHost() const override;
120 void SetSize(const gfx::Size& size) override; 119 void SetSize(const gfx::Size& size) override;
121 void SetBounds(const gfx::Rect& rect) override; 120 void SetBounds(const gfx::Rect& rect) override;
122 gfx::Vector2dF GetLastScrollOffset() const override; 121 gfx::Vector2dF GetLastScrollOffset() const override;
123 gfx::NativeView GetNativeView() const override; 122 gfx::NativeView GetNativeView() const override;
124 gfx::NativeViewAccessible GetNativeViewAccessible() override; 123 gfx::NativeViewAccessible GetNativeViewAccessible() override;
125 ui::TextInputClient* GetTextInputClient() override; 124 ui::TextInputClient* GetTextInputClient() override;
126 bool HasFocus() const override; 125 bool HasFocus() const override;
127 bool IsSurfaceAvailableForCopy() const override; 126 bool IsSurfaceAvailableForCopy() const override;
128 void Show() override; 127 void Show() override;
129 void Hide() override; 128 void Hide() override;
130 bool IsShowing() override; 129 bool IsShowing() override;
131 gfx::Rect GetViewBounds() const override; 130 gfx::Rect GetViewBounds() const override;
132 void SetBackgroundColor(SkColor color) override; 131 void SetBackgroundColor(SkColor color) override;
133 gfx::Size GetVisibleViewportSize() const override; 132 gfx::Size GetVisibleViewportSize() const override;
134 void SetInsets(const gfx::Insets& insets) override; 133 void SetInsets(const gfx::Insets& insets) override;
135 void FocusedNodeTouched(const gfx::Point& location_dips_screen, 134 void FocusedNodeTouched(const gfx::Point& location_dips_screen,
136 bool editable) override; 135 bool editable) override;
136 void SetNeedsBeginFrames(bool needs_begin_frames) override;
137 137
138 // Overridden from RenderWidgetHostViewBase: 138 // Overridden from RenderWidgetHostViewBase:
139 void InitAsPopup(RenderWidgetHostView* parent_host_view, 139 void InitAsPopup(RenderWidgetHostView* parent_host_view,
140 const gfx::Rect& pos) override; 140 const gfx::Rect& pos) override;
141 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; 141 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
142 void Focus() override; 142 void Focus() override;
143 void UpdateCursor(const WebCursor& cursor) override; 143 void UpdateCursor(const WebCursor& cursor) override;
144 void SetIsLoading(bool is_loading) override; 144 void SetIsLoading(bool is_loading) override;
145 void RenderProcessGone(base::TerminationStatus status, 145 void RenderProcessGone(base::TerminationStatus status,
146 int error_code) override; 146 int error_code) override;
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 494
495 // Converts |rect| from window coordinate to screen coordinate. 495 // Converts |rect| from window coordinate to screen coordinate.
496 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const; 496 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const;
497 497
498 // Converts |rect| from screen coordinate to window coordinate. 498 // Converts |rect| from screen coordinate to window coordinate.
499 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const; 499 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const;
500 500
501 // Helper function to set keyboard focus to the main window. 501 // Helper function to set keyboard focus to the main window.
502 void SetKeyboardFocus(); 502 void SetKeyboardFocus();
503 503
504 // Called when RenderWidget wants to start BeginFrame scheduling or stop.
505 void OnSetNeedsBeginFrames(bool needs_begin_frames);
506
507 RenderFrameHostImpl* GetFocusedFrame(); 504 RenderFrameHostImpl* GetFocusedFrame();
508 505
509 // Returns true if the |event| passed in can be forwarded to the renderer. 506 // Returns true if the |event| passed in can be forwarded to the renderer.
510 bool CanRendererHandleEvent(const ui::MouseEvent* event, 507 bool CanRendererHandleEvent(const ui::MouseEvent* event,
511 bool mouse_locked, 508 bool mouse_locked,
512 bool selection_popup) const; 509 bool selection_popup) const;
513 510
514 // Returns true when we can do SurfaceHitTesting for the event type. 511 // Returns true when we can do SurfaceHitTesting for the event type.
515 bool ShouldRouteEvent(const ui::Event* event) const; 512 bool ShouldRouteEvent(const ui::Event* event) const;
516 513
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 int32_t last_active_widget_routing_id_; 689 int32_t last_active_widget_routing_id_;
693 690
694 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 691 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
695 692
696 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 693 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
697 }; 694 };
698 695
699 } // namespace content 696 } // namespace content
700 697
701 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 698 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698