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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 OpenURLParams params(dest_url, referrer, frame_tree_node_id, disposition, | 774 OpenURLParams params(dest_url, referrer, frame_tree_node_id, disposition, |
775 ui::PAGE_TRANSITION_LINK, | 775 ui::PAGE_TRANSITION_LINK, |
776 true /* is_renderer_initiated */); | 776 true /* is_renderer_initiated */); |
777 params.uses_post = uses_post; | 777 params.uses_post = uses_post; |
778 params.post_data = body; | 778 params.post_data = body; |
779 params.extra_headers = extra_headers; | 779 params.extra_headers = extra_headers; |
780 if (redirect_chain.size() > 0) | 780 if (redirect_chain.size() > 0) |
781 params.redirect_chain = redirect_chain; | 781 params.redirect_chain = redirect_chain; |
782 params.should_replace_current_entry = should_replace_current_entry; | 782 params.should_replace_current_entry = should_replace_current_entry; |
783 params.user_gesture = user_gesture; | 783 params.user_gesture = user_gesture; |
784 | |
785 // RequestOpenURL is used only for local frames, so we can get here only if | |
786 // the navigation is initiated by a frame in the same SiteInstance as this | |
787 // frame. Note that navigations on RenderFrameProxies do not use | |
788 // RequestOpenURL and go through RequestTransferURL instead. | |
789 params.source_site_instance = current_site_instance; | |
790 | |
791 params.source_render_frame_id = render_frame_host->GetRoutingID(); | 784 params.source_render_frame_id = render_frame_host->GetRoutingID(); |
792 params.source_render_process_id = render_frame_host->GetProcess()->GetID(); | 785 params.source_render_process_id = render_frame_host->GetProcess()->GetID(); |
793 | 786 |
794 if (render_frame_host->web_ui()) { | 787 if (render_frame_host->web_ui()) { |
795 // Note that we hide the referrer for Web UI pages. We don't really want | 788 // Note that we hide the referrer for Web UI pages. We don't really want |
796 // web sites to see a referrer of "chrome://blah" (and some chrome: URLs | 789 // web sites to see a referrer of "chrome://blah" (and some chrome: URLs |
797 // might have search terms or other stuff we don't want to send to the | 790 // might have search terms or other stuff we don't want to send to the |
798 // site), so we send no referrer. | 791 // site), so we send no referrer. |
799 params.referrer = Referrer(); | 792 params.referrer = Referrer(); |
800 | 793 |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 if (navigation_handle) | 1286 if (navigation_handle) |
1294 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1287 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
1295 | 1288 |
1296 controller_->SetPendingEntry(std::move(entry)); | 1289 controller_->SetPendingEntry(std::move(entry)); |
1297 if (delegate_) | 1290 if (delegate_) |
1298 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1291 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
1299 } | 1292 } |
1300 } | 1293 } |
1301 | 1294 |
1302 } // namespace content | 1295 } // namespace content |
OLD | NEW |