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 2143 matching lines...) Loading... |
2154 // original site). In that case, we have a proxy for the current RFH but | 2154 // original site). In that case, we have a proxy for the current RFH but |
2155 // haven't deleted it yet. The new navigation will swap it back in, so we can | 2155 // haven't deleted it yet. The new navigation will swap it back in, so we can |
2156 // delete the proxy. | 2156 // delete the proxy. |
2157 DeleteRenderFrameProxyHost(new_instance.get()); | 2157 DeleteRenderFrameProxyHost(new_instance.get()); |
2158 | 2158 |
2159 UpdatePendingWebUIOnCurrentFrameHost(dest_url, bindings); | 2159 UpdatePendingWebUIOnCurrentFrameHost(dest_url, bindings); |
2160 | 2160 |
2161 // The renderer can exit view source mode when any error or cancellation | 2161 // The renderer can exit view source mode when any error or cancellation |
2162 // happen. We must overwrite to recover the mode. | 2162 // happen. We must overwrite to recover the mode. |
2163 if (dest_is_view_source_mode) { | 2163 if (dest_is_view_source_mode) { |
2164 render_frame_host_->render_view_host()->Send( | 2164 DCHECK(!render_frame_host_->GetParent()); |
2165 new ViewMsg_EnableViewSourceMode( | 2165 render_frame_host_->Send( |
2166 render_frame_host_->render_view_host()->GetRoutingID())); | 2166 new FrameMsg_EnableViewSourceMode(render_frame_host_->GetRoutingID())); |
2167 } | 2167 } |
2168 | 2168 |
2169 return render_frame_host_.get(); | 2169 return render_frame_host_.get(); |
2170 } | 2170 } |
2171 | 2171 |
2172 void RenderFrameHostManager::UpdatePendingWebUIOnCurrentFrameHost( | 2172 void RenderFrameHostManager::UpdatePendingWebUIOnCurrentFrameHost( |
2173 const GURL& dest_url, | 2173 const GURL& dest_url, |
2174 int entry_bindings) { | 2174 int entry_bindings) { |
2175 bool pending_webui_changed = | 2175 bool pending_webui_changed = |
2176 render_frame_host_->UpdatePendingWebUI(dest_url, entry_bindings); | 2176 render_frame_host_->UpdatePendingWebUI(dest_url, entry_bindings); |
(...skipping 277 matching lines...) Loading... |
2454 } else if (pending_render_frame_host_) { | 2454 } else if (pending_render_frame_host_) { |
2455 send_msg(pending_render_frame_host_.get(), | 2455 send_msg(pending_render_frame_host_.get(), |
2456 pending_render_frame_host_->GetRoutingID(), msg); | 2456 pending_render_frame_host_->GetRoutingID(), msg); |
2457 } | 2457 } |
2458 | 2458 |
2459 msg->set_routing_id(render_frame_host_->GetRoutingID()); | 2459 msg->set_routing_id(render_frame_host_->GetRoutingID()); |
2460 render_frame_host_->Send(msg); | 2460 render_frame_host_->Send(msg); |
2461 } | 2461 } |
2462 | 2462 |
2463 } // namespace content | 2463 } // namespace content |
OLD | NEW |