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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // potential privilege escalation. | 228 // potential privilege escalation. |
229 if (new_web_ui && bindings != NavigationEntryImpl::kInvalidBindings && | 229 if (new_web_ui && bindings != NavigationEntryImpl::kInvalidBindings && |
230 new_web_ui->GetBindings() != bindings) { | 230 new_web_ui->GetBindings() != bindings) { |
231 RecordAction(base::UserMetricsAction("ProcessSwapBindingsMismatch_RVHM")); | 231 RecordAction(base::UserMetricsAction("ProcessSwapBindingsMismatch_RVHM")); |
232 return nullptr; | 232 return nullptr; |
233 } | 233 } |
234 return new_web_ui.Pass(); | 234 return new_web_ui.Pass(); |
235 } | 235 } |
236 | 236 |
237 RenderFrameHostImpl* RenderFrameHostManager::Navigate( | 237 RenderFrameHostImpl* RenderFrameHostManager::Navigate( |
| 238 const GURL& dest_url, |
238 const FrameNavigationEntry& frame_entry, | 239 const FrameNavigationEntry& frame_entry, |
239 const NavigationEntryImpl& entry) { | 240 const NavigationEntryImpl& entry) { |
240 TRACE_EVENT1("navigation", "RenderFrameHostManager:Navigate", | 241 TRACE_EVENT1("navigation", "RenderFrameHostManager:Navigate", |
241 "FrameTreeNode id", frame_tree_node_->frame_tree_node_id()); | 242 "FrameTreeNode id", frame_tree_node_->frame_tree_node_id()); |
242 // Create a pending RenderFrameHost to use for the navigation. | 243 // Create a pending RenderFrameHost to use for the navigation. |
243 RenderFrameHostImpl* dest_render_frame_host = UpdateStateForNavigate( | 244 RenderFrameHostImpl* dest_render_frame_host = UpdateStateForNavigate( |
244 frame_entry.url(), | 245 dest_url, |
245 // TODO(creis): Move source_site_instance to FNE. | 246 // TODO(creis): Move source_site_instance to FNE. |
246 entry.source_site_instance(), frame_entry.site_instance(), | 247 entry.source_site_instance(), frame_entry.site_instance(), |
247 entry.GetTransitionType(), | 248 entry.GetTransitionType(), |
248 entry.restore_type() != NavigationEntryImpl::RESTORE_NONE, | 249 entry.restore_type() != NavigationEntryImpl::RESTORE_NONE, |
249 entry.IsViewSourceMode(), entry.transferred_global_request_id(), | 250 entry.IsViewSourceMode(), entry.transferred_global_request_id(), |
250 entry.bindings()); | 251 entry.bindings()); |
251 if (!dest_render_frame_host) | 252 if (!dest_render_frame_host) |
252 return NULL; // We weren't able to create a pending render frame host. | 253 return NULL; // We weren't able to create a pending render frame host. |
253 | 254 |
254 // If the current render_frame_host_ isn't live, we should create it so | 255 // If the current render_frame_host_ isn't live, we should create it so |
(...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2337 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { | 2338 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { |
2338 if (!frame_tree_node_->opener()) | 2339 if (!frame_tree_node_->opener()) |
2339 return MSG_ROUTING_NONE; | 2340 return MSG_ROUTING_NONE; |
2340 | 2341 |
2341 return frame_tree_node_->opener() | 2342 return frame_tree_node_->opener() |
2342 ->render_manager() | 2343 ->render_manager() |
2343 ->GetRoutingIdForSiteInstance(instance); | 2344 ->GetRoutingIdForSiteInstance(instance); |
2344 } | 2345 } |
2345 | 2346 |
2346 } // namespace content | 2347 } // namespace content |
OLD | NEW |