Chromium Code Reviews| Index: content/browser/web_contents/web_contents_impl.cc |
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
| index d30295dd1177d90efaa4a3244ef7d946b004384f..64912afd6b9d4195da1b8b35f156e18bbbcfd8cb 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -1615,6 +1615,17 @@ void WebContentsImpl::ShowCreatedWidget(int route_id, |
| RenderWidgetHostImpl* render_widget_host_impl = |
| RenderWidgetHostImpl::From(widget_host_view->GetRenderWidgetHost()); |
| render_widget_host_impl->Init(); |
|
Charlie Reis
2013/08/26 18:27:10
Is this the only place Init is being called?
I'm
awong
2013/08/27 19:58:13
For now. When we create subframes, we'll need to
|
| + if (render_widget_host_impl->IsRenderView()) { |
| + // The mainframe RenderFrameHost for a RenderViewHost has its |
|
Charlie Reis
2013/08/26 18:27:10
nit: main frame
(here and below)
awong
2013/08/27 19:58:13
Done.
|
| + // initialization delayed until the containing RenderViewHost itself is |
| + // initialized. When the containing RenderViewHost is initialized, the |
| + // mainframe should also needs to be explicitly initialized. This is not |
|
Charlie Reis
2013/08/26 18:27:10
nit: Remove "should"
awong
2013/08/27 19:58:13
Done.
|
| + // an issue for subframe RenderFrameHosts. |
|
Charlie Reis
2013/08/26 18:27:10
Can you explain why in the comment? I'm not sure
awong
2013/08/27 19:58:13
Done.
|
| + RenderViewHostImpl* render_view_host_impl = |
| + static_cast<RenderViewHostImpl*>( |
| + RenderWidgetHostImpl::From(render_widget_host_impl)); |
| + render_view_host_impl->main_render_frame_host()->Init(); |
| + } |
| // Only allow privileged mouse lock for fullscreen render widget, which is |
| // used to implement Pepper Flash fullscreen. |
| render_widget_host_impl->set_allow_privileged_mouse_lock(is_fullscreen); |