| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 return GetContentClient()->browser()->ShouldAssignSiteForURL(url); | 640 return GetContentClient()->browser()->ShouldAssignSiteForURL(url); |
| 641 } | 641 } |
| 642 | 642 |
| 643 void NavigatorImpl::RequestOpenURL(RenderFrameHostImpl* render_frame_host, | 643 void NavigatorImpl::RequestOpenURL(RenderFrameHostImpl* render_frame_host, |
| 644 const GURL& url, | 644 const GURL& url, |
| 645 SiteInstance* source_site_instance, | 645 SiteInstance* source_site_instance, |
| 646 const Referrer& referrer, | 646 const Referrer& referrer, |
| 647 WindowOpenDisposition disposition, | 647 WindowOpenDisposition disposition, |
| 648 bool should_replace_current_entry, | 648 bool should_replace_current_entry, |
| 649 bool user_gesture) { | 649 bool user_gesture) { |
| 650 // This call only makes sense for subframes if OOPIFs are possible. | 650 // Note: This can be called for subframes (even when OOPIFs are not possible) |
| 651 DCHECK(!render_frame_host->GetParent() || | 651 // if the disposition calls for a different window. |
| 652 SiteIsolationPolicy::AreCrossProcessFramesPossible()); | |
| 653 | 652 |
| 654 // Only the current RenderFrameHost should be sending an OpenURL request. | 653 // Only the current RenderFrameHost should be sending an OpenURL request. |
| 655 // Pending RenderFrameHost should know where it is navigating and pending | 654 // Pending RenderFrameHost should know where it is navigating and pending |
| 656 // deletion RenderFrameHost shouldn't be trying to navigate. | 655 // deletion RenderFrameHost shouldn't be trying to navigate. |
| 657 if (render_frame_host != | 656 if (render_frame_host != |
| 658 render_frame_host->frame_tree_node()->current_frame_host()) { | 657 render_frame_host->frame_tree_node()->current_frame_host()) { |
| 659 return; | 658 return; |
| 660 } | 659 } |
| 661 | 660 |
| 662 SiteInstance* current_site_instance = render_frame_host->GetSiteInstance(); | 661 SiteInstance* current_site_instance = render_frame_host->GetSiteInstance(); |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1106 if (pending_entry != controller_->GetVisibleEntry() || | 1105 if (pending_entry != controller_->GetVisibleEntry() || |
| 1107 !should_preserve_entry) { | 1106 !should_preserve_entry) { |
| 1108 controller_->DiscardPendingEntry(true); | 1107 controller_->DiscardPendingEntry(true); |
| 1109 | 1108 |
| 1110 // Also force the UI to refresh. | 1109 // Also force the UI to refresh. |
| 1111 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); | 1110 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); |
| 1112 } | 1111 } |
| 1113 } | 1112 } |
| 1114 | 1113 |
| 1115 } // namespace content | 1114 } // namespace content |
| OLD | NEW |