Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: content/browser/frame_host/navigator_impl.cc

Issue 988953003: OOPIF: Fix cross-process navigations in new windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 GURL dest_url(url); 613 GURL dest_url(url);
614 SiteInstance* current_site_instance = 614 SiteInstance* current_site_instance =
615 GetRenderManager(render_frame_host)->current_frame_host()-> 615 GetRenderManager(render_frame_host)->current_frame_host()->
616 GetSiteInstance(); 616 GetSiteInstance();
617 if (!GetContentClient()->browser()->ShouldAllowOpenURL( 617 if (!GetContentClient()->browser()->ShouldAllowOpenURL(
618 current_site_instance, url)) { 618 current_site_instance, url)) {
619 dest_url = GURL(url::kAboutBlankURL); 619 dest_url = GURL(url::kAboutBlankURL);
620 } 620 }
621 621
622 int64 frame_tree_node_id = -1; 622 int64 frame_tree_node_id = -1;
623 // Send the navigation to the current FrameTreeNode if it's destined for a
nasko 2015/03/07 00:55:15 nit: I find it more readable if there is an empty
Charlie Reis 2015/03/07 03:23:28 Done.
624 // subframe in the current tab. We'll assume it's for the main frame
625 // (possibly of a new or different WebContents) otherwise.
623 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 626 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
624 switches::kSitePerProcess)) { 627 switches::kSitePerProcess) &&
628 disposition == CURRENT_TAB &&
629 render_frame_host->GetParent()) {
625 frame_tree_node_id = 630 frame_tree_node_id =
626 render_frame_host->frame_tree_node()->frame_tree_node_id(); 631 render_frame_host->frame_tree_node()->frame_tree_node_id();
627 } 632 }
628 OpenURLParams params( 633 OpenURLParams params(
629 dest_url, referrer, frame_tree_node_id, disposition, page_transition, 634 dest_url, referrer, frame_tree_node_id, disposition, page_transition,
630 true /* is_renderer_initiated */); 635 true /* is_renderer_initiated */);
631 params.source_site_instance = source_site_instance; 636 params.source_site_instance = source_site_instance;
632 if (redirect_chain.size() > 0) 637 if (redirect_chain.size() > 0)
633 params.redirect_chain = redirect_chain; 638 params.redirect_chain = redirect_chain;
634 params.transferred_global_request_id = transferred_global_request_id; 639 params.transferred_global_request_id = transferred_global_request_id;
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", 926 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted",
922 time_to_commit); 927 time_to_commit);
923 UMA_HISTOGRAM_TIMES( 928 UMA_HISTOGRAM_TIMES(
924 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", 929 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted",
925 time_to_network); 930 time_to_network);
926 } 931 }
927 navigation_data_.reset(); 932 navigation_data_.reset();
928 } 933 }
929 934
930 } // namespace content 935 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698