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

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

Issue 1526263003: Position autofill popup widgets correctly under --site-per-process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed incorrect cast Created 4 years, 11 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.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 if (rwhv) 165 if (rwhv)
166 static_cast<RenderWidgetHostViewBase*>(rwhv)->GetScreenInfo(results); 166 static_cast<RenderWidgetHostViewBase*>(rwhv)->GetScreenInfo(results);
167 } 167 }
168 168
169 void CrossProcessFrameConnector::UpdateCursor(const WebCursor& cursor) { 169 void CrossProcessFrameConnector::UpdateCursor(const WebCursor& cursor) {
170 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); 170 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView();
171 if (root_view) 171 if (root_view)
172 root_view->UpdateCursor(cursor); 172 root_view->UpdateCursor(cursor);
173 } 173 }
174 174
175 void CrossProcessFrameConnector::TransformPointToRootCoordSpace( 175 gfx::Point CrossProcessFrameConnector::TransformPointToRootCoordSpace(
176 const gfx::Point& point, 176 const gfx::Point& point,
177 cc::SurfaceId surface_id, 177 cc::SurfaceId surface_id) {
178 gfx::Point* transformed_point) { 178 gfx::Point transformed_point = point;
179 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); 179 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView();
180 *transformed_point = point;
181 if (root_view) 180 if (root_view)
182 root_view->TransformPointToLocalCoordSpace(point, surface_id, 181 root_view->TransformPointToLocalCoordSpace(point, surface_id,
183 transformed_point); 182 &transformed_point);
183 return transformed_point;
184 } 184 }
185 185
186 bool CrossProcessFrameConnector::HasFocus() { 186 bool CrossProcessFrameConnector::HasFocus() {
187 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); 187 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView();
188 if (root_view) 188 if (root_view)
189 return root_view->HasFocus(); 189 return root_view->HasFocus();
190 return false; 190 return false;
191 } 191 }
192 192
193 void CrossProcessFrameConnector::OnForwardInputEvent( 193 void CrossProcessFrameConnector::OnForwardInputEvent(
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // in the case of nested WebContents. 264 // in the case of nested WebContents.
265 while (top_host->frame_tree_node()->render_manager()->ForInnerDelegate()) { 265 while (top_host->frame_tree_node()->render_manager()->ForInnerDelegate()) {
266 top_host = top_host->frame_tree_node()->render_manager()-> 266 top_host = top_host->frame_tree_node()->render_manager()->
267 GetOuterDelegateNode()->frame_tree()->root()->current_frame_host(); 267 GetOuterDelegateNode()->frame_tree()->root()->current_frame_host();
268 } 268 }
269 269
270 return static_cast<RenderWidgetHostViewBase*>(top_host->GetView()); 270 return static_cast<RenderWidgetHostViewBase*>(top_host->GetView());
271 } 271 }
272 272
273 } // namespace content 273 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/cross_process_frame_connector.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698