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

Side by Side Diff: content/browser/web_contents/web_contents_view_helper.cc

Issue 10377158: Move keyboard related methods from RenderViewHostDelegate to a new RenderWidgetHostDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove crbug link Created 8 years, 7 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 | Annotate | Revision Log
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 #include "content/browser/web_contents/web_contents_view_helper.h" 5 #include "content/browser/web_contents/web_contents_view_helper.h"
6 6
7 #include "content/browser/renderer_host/render_view_host_impl.h" 7 #include "content/browser/renderer_host/render_view_host_impl.h"
8 #include "content/browser/web_contents/web_contents_impl.h" 8 #include "content/browser/web_contents/web_contents_impl.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/port/browser/render_widget_host_view_port.h" 10 #include "content/port/browser/render_widget_host_view_port.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 return new_contents; 123 return new_contents;
124 } 124 }
125 125
126 RenderWidgetHostView* WebContentsViewHelper::CreateNewWidget( 126 RenderWidgetHostView* WebContentsViewHelper::CreateNewWidget(
127 WebContentsImpl* web_contents, 127 WebContentsImpl* web_contents,
128 int route_id, 128 int route_id,
129 bool is_fullscreen, 129 bool is_fullscreen,
130 WebKit::WebPopupType popup_type) { 130 WebKit::WebPopupType popup_type) {
131 content::RenderProcessHost* process = web_contents->GetRenderProcessHost(); 131 content::RenderProcessHost* process = web_contents->GetRenderProcessHost();
132 RenderWidgetHostImpl* widget_host = 132 RenderWidgetHostImpl* widget_host =
133 new RenderWidgetHostImpl(process, route_id); 133 new RenderWidgetHostImpl(web_contents, process, route_id);
134 RenderWidgetHostViewPort* widget_view = 134 RenderWidgetHostViewPort* widget_view =
135 RenderWidgetHostViewPort::CreateViewForWidget(widget_host); 135 RenderWidgetHostViewPort::CreateViewForWidget(widget_host);
136 if (!is_fullscreen) { 136 if (!is_fullscreen) {
137 // Popups should not get activated. 137 // Popups should not get activated.
138 widget_view->SetPopupType(popup_type); 138 widget_view->SetPopupType(popup_type);
139 } 139 }
140 // Save the created widget associated with the route so we can show it later. 140 // Save the created widget associated with the route so we can show it later.
141 pending_widget_views_[route_id] = widget_view; 141 pending_widget_views_[route_id] = widget_view;
142 return widget_view; 142 return widget_view;
143 } 143 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id)); 210 RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id));
211 if (is_fullscreen) { 211 if (is_fullscreen) {
212 widget_host_view->InitAsFullscreen(web_contents->GetRenderWidgetHostView()); 212 widget_host_view->InitAsFullscreen(web_contents->GetRenderWidgetHostView());
213 } else { 213 } else {
214 widget_host_view->InitAsPopup(web_contents->GetRenderWidgetHostView(), 214 widget_host_view->InitAsPopup(web_contents->GetRenderWidgetHostView(),
215 initial_pos); 215 initial_pos);
216 } 216 }
217 RenderWidgetHostImpl::From(widget_host_view->GetRenderWidgetHost())->Init(); 217 RenderWidgetHostImpl::From(widget_host_view->GetRenderWidgetHost())->Init();
218 return widget_host_view; 218 return widget_host_view;
219 } 219 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698