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/navigator_impl.h" | 5 #include "content/browser/frame_host/navigator_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/browser/frame_host/frame_tree.h" | 8 #include "content/browser/frame_host/frame_tree.h" |
9 #include "content/browser/frame_host/frame_tree_node.h" | 9 #include "content/browser/frame_host/frame_tree_node.h" |
10 #include "content/browser/frame_host/navigation_controller_impl.h" | 10 #include "content/browser/frame_host/navigation_controller_impl.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 DCHECK(PageTransitionIsMainFrame(params.transition)); | 392 DCHECK(PageTransitionIsMainFrame(params.transition)); |
393 frame_tree->OnFirstNavigationAfterSwap(params.frame_id); | 393 frame_tree->OnFirstNavigationAfterSwap(params.frame_id); |
394 } | 394 } |
395 | 395 |
396 // When using --site-per-process, look up the FrameTreeNode ID that the | 396 // When using --site-per-process, look up the FrameTreeNode ID that the |
397 // renderer-specific frame ID corresponds to. | 397 // renderer-specific frame ID corresponds to. |
398 int64 frame_tree_node_id = frame_tree->root()->frame_tree_node_id(); | 398 int64 frame_tree_node_id = frame_tree->root()->frame_tree_node_id(); |
399 if (use_site_per_process) { | 399 if (use_site_per_process) { |
400 frame_tree_node_id = | 400 frame_tree_node_id = |
401 render_frame_host->frame_tree_node()->frame_tree_node_id(); | 401 render_frame_host->frame_tree_node()->frame_tree_node_id(); |
402 DCHECK_EQ(params.frame_id, | |
403 render_frame_host->frame_tree_node()->frame_id()); | |
404 | 402 |
405 // TODO(creis): In the short term, cross-process subframe navigations are | 403 // TODO(creis): In the short term, cross-process subframe navigations are |
406 // happening in the pending RenderViewHost's top-level frame. (We need to | 404 // happening in the pending RenderViewHost's top-level frame. (We need to |
407 // both mirror the frame tree and get the navigation to occur in the correct | 405 // both mirror the frame tree and get the navigation to occur in the correct |
408 // subframe to fix this.) Until then, we should check whether we have a | 406 // subframe to fix this.) Until then, we should check whether we have a |
409 // pending NavigationEntry with a frame ID and if so, treat the | 407 // pending NavigationEntry with a frame ID and if so, treat the |
410 // cross-process "main frame" navigation as a subframe navigation. This | 408 // cross-process "main frame" navigation as a subframe navigation. This |
411 // limits us to a single cross-process subframe per RVH, and it affects | 409 // limits us to a single cross-process subframe per RVH, and it affects |
412 // NavigateToEntry, NavigatorImpl::DidStartProvisionalLoad, and | 410 // NavigateToEntry, NavigatorImpl::DidStartProvisionalLoad, and |
413 // OnDidFinishLoad. | 411 // OnDidFinishLoad. |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 // still be used for a normal web site. | 527 // still be used for a normal web site. |
530 if (url == GURL(kAboutBlankURL)) | 528 if (url == GURL(kAboutBlankURL)) |
531 return false; | 529 return false; |
532 | 530 |
533 // The embedder will then have the opportunity to determine if the URL | 531 // The embedder will then have the opportunity to determine if the URL |
534 // should "use up" the SiteInstance. | 532 // should "use up" the SiteInstance. |
535 return GetContentClient()->browser()->ShouldAssignSiteForURL(url); | 533 return GetContentClient()->browser()->ShouldAssignSiteForURL(url); |
536 } | 534 } |
537 | 535 |
538 } // namespace content | 536 } // namespace content |
OLD | NEW |