| 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_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 | 1060 |
| 1061 void RenderFrameHostImpl::OnFrameFocused() { | 1061 void RenderFrameHostImpl::OnFrameFocused() { |
| 1062 delegate_->SetFocusedFrame(frame_tree_node_, GetSiteInstance()); | 1062 delegate_->SetFocusedFrame(frame_tree_node_, GetSiteInstance()); |
| 1063 } | 1063 } |
| 1064 | 1064 |
| 1065 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { | 1065 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { |
| 1066 GURL validated_url(params.url); | 1066 GURL validated_url(params.url); |
| 1067 GetProcess()->FilterURL(false, &validated_url); | 1067 GetProcess()->FilterURL(false, &validated_url); |
| 1068 | 1068 |
| 1069 if (params.is_history_navigation_in_new_child) { | 1069 if (params.is_history_navigation_in_new_child) { |
| 1070 DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries()); | |
| 1071 | |
| 1072 // Try to find a FrameNavigationEntry that matches this frame instead, based | 1070 // Try to find a FrameNavigationEntry that matches this frame instead, based |
| 1073 // on the frame's unique name. If this can't be found, fall back to the | 1071 // on the frame's unique name. If this can't be found, fall back to the |
| 1074 // default params using RequestOpenURL below. | 1072 // default params using RequestOpenURL below. |
| 1075 if (frame_tree_node_->navigator()->NavigateNewChildFrame(this, | 1073 if (frame_tree_node_->navigator()->NavigateNewChildFrame(this, |
| 1076 validated_url)) | 1074 validated_url)) |
| 1077 return; | 1075 return; |
| 1078 } | 1076 } |
| 1079 | 1077 |
| 1080 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", | 1078 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", |
| 1081 validated_url.possibly_invalid_spec()); | 1079 validated_url.possibly_invalid_spec()); |
| (...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3395 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3393 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3396 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3394 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3397 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3395 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3398 return NavigationHandleImpl::Create( | 3396 return NavigationHandleImpl::Create( |
| 3399 params.url, frame_tree_node_, is_renderer_initiated, | 3397 params.url, frame_tree_node_, is_renderer_initiated, |
| 3400 params.was_within_same_page, base::TimeTicks::Now(), | 3398 params.was_within_same_page, base::TimeTicks::Now(), |
| 3401 entry_id_for_data_nav, false); // started_from_context_menu | 3399 entry_id_for_data_nav, false); // started_from_context_menu |
| 3402 } | 3400 } |
| 3403 | 3401 |
| 3404 } // namespace content | 3402 } // namespace content |
| OLD | NEW |