| 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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { | 1082 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { |
| 1083 GURL validated_url(params.url); | 1083 GURL validated_url(params.url); |
| 1084 GetProcess()->FilterURL(false, &validated_url); | 1084 GetProcess()->FilterURL(false, &validated_url); |
| 1085 | 1085 |
| 1086 if (params.is_history_navigation_in_new_child) { | 1086 if (params.is_history_navigation_in_new_child) { |
| 1087 // Try to find a FrameNavigationEntry that matches this frame instead, based | 1087 // Try to find a FrameNavigationEntry that matches this frame instead, based |
| 1088 // on the frame's unique name. If this can't be found, fall back to the | 1088 // on the frame's unique name. If this can't be found, fall back to the |
| 1089 // default params using RequestOpenURL below. | 1089 // default params using RequestOpenURL below. |
| 1090 if (frame_tree_node_->navigator()->NavigateNewChildFrame(this, | 1090 if (frame_tree_node_->navigator()->NavigateNewChildFrame( |
| 1091 validated_url)) | 1091 this, |
| 1092 true /* is_renderer_initiated */, |
| 1093 params.user_gesture, |
| 1094 validated_url)) { |
| 1092 return; | 1095 return; |
| 1096 } |
| 1093 } | 1097 } |
| 1094 | 1098 |
| 1095 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", | 1099 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", |
| 1096 validated_url.possibly_invalid_spec()); | 1100 validated_url.possibly_invalid_spec()); |
| 1097 | 1101 |
| 1098 frame_tree_node_->navigator()->RequestOpenURL( | 1102 frame_tree_node_->navigator()->RequestOpenURL( |
| 1099 this, validated_url, params.uses_post, params.resource_request_body, | 1103 this, validated_url, params.uses_post, params.resource_request_body, |
| 1100 params.extra_headers, params.referrer, params.disposition, | 1104 params.extra_headers, params.referrer, params.disposition, |
| 1101 params.should_replace_current_entry, params.user_gesture); | 1105 params.should_replace_current_entry, params.user_gesture); |
| 1102 } | 1106 } |
| (...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3496 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3500 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3497 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3501 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3498 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3502 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3499 return NavigationHandleImpl::Create( | 3503 return NavigationHandleImpl::Create( |
| 3500 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3504 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
| 3501 params.was_within_same_page, base::TimeTicks::Now(), | 3505 params.was_within_same_page, base::TimeTicks::Now(), |
| 3502 entry_id_for_data_nav, false); // started_from_context_menu | 3506 entry_id_for_data_nav, false); // started_from_context_menu |
| 3503 } | 3507 } |
| 3504 | 3508 |
| 3505 } // namespace content | 3509 } // namespace content |
| OLD | NEW |