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

Side by Side Diff: content/renderer/render_widget.h

Issue 616133002: Make RenderFrame(Host) own a RenderWidget(Host). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-applying same patch 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_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 struct ViewMsg_Resize_Params; 47 struct ViewMsg_Resize_Params;
48 class ViewHostMsg_UpdateRect; 48 class ViewHostMsg_UpdateRect;
49 49
50 namespace IPC { 50 namespace IPC {
51 class SyncMessage; 51 class SyncMessage;
52 class SyncMessageFilter; 52 class SyncMessageFilter;
53 } 53 }
54 54
55 namespace blink { 55 namespace blink {
56 struct WebDeviceEmulationParams; 56 struct WebDeviceEmulationParams;
57 class WebFrameWidget;
57 class WebGestureEvent; 58 class WebGestureEvent;
58 class WebKeyboardEvent; 59 class WebKeyboardEvent;
60 class WebLocalFrame;
59 class WebMouseEvent; 61 class WebMouseEvent;
60 class WebNode; 62 class WebNode;
61 struct WebPoint; 63 struct WebPoint;
62 class WebTouchEvent; 64 class WebTouchEvent;
65 class WebView;
63 } 66 }
64 67
65 namespace cc { 68 namespace cc {
66 struct InputHandlerScrollResult; 69 struct InputHandlerScrollResult;
67 class OutputSurface; 70 class OutputSurface;
68 class SwapPromise; 71 class SwapPromise;
69 } 72 }
70 73
71 namespace gfx { 74 namespace gfx {
72 class Range; 75 class Range;
(...skipping 20 matching lines...) Expand all
93 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient), 96 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient),
94 public base::RefCounted<RenderWidget> { 97 public base::RefCounted<RenderWidget> {
95 public: 98 public:
96 // Creates a new RenderWidget. The opener_id is the routing ID of the 99 // Creates a new RenderWidget. The opener_id is the routing ID of the
97 // RenderView that this widget lives inside. 100 // RenderView that this widget lives inside.
98 static RenderWidget* Create(int32 opener_id, 101 static RenderWidget* Create(int32 opener_id,
99 CompositorDependencies* compositor_deps, 102 CompositorDependencies* compositor_deps,
100 blink::WebPopupType popup_type, 103 blink::WebPopupType popup_type,
101 const blink::WebScreenInfo& screen_info); 104 const blink::WebScreenInfo& screen_info);
102 105
106 // Creates a new RenderWidget that will be attached to a RenderFrame.
107 static RenderWidget* CreateForFrame(int routing_id,
108 int surface_id,
109 bool hidden,
110 const blink::WebScreenInfo& screen_info,
111 CompositorDependencies* compositor_deps,
112 blink::WebLocalFrame* frame);
113
114 static blink::WebWidget* CreateWebFrameWidget(RenderWidget* render_widget,
115 blink::WebLocalFrame* frame);
116
103 // Creates a WebWidget based on the popup type. 117 // Creates a WebWidget based on the popup type.
104 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); 118 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget);
105 119
106 int32 routing_id() const { return routing_id_; } 120 int32 routing_id() const { return routing_id_; }
107 int32 surface_id() const { return surface_id_; } 121 int32 surface_id() const { return surface_id_; }
108 CompositorDependencies* compositor_deps() const { return compositor_deps_; } 122 CompositorDependencies* compositor_deps() const { return compositor_deps_; }
109 blink::WebWidget* webwidget() const { return webwidget_; } 123 blink::WebWidget* webwidget() const { return webwidget_; }
110 gfx::Size size() const { return size_; } 124 gfx::Size size() const { return size_; }
111 bool has_focus() const { return has_focus_; } 125 bool has_focus() const { return has_focus_; }
112 bool is_fullscreen() const { return is_fullscreen_; } 126 bool is_fullscreen() const { return is_fullscreen_; }
113 bool is_hidden() const { return is_hidden_; } 127 bool is_hidden() const { return is_hidden_; }
114 bool handling_input_event() const { return handling_input_event_; } 128 bool handling_input_event() const { return handling_input_event_; }
115 // Temporary for debugging purposes... 129 // Temporary for debugging purposes...
116 bool closing() const { return closing_; } 130 bool closing() const { return closing_; }
117 bool is_swapped_out() { return is_swapped_out_; } 131 bool is_swapped_out() { return is_swapped_out_; }
118 ui::MenuSourceType context_menu_source_type() { 132 ui::MenuSourceType context_menu_source_type() {
119 return context_menu_source_type_; 133 return context_menu_source_type_;
120 } 134 }
121 bool has_host_context_menu_location() { 135 bool has_host_context_menu_location() {
122 return has_host_context_menu_location_; 136 return has_host_context_menu_location_;
123 } 137 }
124 gfx::Point host_context_menu_location() { 138 gfx::Point host_context_menu_location() {
125 return host_context_menu_location_; 139 return host_context_menu_location_;
126 } 140 }
127 141
142 // ScreenInfo exposed so it can be passed to subframe RenderWidgets.
143 blink::WebScreenInfo screen_info() const { return screen_info_; }
144
128 // Functions to track out-of-process frames for special notifications. 145 // Functions to track out-of-process frames for special notifications.
129 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); 146 void RegisterRenderFrameProxy(RenderFrameProxy* proxy);
130 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); 147 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy);
131 148
132 // Functions to track all RenderFrame objects associated with this 149 // Functions to track all RenderFrame objects associated with this
133 // RenderWidget. 150 // RenderWidget.
134 void RegisterRenderFrame(RenderFrameImpl* frame); 151 void RegisterRenderFrame(RenderFrameImpl* frame);
135 void UnregisterRenderFrame(RenderFrameImpl* frame); 152 void UnregisterRenderFrame(RenderFrameImpl* frame);
136 153
137 #if defined(VIDEO_HOLE) 154 #if defined(VIDEO_HOLE)
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 ui::MenuSourceType context_menu_source_type_; 806 ui::MenuSourceType context_menu_source_type_;
790 bool has_host_context_menu_location_; 807 bool has_host_context_menu_location_;
791 gfx::Point host_context_menu_location_; 808 gfx::Point host_context_menu_location_;
792 809
793 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 810 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
794 }; 811 };
795 812
796 } // namespace content 813 } // namespace content
797 814
798 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 815 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698