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

Side by Side Diff: content/browser/frame_host/cross_process_frame_connector.cc

Issue 1262563003: Subframes in inner WebContents should not create proxies in process of outer WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments from lfg@ Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/cross_process_frame_connector.h" 5 #include "content/browser/frame_host/cross_process_frame_connector.h"
6 6
7 #include "cc/surfaces/surface.h" 7 #include "cc/surfaces/surface.h"
8 #include "cc/surfaces/surface_manager.h" 8 #include "cc/surfaces/surface_manager.h"
9 #include "content/browser/compositor/surface_utils.h" 9 #include "content/browser/compositor/surface_utils.h"
10 #include "content/browser/frame_host/frame_tree_node.h" 10 #include "content/browser/frame_host/frame_tree_node.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return child_frame_rect_; 145 return child_frame_rect_;
146 } 146 }
147 147
148 void CrossProcessFrameConnector::GetScreenInfo(blink::WebScreenInfo* results) { 148 void CrossProcessFrameConnector::GetScreenInfo(blink::WebScreenInfo* results) {
149 // Inner WebContents's root FrameTreeNode does not have a parent(), so 149 // Inner WebContents's root FrameTreeNode does not have a parent(), so
150 // GetRenderWidgetHostView() call below will fail. 150 // GetRenderWidgetHostView() call below will fail.
151 // TODO(lazyboy): Fix this. 151 // TODO(lazyboy): Fix this.
152 if (frame_proxy_in_parent_renderer_->frame_tree_node() 152 if (frame_proxy_in_parent_renderer_->frame_tree_node()
153 ->render_manager() 153 ->render_manager()
154 ->ForInnerDelegate()) { 154 ->ForInnerDelegate()) {
155 DCHECK(frame_proxy_in_parent_renderer_->frame_tree_node()->IsMainFrame());
155 return; 156 return;
156 } 157 }
157 158
158 RenderWidgetHostView* rwhv = 159 RenderWidgetHostView* rwhv =
159 frame_proxy_in_parent_renderer_->GetRenderWidgetHostView(); 160 frame_proxy_in_parent_renderer_->GetRenderWidgetHostView();
160 if (rwhv) 161 if (rwhv)
161 static_cast<RenderWidgetHostViewBase*>(rwhv)->GetScreenInfo(results); 162 static_cast<RenderWidgetHostViewBase*>(rwhv)->GetScreenInfo(results);
162 } 163 }
163 164
164 void CrossProcessFrameConnector::OnForwardInputEvent( 165 void CrossProcessFrameConnector::OnForwardInputEvent(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 208 }
208 } 209 }
209 210
210 void CrossProcessFrameConnector::SetSize(gfx::Rect frame_rect) { 211 void CrossProcessFrameConnector::SetSize(gfx::Rect frame_rect) {
211 child_frame_rect_ = frame_rect; 212 child_frame_rect_ = frame_rect;
212 if (view_) 213 if (view_)
213 view_->SetSize(frame_rect.size()); 214 view_->SetSize(frame_rect.size());
214 } 215 }
215 216
216 } // namespace content 217 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698