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

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: Fixed a conflict with the RF creation flag word Created 6 years 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;
59 class WebMouseEvent; 60 class WebMouseEvent;
60 class WebTouchEvent; 61 class WebTouchEvent;
62 class WebView;
61 } 63 }
62 64
63 namespace cc { 65 namespace cc {
64 class OutputSurface; 66 class OutputSurface;
65 class SwapPromise; 67 class SwapPromise;
66 } 68 }
67 69
68 namespace gfx { 70 namespace gfx {
69 class Range; 71 class Range;
70 } 72 }
(...skipping 17 matching lines...) Expand all
88 public IPC::Sender, 90 public IPC::Sender,
89 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient), 91 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient),
90 public base::RefCounted<RenderWidget> { 92 public base::RefCounted<RenderWidget> {
91 public: 93 public:
92 // Creates a new RenderWidget. The opener_id is the routing ID of the 94 // Creates a new RenderWidget. The opener_id is the routing ID of the
93 // RenderView that this widget lives inside. 95 // RenderView that this widget lives inside.
94 static RenderWidget* Create(int32 opener_id, 96 static RenderWidget* Create(int32 opener_id,
95 blink::WebPopupType popup_type, 97 blink::WebPopupType popup_type,
96 const blink::WebScreenInfo& screen_info); 98 const blink::WebScreenInfo& screen_info);
97 99
100 // Creates a new RenderWidget that will be attached to a RenderFrame.
101 static RenderWidget* CreateForFrame(int routing_id,
102 int surface_id,
103 bool hidden,
104 const blink::WebScreenInfo& screen_info,
105 blink::WebView* view);
106
107 static blink::WebWidget* CreateWebFrameWidget(RenderWidget* render_widget,
108 blink::WebView* view);
109
98 // Creates a WebWidget based on the popup type. 110 // Creates a WebWidget based on the popup type.
99 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); 111 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget);
100 112
101 int32 routing_id() const { return routing_id_; } 113 int32 routing_id() const { return routing_id_; }
102 int32 surface_id() const { return surface_id_; } 114 int32 surface_id() const { return surface_id_; }
103 blink::WebWidget* webwidget() const { return webwidget_; } 115 blink::WebWidget* webwidget() const { return webwidget_; }
104 gfx::Size size() const { return size_; } 116 gfx::Size size() const { return size_; }
105 bool has_focus() const { return has_focus_; } 117 bool has_focus() const { return has_focus_; }
106 bool is_fullscreen() const { return is_fullscreen_; } 118 bool is_fullscreen() const { return is_fullscreen_; }
107 bool is_hidden() const { return is_hidden_; } 119 bool is_hidden() const { return is_hidden_; }
108 bool handling_input_event() const { return handling_input_event_; } 120 bool handling_input_event() const { return handling_input_event_; }
109 // Temporary for debugging purposes... 121 // Temporary for debugging purposes...
110 bool closing() const { return closing_; } 122 bool closing() const { return closing_; }
111 bool is_swapped_out() { return is_swapped_out_; } 123 bool is_swapped_out() { return is_swapped_out_; }
112 ui::MenuSourceType context_menu_source_type() { 124 ui::MenuSourceType context_menu_source_type() {
113 return context_menu_source_type_; 125 return context_menu_source_type_;
114 } 126 }
115 bool has_host_context_menu_location() { 127 bool has_host_context_menu_location() {
116 return has_host_context_menu_location_; 128 return has_host_context_menu_location_;
117 } 129 }
118 gfx::Point host_context_menu_location() { 130 gfx::Point host_context_menu_location() {
119 return host_context_menu_location_; 131 return host_context_menu_location_;
120 } 132 }
121 133
134 // ScreenInfo exposed so it can be passed to subframe RenderWidgets.
135 blink::WebScreenInfo screen_info() const { return screen_info_; }
136
122 // Functions to track out-of-process frames for special notifications. 137 // Functions to track out-of-process frames for special notifications.
123 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); 138 void RegisterRenderFrameProxy(RenderFrameProxy* proxy);
124 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); 139 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy);
125 140
126 // Functions to track all RenderFrame objects associated with this 141 // Functions to track all RenderFrame objects associated with this
127 // RenderWidget. 142 // RenderWidget.
128 void RegisterRenderFrame(RenderFrameImpl* frame); 143 void RegisterRenderFrame(RenderFrameImpl* frame);
129 void UnregisterRenderFrame(RenderFrameImpl* frame); 144 void UnregisterRenderFrame(RenderFrameImpl* frame);
130 145
131 #if defined(VIDEO_HOLE) 146 #if defined(VIDEO_HOLE)
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 ui::MenuSourceType context_menu_source_type_; 779 ui::MenuSourceType context_menu_source_type_;
765 bool has_host_context_menu_location_; 780 bool has_host_context_menu_location_;
766 gfx::Point host_context_menu_location_; 781 gfx::Point host_context_menu_location_;
767 782
768 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 783 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
769 }; 784 };
770 785
771 } // namespace content 786 } // namespace content
772 787
773 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 788 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698