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 62dfcec24f0af2a1ddda3258e25047494a32db7a..77f1cab87ee54d01aac9a74aba5faaf7a66caa64 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -1538,6 +1538,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { |
| if (!view_) { |
| if (browser_plugin_guest_ && |
| + !browser_plugin_guest_->IsMimeHandlerViewGuest() && |
| BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) { |
| view_.reset(new WebContentsViewChildFrame( |
| this, delegate, &render_view_host_delegate_view_)); |
| @@ -1548,7 +1549,8 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { |
| } |
| if (browser_plugin_guest_ && |
| - !BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) { |
| + (!BrowserPluginGuestMode::UseCrossProcessFramesForGuests() || |
| + browser_plugin_guest_->IsMimeHandlerViewGuest())) { |
| view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(), |
| std::move(view_), |
| &render_view_host_delegate_view_)); |
| @@ -4581,7 +4583,9 @@ void WebContentsImpl::EnsureOpenerProxiesExist(RenderFrameHost* source_rfh) { |
| // then we should not create a RenderView. AttachToOuterWebContentsFrame() |
| // already created a RenderFrameProxyHost for that purpose. |
| if (GetBrowserPluginEmbedder() && |
| - BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) { |
| + BrowserPluginGuestMode::UseCrossProcessFramesForGuests() && |
| + !source_web_contents->GetBrowserPluginGuest() |
| + ->IsMimeHandlerViewGuest()) { |
| return; |
| } |
| @@ -4984,7 +4988,9 @@ RenderFrameHostManager* WebContentsImpl::GetRenderManager() const { |
| } |
| WebContentsImpl* WebContentsImpl::GetOuterWebContents() { |
| - if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) { |
| + if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests() && |
| + (!GetBrowserPluginGuest() || |
|
lfg
2016/07/20 19:49:57
Why do you need the null check?
And you can use b
EhsanK
2016/07/20 20:49:19
|browser_plugin_guest_| is null when we are in an
lfg
2016/07/20 21:05:34
Acknowledged.
|
| + !GetBrowserPluginGuest()->IsMimeHandlerViewGuest())) { |
| if (node_) |
| return node_->outer_web_contents(); |
| } else { |