OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/render_view_host_manager.h" | 5 #include "content/browser/web_contents/render_view_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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
945 | 945 |
946 return pending_render_view_host_; | 946 return pending_render_view_host_; |
947 } else { | 947 } else { |
948 if (ShouldReuseWebUI(curr_entry, &entry)) { | 948 if (ShouldReuseWebUI(curr_entry, &entry)) { |
949 pending_web_ui_.reset(); | 949 pending_web_ui_.reset(); |
950 pending_and_current_web_ui_ = web_ui_->AsWeakPtr(); | 950 pending_and_current_web_ui_ = web_ui_->AsWeakPtr(); |
951 } else { | 951 } else { |
952 SetPendingWebUI(entry); | 952 SetPendingWebUI(entry); |
953 | 953 |
954 // Make sure the new RenderViewHost has the right bindings. | 954 // Make sure the new RenderViewHost has the right bindings. |
955 if (pending_web_ui()) | 955 if (pending_web_ui() && !render_view_host_->GetProcess()->IsGuest()) |
Charlie Reis
2013/09/24 19:41:55
Oops, looks like we missed this one in Hui's CL.
Fady Samuel
2013/09/24 23:05:02
Done.
| |
956 render_view_host_->AllowBindings(pending_web_ui()->GetBindings()); | 956 render_view_host_->AllowBindings(pending_web_ui()->GetBindings()); |
957 } | 957 } |
958 | 958 |
959 if (pending_web_ui() && render_view_host_->IsRenderViewLive()) | 959 if (pending_web_ui() && render_view_host_->IsRenderViewLive()) |
960 pending_web_ui()->GetController()->RenderViewReused(render_view_host_); | 960 pending_web_ui()->GetController()->RenderViewReused(render_view_host_); |
961 | 961 |
962 // The renderer can exit view source mode when any error or cancellation | 962 // The renderer can exit view source mode when any error or cancellation |
963 // happen. We must overwrite to recover the mode. | 963 // happen. We must overwrite to recover the mode. |
964 if (entry.IsViewSourceMode()) { | 964 if (entry.IsViewSourceMode()) { |
965 render_view_host_->Send( | 965 render_view_host_->Send( |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1045 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( | 1045 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( |
1046 SiteInstance* instance) { | 1046 SiteInstance* instance) { |
1047 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); | 1047 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); |
1048 if (iter != swapped_out_hosts_.end()) | 1048 if (iter != swapped_out_hosts_.end()) |
1049 return iter->second; | 1049 return iter->second; |
1050 | 1050 |
1051 return NULL; | 1051 return NULL; |
1052 } | 1052 } |
1053 | 1053 |
1054 } // namespace content | 1054 } // namespace content |
OLD | NEW |