| OLD | NEW |
| 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_hittest.h" | 8 #include "cc/surfaces/surface_hittest.h" |
| 9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
| 10 #include "content/browser/compositor/surface_utils.h" | 10 #include "content/browser/compositor/surface_utils.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 proxy_node->frame_tree()->SubtreeNodes(proxy_node)) { | 294 proxy_node->frame_tree()->SubtreeNodes(proxy_node)) { |
| 295 if (node != proxy_node && node->current_frame_host()->is_local_root()) | 295 if (node != proxy_node && node->current_frame_host()->is_local_root()) |
| 296 node->current_frame_host()->GetRenderWidgetHost()->SendScreenRects(); | 296 node->current_frame_host()->GetRenderWidgetHost()->SendScreenRects(); |
| 297 } | 297 } |
| 298 } | 298 } |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 | 301 |
| 302 RenderWidgetHostViewBase* | 302 RenderWidgetHostViewBase* |
| 303 CrossProcessFrameConnector::GetRootRenderWidgetHostView() { | 303 CrossProcessFrameConnector::GetRootRenderWidgetHostView() { |
| 304 // Tests may not have frame_proxy_in_parent_renderer_ set. |
| 305 if (!frame_proxy_in_parent_renderer_) |
| 306 return nullptr; |
| 307 |
| 304 RenderFrameHostImpl* top_host = frame_proxy_in_parent_renderer_-> | 308 RenderFrameHostImpl* top_host = frame_proxy_in_parent_renderer_-> |
| 305 frame_tree_node()->frame_tree()->root()->current_frame_host(); | 309 frame_tree_node()->frame_tree()->root()->current_frame_host(); |
| 306 | 310 |
| 307 // This method should return the root RWHV from the top-level WebContents, | 311 // This method should return the root RWHV from the top-level WebContents, |
| 308 // in the case of nested WebContents. | 312 // in the case of nested WebContents. |
| 309 while (top_host->frame_tree_node()->render_manager()->ForInnerDelegate()) { | 313 while (top_host->frame_tree_node()->render_manager()->ForInnerDelegate()) { |
| 310 top_host = top_host->frame_tree_node()->render_manager()-> | 314 top_host = top_host->frame_tree_node()->render_manager()-> |
| 311 GetOuterDelegateNode()->frame_tree()->root()->current_frame_host(); | 315 GetOuterDelegateNode()->frame_tree()->root()->current_frame_host(); |
| 312 } | 316 } |
| 313 | 317 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 331 | 335 |
| 332 if (parent) { | 336 if (parent) { |
| 333 return static_cast<RenderWidgetHostViewBase*>( | 337 return static_cast<RenderWidgetHostViewBase*>( |
| 334 parent->current_frame_host()->GetView()); | 338 parent->current_frame_host()->GetView()); |
| 335 } | 339 } |
| 336 | 340 |
| 337 return nullptr; | 341 return nullptr; |
| 338 } | 342 } |
| 339 | 343 |
| 340 } // namespace content | 344 } // namespace content |
| OLD | NEW |