OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/render_frame_host_manager.h" | 5 #include "content/browser/frame_host/render_frame_host_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2447 ->render_manager() | 2447 ->render_manager() |
2448 ->CreateOpenerProxiesForFrameTree(instance, skip_this_node); | 2448 ->CreateOpenerProxiesForFrameTree(instance, skip_this_node); |
2449 } | 2449 } |
2450 | 2450 |
2451 // Set openers for nodes in |nodes_with_back_links| in a second pass. | 2451 // Set openers for nodes in |nodes_with_back_links| in a second pass. |
2452 // The proxies created at these FrameTreeNodes in | 2452 // The proxies created at these FrameTreeNodes in |
2453 // CreateOpenerProxiesForFrameTree won't have their opener routing ID | 2453 // CreateOpenerProxiesForFrameTree won't have their opener routing ID |
2454 // available when created due to cycles or back links in the opener chain. | 2454 // available when created due to cycles or back links in the opener chain. |
2455 // They must have their openers updated as a separate step after proxy | 2455 // They must have their openers updated as a separate step after proxy |
2456 // creation. | 2456 // creation. |
2457 for (const auto& node : nodes_with_back_links) { | 2457 for (auto* node : nodes_with_back_links) { |
2458 RenderFrameProxyHost* proxy = | 2458 RenderFrameProxyHost* proxy = |
2459 node->render_manager()->GetRenderFrameProxyHost(instance); | 2459 node->render_manager()->GetRenderFrameProxyHost(instance); |
2460 // If there is no proxy, the cycle may involve nodes in the same process, | 2460 // If there is no proxy, the cycle may involve nodes in the same process, |
2461 // or, if this is a subframe, --site-per-process may be off. Either way, | 2461 // or, if this is a subframe, --site-per-process may be off. Either way, |
2462 // there's nothing more to do. | 2462 // there's nothing more to do. |
2463 if (!proxy) | 2463 if (!proxy) |
2464 continue; | 2464 continue; |
2465 | 2465 |
2466 int opener_routing_id = | 2466 int opener_routing_id = |
2467 node->render_manager()->GetOpenerRoutingID(instance); | 2467 node->render_manager()->GetOpenerRoutingID(instance); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2604 resolved_url)) { | 2604 resolved_url)) { |
2605 DCHECK(!dest_instance || | 2605 DCHECK(!dest_instance || |
2606 dest_instance == render_frame_host_->GetSiteInstance()); | 2606 dest_instance == render_frame_host_->GetSiteInstance()); |
2607 return false; | 2607 return false; |
2608 } | 2608 } |
2609 | 2609 |
2610 return true; | 2610 return true; |
2611 } | 2611 } |
2612 | 2612 |
2613 } // namespace content | 2613 } // namespace content |
OLD | NEW |