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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2165523004: Force MimeHandlerView to always use BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using a boolean to determine whether or not BrowserPluginGuest is for MimeHandlerViewGuest Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698