OLD | NEW |
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 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 if (delegate_) | 1441 if (delegate_) |
1442 delegate_->RenderWidgetShowing(); | 1442 delegate_->RenderWidgetShowing(); |
1443 | 1443 |
1444 RenderWidgetHostViewPort* widget_host_view = | 1444 RenderWidgetHostViewPort* widget_host_view = |
1445 RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id)); | 1445 RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id)); |
1446 if (!widget_host_view) | 1446 if (!widget_host_view) |
1447 return; | 1447 return; |
1448 if (is_fullscreen) { | 1448 if (is_fullscreen) { |
1449 widget_host_view->InitAsFullscreen(GetRenderWidgetHostView()); | 1449 widget_host_view->InitAsFullscreen(GetRenderWidgetHostView()); |
1450 } else { | 1450 } else { |
1451 widget_host_view->InitAsPopup(GetRenderWidgetHostView(), initial_pos); | 1451 WebContentsViewDelegate* delegate = |
| 1452 GetContentClient()->browser()->GetWebContentsViewDelegate(this); |
| 1453 widget_host_view->InitAsPopup(GetRenderWidgetHostView(), |
| 1454 initial_pos, delegate); |
1452 } | 1455 } |
1453 | 1456 |
1454 RenderWidgetHostImpl* render_widget_host_impl = | 1457 RenderWidgetHostImpl* render_widget_host_impl = |
1455 RenderWidgetHostImpl::From(widget_host_view->GetRenderWidgetHost()); | 1458 RenderWidgetHostImpl::From(widget_host_view->GetRenderWidgetHost()); |
1456 render_widget_host_impl->Init(); | 1459 render_widget_host_impl->Init(); |
1457 // Only allow privileged mouse lock for fullscreen render widget, which is | 1460 // Only allow privileged mouse lock for fullscreen render widget, which is |
1458 // used to implement Pepper Flash fullscreen. | 1461 // used to implement Pepper Flash fullscreen. |
1459 render_widget_host_impl->set_allow_privileged_mouse_lock(is_fullscreen); | 1462 render_widget_host_impl->set_allow_privileged_mouse_lock(is_fullscreen); |
1460 | 1463 |
1461 #if defined(OS_MACOSX) | 1464 #if defined(OS_MACOSX) |
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3393 | 3396 |
3394 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3397 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
3395 return browser_plugin_guest_.get(); | 3398 return browser_plugin_guest_.get(); |
3396 } | 3399 } |
3397 | 3400 |
3398 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3401 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
3399 return browser_plugin_embedder_.get(); | 3402 return browser_plugin_embedder_.get(); |
3400 } | 3403 } |
3401 | 3404 |
3402 } // namespace content | 3405 } // namespace content |
OLD | NEW |