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/logging.h" | 10 #include "base/logging.h" |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
13 #include "content/browser/child_process_security_policy_impl.h" | 13 #include "content/browser/child_process_security_policy_impl.h" |
14 #include "content/browser/devtools/render_view_devtools_agent_host.h" | 14 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
15 #include "content/browser/frame_host/cross_site_transferring_request.h" | 15 #include "content/browser/frame_host/cross_site_transferring_request.h" |
16 #include "content/browser/frame_host/debug_urls.h" | 16 #include "content/browser/frame_host/debug_urls.h" |
17 #include "content/browser/frame_host/interstitial_page_impl.h" | 17 #include "content/browser/frame_host/interstitial_page_impl.h" |
18 #include "content/browser/frame_host/navigation_controller_impl.h" | 18 #include "content/browser/frame_host/navigation_controller_impl.h" |
19 #include "content/browser/frame_host/navigation_entry_impl.h" | 19 #include "content/browser/frame_host/navigation_entry_impl.h" |
20 #include "content/browser/frame_host/navigation_request.h" | 20 #include "content/browser/frame_host/navigation_request.h" |
21 #include "content/browser/frame_host/navigator.h" | 21 #include "content/browser/frame_host/navigator.h" |
22 #include "content/browser/frame_host/render_frame_host_factory.h" | 22 #include "content/browser/frame_host/render_frame_host_factory.h" |
23 #include "content/browser/frame_host/render_frame_host_impl.h" | 23 #include "content/browser/frame_host/render_frame_host_impl.h" |
24 #include "content/browser/frame_host/render_frame_proxy_host.h" | 24 #include "content/browser/frame_host/render_frame_proxy_host.h" |
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1790 TRACE_EVENT1("navigation", "RenderFrameHostManager::CancelPending", | 1790 TRACE_EVENT1("navigation", "RenderFrameHostManager::CancelPending", |
1791 "FrameTreeNode id", frame_tree_node_->frame_tree_node_id()); | 1791 "FrameTreeNode id", frame_tree_node_->frame_tree_node_id()); |
1792 DiscardUnusedFrame(UnsetPendingRenderFrameHost()); | 1792 DiscardUnusedFrame(UnsetPendingRenderFrameHost()); |
1793 } | 1793 } |
1794 | 1794 |
1795 scoped_ptr<RenderFrameHostImpl> | 1795 scoped_ptr<RenderFrameHostImpl> |
1796 RenderFrameHostManager::UnsetPendingRenderFrameHost() { | 1796 RenderFrameHostManager::UnsetPendingRenderFrameHost() { |
1797 scoped_ptr<RenderFrameHostImpl> pending_render_frame_host = | 1797 scoped_ptr<RenderFrameHostImpl> pending_render_frame_host = |
1798 pending_render_frame_host_.Pass(); | 1798 pending_render_frame_host_.Pass(); |
1799 | 1799 |
1800 RenderViewDevToolsAgentHost::OnCancelPendingNavigation( | 1800 RenderFrameDevToolsAgentHost::OnCancelPendingNavigation( |
1801 pending_render_frame_host.get(), | 1801 pending_render_frame_host.get(), |
1802 render_frame_host_.get()); | 1802 render_frame_host_.get()); |
1803 | 1803 |
1804 // We no longer need to prevent the process from exiting. | 1804 // We no longer need to prevent the process from exiting. |
1805 pending_render_frame_host->GetProcess()->RemovePendingView(); | 1805 pending_render_frame_host->GetProcess()->RemovePendingView(); |
1806 | 1806 |
1807 pending_web_ui_.reset(); | 1807 pending_web_ui_.reset(); |
1808 pending_and_current_web_ui_.reset(); | 1808 pending_and_current_web_ui_.reset(); |
1809 | 1809 |
1810 return pending_render_frame_host.Pass(); | 1810 return pending_render_frame_host.Pass(); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 void RenderFrameHostManager::DeleteRenderFrameProxyHost( | 1882 void RenderFrameHostManager::DeleteRenderFrameProxyHost( |
1883 SiteInstance* instance) { | 1883 SiteInstance* instance) { |
1884 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); | 1884 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); |
1885 if (iter != proxy_hosts_.end()) { | 1885 if (iter != proxy_hosts_.end()) { |
1886 delete iter->second; | 1886 delete iter->second; |
1887 proxy_hosts_.erase(iter); | 1887 proxy_hosts_.erase(iter); |
1888 } | 1888 } |
1889 } | 1889 } |
1890 | 1890 |
1891 } // namespace content | 1891 } // namespace content |
OLD | NEW |