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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 if (!oopifs_possible) | 513 if (!oopifs_possible) |
514 frame_tree->root()->render_manager()->DidNavigateFrame( | 514 frame_tree->root()->render_manager()->DidNavigateFrame( |
515 render_frame_host, params.gesture == NavigationGestureUser); | 515 render_frame_host, params.gesture == NavigationGestureUser); |
516 } | 516 } |
517 | 517 |
518 // Save the origin of the new page. Do this before calling | 518 // Save the origin of the new page. Do this before calling |
519 // DidNavigateFrame(), because the origin needs to be included in the SwapOut | 519 // DidNavigateFrame(), because the origin needs to be included in the SwapOut |
520 // message, which is sent inside DidNavigateFrame(). SwapOut needs the | 520 // message, which is sent inside DidNavigateFrame(). SwapOut needs the |
521 // origin because it creates a RenderFrameProxy that needs this to initialize | 521 // origin because it creates a RenderFrameProxy that needs this to initialize |
522 // its security context. This origin will also be sent to RenderFrameProxies | 522 // its security context. This origin will also be sent to RenderFrameProxies |
523 // created via mojom::Renderer::CreateView and FrameMsg_NewFrameProxy. | 523 // created via mojom::Renderer::CreateView and |
| 524 // mojom::Renderer::CreateFrameProxy. |
524 render_frame_host->frame_tree_node()->SetCurrentOrigin( | 525 render_frame_host->frame_tree_node()->SetCurrentOrigin( |
525 params.origin, params.has_potentially_trustworthy_unique_origin); | 526 params.origin, params.has_potentially_trustworthy_unique_origin); |
526 | 527 |
527 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy( | 528 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy( |
528 params.insecure_request_policy); | 529 params.insecure_request_policy); |
529 | 530 |
530 // Navigating to a new location means a new, fresh set of http headers and/or | 531 // Navigating to a new location means a new, fresh set of http headers and/or |
531 // <meta> elements - we need to reset CSP policy to an empty set. | 532 // <meta> elements - we need to reset CSP policy to an empty set. |
532 if (!is_navigation_within_page) | 533 if (!is_navigation_within_page) |
533 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); | 534 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 if (navigation_handle) | 1202 if (navigation_handle) |
1202 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1203 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
1203 | 1204 |
1204 controller_->SetPendingEntry(std::move(entry)); | 1205 controller_->SetPendingEntry(std::move(entry)); |
1205 if (delegate_) | 1206 if (delegate_) |
1206 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1207 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
1207 } | 1208 } |
1208 } | 1209 } |
1209 | 1210 |
1210 } // namespace content | 1211 } // namespace content |
OLD | NEW |