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

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

Issue 11773042: Allow embedders to provide a custom view for popup (select box) widgets, (Closed) Base URL: http://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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
« no previous file with comments | « AUTHORS ('k') | content/browser/web_contents/web_contents_view_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 } 1379 }
1380 1380
1381 void WebContentsImpl::CreateNewWidget(int route_id, 1381 void WebContentsImpl::CreateNewWidget(int route_id,
1382 bool is_fullscreen, 1382 bool is_fullscreen,
1383 WebKit::WebPopupType popup_type) { 1383 WebKit::WebPopupType popup_type) {
1384 RenderProcessHost* process = GetRenderProcessHost(); 1384 RenderProcessHost* process = GetRenderProcessHost();
1385 RenderWidgetHostImpl* widget_host = 1385 RenderWidgetHostImpl* widget_host =
1386 new RenderWidgetHostImpl(this, process, route_id); 1386 new RenderWidgetHostImpl(this, process, route_id);
1387 created_widgets_.insert(widget_host); 1387 created_widgets_.insert(widget_host);
1388 1388
1389 RenderWidgetHostViewPort* widget_view = 1389 RenderWidgetHostViewPort* widget_view = RenderWidgetHostViewPort::FromRWHV(
1390 RenderWidgetHostViewPort::CreateViewForWidget(widget_host); 1390 view_->CreateViewForPopupWidget(widget_host));
1391 if (!widget_view)
1392 return;
1391 if (!is_fullscreen) { 1393 if (!is_fullscreen) {
1392 // Popups should not get activated. 1394 // Popups should not get activated.
1393 widget_view->SetPopupType(popup_type); 1395 widget_view->SetPopupType(popup_type);
1394 } 1396 }
1395 // Save the created widget associated with the route so we can show it later. 1397 // Save the created widget associated with the route so we can show it later.
1396 pending_widget_views_[route_id] = widget_view; 1398 pending_widget_views_[route_id] = widget_view;
1397 1399
1398 #if defined(OS_MACOSX) 1400 #if defined(OS_MACOSX)
1399 // A RenderWidgetHostViewMac has lifetime scoped to the view. We'll retain it 1401 // A RenderWidgetHostViewMac has lifetime scoped to the view. We'll retain it
1400 // to allow it to survive the trip without being hosted. 1402 // to allow it to survive the trip without being hosted.
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after
3386 3388
3387 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { 3389 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
3388 return browser_plugin_guest_.get(); 3390 return browser_plugin_guest_.get();
3389 } 3391 }
3390 3392
3391 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { 3393 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
3392 return browser_plugin_embedder_.get(); 3394 return browser_plugin_embedder_.get();
3393 } 3395 }
3394 3396
3395 } // namespace content 3397 } // namespace content
OLDNEW
« no previous file with comments | « AUTHORS ('k') | content/browser/web_contents/web_contents_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698