| 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 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2329 } | 2329 } |
| 2330 | 2330 |
| 2331 RenderFrameProxyHost* RenderFrameHostManager::GetRenderFrameProxyHost( | 2331 RenderFrameProxyHost* RenderFrameHostManager::GetRenderFrameProxyHost( |
| 2332 SiteInstance* instance) const { | 2332 SiteInstance* instance) const { |
| 2333 auto it = proxy_hosts_.find(instance->GetId()); | 2333 auto it = proxy_hosts_.find(instance->GetId()); |
| 2334 if (it != proxy_hosts_.end()) | 2334 if (it != proxy_hosts_.end()) |
| 2335 return it->second; | 2335 return it->second; |
| 2336 return nullptr; | 2336 return nullptr; |
| 2337 } | 2337 } |
| 2338 | 2338 |
| 2339 int RenderFrameHostManager::GetProxyCount() { |
| 2340 return proxy_hosts_.size(); |
| 2341 } |
| 2342 |
| 2339 std::map<int, RenderFrameProxyHost*> | 2343 std::map<int, RenderFrameProxyHost*> |
| 2340 RenderFrameHostManager::GetAllProxyHostsForTesting() { | 2344 RenderFrameHostManager::GetAllProxyHostsForTesting() { |
| 2341 std::map<int, RenderFrameProxyHost*> result; | 2345 std::map<int, RenderFrameProxyHost*> result; |
| 2342 for (const auto& pair : proxy_hosts_) | 2346 for (const auto& pair : proxy_hosts_) |
| 2343 result[pair.first] = pair.second; | 2347 result[pair.first] = pair.second; |
| 2344 return result; | 2348 return result; |
| 2345 } | 2349 } |
| 2346 | 2350 |
| 2347 void RenderFrameHostManager::CollectOpenerFrameTrees( | 2351 void RenderFrameHostManager::CollectOpenerFrameTrees( |
| 2348 std::vector<FrameTree*>* opener_frame_trees, | 2352 std::vector<FrameTree*>* opener_frame_trees, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2480 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { | 2484 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { |
| 2481 if (!frame_tree_node_->opener()) | 2485 if (!frame_tree_node_->opener()) |
| 2482 return MSG_ROUTING_NONE; | 2486 return MSG_ROUTING_NONE; |
| 2483 | 2487 |
| 2484 return frame_tree_node_->opener() | 2488 return frame_tree_node_->opener() |
| 2485 ->render_manager() | 2489 ->render_manager() |
| 2486 ->GetRoutingIdForSiteInstance(instance); | 2490 ->GetRoutingIdForSiteInstance(instance); |
| 2487 } | 2491 } |
| 2488 | 2492 |
| 2489 } // namespace content | 2493 } // namespace content |
| OLD | NEW |