Chromium Code Reviews| 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/test/test_render_frame_host.h" | 5 #include "content/test/test_render_frame_host.h" |
| 6 | 6 |
| 7 #include "base/guid.h" | 7 #include "base/guid.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/navigation_handle_impl.h" | 9 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 10 #include "content/browser/frame_host/navigation_request.h" | 10 #include "content/browser/frame_host/navigation_request.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 if (frame_tree_node()->navigation_request()) | 125 if (frame_tree_node()->navigation_request()) |
| 126 PrepareForCommit(); | 126 PrepareForCommit(); |
| 127 | 127 |
| 128 bool is_auto_subframe = | 128 bool is_auto_subframe = |
| 129 GetParent() && !frame_tree_node()->has_committed_real_load(); | 129 GetParent() && !frame_tree_node()->has_committed_real_load(); |
| 130 | 130 |
| 131 FrameHostMsg_DidCommitProvisionalLoad_Params params; | 131 FrameHostMsg_DidCommitProvisionalLoad_Params params; |
| 132 params.page_id = ComputeNextPageID(); | 132 params.page_id = ComputeNextPageID(); |
| 133 params.nav_entry_id = 0; | 133 params.nav_entry_id = 0; |
| 134 params.url = url; | 134 params.url = url; |
| 135 params.origin = url::Origin(url); | |
|
Charlie Reis
2016/06/20 21:34:21
Ah, interesting. Yeah, seems like an oversight to
| |
| 135 if (!GetParent()) | 136 if (!GetParent()) |
| 136 params.transition = ui::PAGE_TRANSITION_LINK; | 137 params.transition = ui::PAGE_TRANSITION_LINK; |
| 137 else if (is_auto_subframe) | 138 else if (is_auto_subframe) |
| 138 params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME; | 139 params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME; |
| 139 else | 140 else |
| 140 params.transition = ui::PAGE_TRANSITION_MANUAL_SUBFRAME; | 141 params.transition = ui::PAGE_TRANSITION_MANUAL_SUBFRAME; |
| 141 params.should_update_history = true; | 142 params.should_update_history = true; |
| 142 params.did_create_new_entry = !is_auto_subframe; | 143 params.did_create_new_entry = !is_auto_subframe; |
| 143 params.gesture = NavigationGestureUser; | 144 params.gesture = NavigationGestureUser; |
| 144 params.contents_mime_type = contents_mime_type_; | 145 params.contents_mime_type = contents_mime_type_; |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 432 // cleared during DidFailProvisionalLoad). | 433 // cleared during DidFailProvisionalLoad). |
| 433 int page_id = entry ? entry->GetPageID() : -1; | 434 int page_id = entry ? entry->GetPageID() : -1; |
| 434 if (page_id == -1) { | 435 if (page_id == -1) { |
| 435 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); | 436 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); |
| 436 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; | 437 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; |
| 437 } | 438 } |
| 438 return page_id; | 439 return page_id; |
| 439 } | 440 } |
| 440 | 441 |
| 441 } // namespace content | 442 } // namespace content |
| OLD | NEW |