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" |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 switches::kSitePerProcess))) { | 766 switches::kSitePerProcess))) { |
767 // Reuse the current RFH if its SiteInstance matches the the navigation's | 767 // Reuse the current RFH if its SiteInstance matches the the navigation's |
768 // or if this is a subframe navigation. We only swap RFHs for subframes when | 768 // or if this is a subframe navigation. We only swap RFHs for subframes when |
769 // --site-per-process is enabled. | 769 // --site-per-process is enabled. |
770 CleanUpNavigation(); | 770 CleanUpNavigation(); |
771 navigation_rfh = render_frame_host_.get(); | 771 navigation_rfh = render_frame_host_.get(); |
772 | 772 |
773 // As SiteInstances are the same, check if the WebUI should be reused. | 773 // As SiteInstances are the same, check if the WebUI should be reused. |
774 const NavigationEntry* current_navigation_entry = | 774 const NavigationEntry* current_navigation_entry = |
775 delegate_->GetLastCommittedNavigationEntryForRenderManager(); | 775 delegate_->GetLastCommittedNavigationEntryForRenderManager(); |
776 bool should_reuse_web_ui_ = ShouldReuseWebUI(current_navigation_entry, | 776 should_reuse_web_ui_ = ShouldReuseWebUI(current_navigation_entry, |
777 request.common_params().url); | 777 request.common_params().url); |
778 if (!should_reuse_web_ui_) { | 778 if (!should_reuse_web_ui_) { |
779 speculative_web_ui_ = CreateWebUI(request.common_params().url, | 779 speculative_web_ui_ = CreateWebUI(request.common_params().url, |
780 request.bindings()); | 780 request.bindings()); |
781 // Make sure the current RenderViewHost has the right bindings. | 781 // Make sure the current RenderViewHost has the right bindings. |
782 if (speculative_web_ui() && | 782 if (speculative_web_ui() && |
783 !render_frame_host_->GetProcess()->IsIsolatedGuest()) { | 783 !render_frame_host_->GetProcess()->IsIsolatedGuest()) { |
784 render_frame_host_->render_view_host()->AllowBindings( | 784 render_frame_host_->render_view_host()->AllowBindings( |
785 speculative_web_ui()->GetBindings()); | 785 speculative_web_ui()->GetBindings()); |
786 } | 786 } |
787 } | 787 } |
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2019 void RenderFrameHostManager::DeleteRenderFrameProxyHost( | 2019 void RenderFrameHostManager::DeleteRenderFrameProxyHost( |
2020 SiteInstance* instance) { | 2020 SiteInstance* instance) { |
2021 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); | 2021 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); |
2022 if (iter != proxy_hosts_.end()) { | 2022 if (iter != proxy_hosts_.end()) { |
2023 delete iter->second; | 2023 delete iter->second; |
2024 proxy_hosts_.erase(iter); | 2024 proxy_hosts_.erase(iter); |
2025 } | 2025 } |
2026 } | 2026 } |
2027 | 2027 |
2028 } // namespace content | 2028 } // namespace content |
OLD | NEW |