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

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

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: Address comments move destruction callback to GuestViewContainer Created 5 years, 6 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/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 a27d7d2d60355665243192df838d27ce0150a2a2..8c473e2cba2a1c9740758f1aec2204b254a3f4aa 100644
--- a/content/browser/frame_host/cross_process_frame_connector.cc
+++ b/content/browser/frame_host/cross_process_frame_connector.cc
@@ -7,6 +7,8 @@
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_manager.h"
#include "content/browser/compositor/surface_utils.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"
@@ -144,6 +146,15 @@ gfx::Rect CrossProcessFrameConnector::ChildFrameRect() {
}
void CrossProcessFrameConnector::GetScreenInfo(blink::WebScreenInfo* results) {
+ // Inner WebContents's root FrameTreeNode does not have a parent(), so
+ // GetRenderWidgetHostView() call below will fail.
+ // TODO(lazyboy): Fix this.
+ if (frame_proxy_in_parent_renderer_->frame_tree_node()
+ ->render_manager()
+ ->ForInnerDelegate()) {
+ return;
+ }
+
RenderWidgetHostView* rwhv =
frame_proxy_in_parent_renderer_->GetRenderWidgetHostView();
if (rwhv)
@@ -157,8 +168,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->GetOuterRenderWidgetHostForKeyboardInput()
+ : frame_proxy_in_parent_renderer_->GetRenderViewHost();
if (blink::WebInputEvent::isKeyboardEventType(event->type)) {
if (!parent_widget->GetLastKeyboardEvent())

Powered by Google App Engine
This is Rietveld 408576698