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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2165523004: Force MimeHandlerView to always use BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added the missing files Created 4 years, 3 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/frame_host/render_widget_host_view_child_frame.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 49f4525f93c665bb696962c24ed6c85a6cba9443..e51d7223b19d118cbabcd5dac5bed8e965e04ae8 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -30,8 +30,8 @@
#include "content/browser/renderer_host/render_widget_host_input_event_router.h"
#include "content/common/text_input_state.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/guest_mode.h"
#include "content/public/browser/render_process_host.h"
-#include "content/public/common/browser_plugin_guest_mode.h"
#include "gpu/ipc/common/gpu_messages.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/gfx/geometry/size_conversions.h"
@@ -199,7 +199,12 @@ gfx::Vector2dF RenderWidgetHostViewChildFrame::GetLastScrollOffset() const {
}
gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() const {
- NOTREACHED();
+ // TODO(ekaramad): To accomodate MimeHandlerViewGuest while embedded inside
+ // OOPIF-webview, we need to return the native view to be used by
+ // RenderWidgetHostViewGuest. Remove this once https://crbug.com/642826 is
+ // fixed.
+ if (frame_connector_)
+ return frame_connector_->GetParentRenderWidgetHostView()->GetNativeView();
return nullptr;
}
@@ -248,11 +253,9 @@ void RenderWidgetHostViewChildFrame::SetIsLoading(bool is_loading) {
// is a RenderWidgetHostViewChildFrame. In contrast, when there is no
// inner/outer WebContents, only subframe's RenderWidgetHostView can be a
// RenderWidgetHostViewChildFrame which do not get a SetIsLoading() call.
- if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests() &&
- BrowserPluginGuest::IsGuest(
- static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) {
+ if (GuestMode::IsCrossProcessFrameGuest(
+ WebContents::FromRenderViewHost(RenderViewHost::From(host_))))
return;
- }
NOTREACHED();
}

Powered by Google App Engine
This is Rietveld 408576698