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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 if (render_view_host->IsRenderViewLive()) | 1247 if (render_view_host->IsRenderViewLive()) |
1248 return true; | 1248 return true; |
1249 | 1249 |
1250 // If the pending navigation is to a WebUI and the RenderView is not in a | 1250 // If the pending navigation is to a WebUI and the RenderView is not in a |
1251 // guest process, tell the RenderViewHost about any bindings it will need | 1251 // guest process, tell the RenderViewHost about any bindings it will need |
1252 // enabled. | 1252 // enabled. |
1253 if (pending_web_ui() && !render_view_host->GetProcess()->IsIsolatedGuest()) { | 1253 if (pending_web_ui() && !render_view_host->GetProcess()->IsIsolatedGuest()) { |
1254 render_view_host->AllowBindings(pending_web_ui()->GetBindings()); | 1254 render_view_host->AllowBindings(pending_web_ui()->GetBindings()); |
1255 } else { | 1255 } else { |
1256 // Ensure that we don't create an unprivileged RenderView in a WebUI-enabled | 1256 // Ensure that we don't create an unprivileged RenderView in a WebUI-enabled |
1257 // process unless it's swapped out. | 1257 // process unless it's swapped out or we run in single-process mode. |
1258 if (render_view_host->is_active()) { | 1258 if (render_view_host->is_active() |
| 1259 && !RenderProcessHost::run_renderer_in_process()) { |
1259 CHECK(!ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 1260 CHECK(!ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
1260 render_view_host->GetProcess()->GetID())); | 1261 render_view_host->GetProcess()->GetID())); |
1261 } | 1262 } |
1262 } | 1263 } |
1263 | 1264 |
1264 return delegate_->CreateRenderViewForRenderManager(render_view_host, | 1265 return delegate_->CreateRenderViewForRenderManager(render_view_host, |
1265 opener_route_id, | 1266 opener_route_id, |
1266 proxy_routing_id, | 1267 proxy_routing_id, |
1267 for_main_frame_navigation); | 1268 for_main_frame_navigation); |
1268 } | 1269 } |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1740 void RenderFrameHostManager::DeleteRenderFrameProxyHost( | 1741 void RenderFrameHostManager::DeleteRenderFrameProxyHost( |
1741 SiteInstance* instance) { | 1742 SiteInstance* instance) { |
1742 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); | 1743 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); |
1743 if (iter != proxy_hosts_.end()) { | 1744 if (iter != proxy_hosts_.end()) { |
1744 delete iter->second; | 1745 delete iter->second; |
1745 proxy_hosts_.erase(iter); | 1746 proxy_hosts_.erase(iter); |
1746 } | 1747 } |
1747 } | 1748 } |
1748 | 1749 |
1749 } // namespace content | 1750 } // namespace content |
OLD | NEW |