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..7f1bda7da4d080f25a51f7bdb57b3d73b3665085 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,6 +30,7 @@ |
#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" |
@@ -199,7 +200,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 +254,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::ForInnerWebContentsUsingCrossProcessFrames( |
+ RenderViewHost::From(host_))) |
return; |
- } |
NOTREACHED(); |
} |