Index: content/browser/frame_host/cross_process_frame_connector.cc |
diff --git a/content/browser/frame_host/cross_process_frame_connector.cc b/content/browser/frame_host/cross_process_frame_connector.cc |
index b9f66ac7599a30538dec68da57fd41954b871f2c..eca953bfe4ff1f43fe25a084b7bad378520afe58 100644 |
--- a/content/browser/frame_host/cross_process_frame_connector.cc |
+++ b/content/browser/frame_host/cross_process_frame_connector.cc |
@@ -4,6 +4,8 @@ |
#include "content/browser/frame_host/cross_process_frame_connector.h" |
+#include "content/browser/frame_host/frame_tree_node.h" |
+#include "content/browser/frame_host/render_frame_host_manager.h" |
#include "content/browser/frame_host/render_frame_proxy_host.h" |
#include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
#include "content/browser/renderer_host/render_view_host_impl.h" |
@@ -114,8 +116,12 @@ void CrossProcessFrameConnector::OnForwardInputEvent( |
RenderWidgetHostImpl* child_widget = |
RenderWidgetHostImpl::From(view_->GetRenderWidgetHost()); |
+ RenderFrameHostManager* manager = |
+ frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); |
RenderWidgetHostImpl* parent_widget = |
- frame_proxy_in_parent_renderer_->GetRenderViewHost(); |
+ manager->ForInnerDelegate() |
+ ? manager->GetOuterRenderViewHostForKeyboardInput() |
+ : frame_proxy_in_parent_renderer_->GetRenderViewHost(); |
if (blink::WebInputEvent::isKeyboardEventType(event->type)) { |
if (!parent_widget->GetLastKeyboardEvent()) |