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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 if (!oopifs_possible) | 509 if (!oopifs_possible) |
510 frame_tree->root()->render_manager()->DidNavigateFrame( | 510 frame_tree->root()->render_manager()->DidNavigateFrame( |
511 render_frame_host, params.gesture == NavigationGestureUser); | 511 render_frame_host, params.gesture == NavigationGestureUser); |
512 } | 512 } |
513 | 513 |
514 // Save the origin of the new page. Do this before calling | 514 // Save the origin of the new page. Do this before calling |
515 // DidNavigateFrame(), because the origin needs to be included in the SwapOut | 515 // DidNavigateFrame(), because the origin needs to be included in the SwapOut |
516 // message, which is sent inside DidNavigateFrame(). SwapOut needs the | 516 // message, which is sent inside DidNavigateFrame(). SwapOut needs the |
517 // origin because it creates a RenderFrameProxy that needs this to initialize | 517 // origin because it creates a RenderFrameProxy that needs this to initialize |
518 // its security context. This origin will also be sent to RenderFrameProxies | 518 // its security context. This origin will also be sent to RenderFrameProxies |
519 // created via ViewMsg_New and FrameMsg_NewFrameProxy. | 519 // created via mojom::Renderer::CreateView and FrameMsg_NewFrameProxy. |
520 render_frame_host->frame_tree_node()->SetCurrentOrigin( | 520 render_frame_host->frame_tree_node()->SetCurrentOrigin( |
521 params.origin, params.has_potentially_trustworthy_unique_origin); | 521 params.origin, params.has_potentially_trustworthy_unique_origin); |
522 | 522 |
523 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy( | 523 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy( |
524 params.insecure_request_policy); | 524 params.insecure_request_policy); |
525 | 525 |
526 // Navigating to a new location means a new, fresh set of http headers and/or | 526 // Navigating to a new location means a new, fresh set of http headers and/or |
527 // <meta> elements - we need to reset CSP policy to an empty set. | 527 // <meta> elements - we need to reset CSP policy to an empty set. |
528 if (!is_navigation_within_page) | 528 if (!is_navigation_within_page) |
529 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); | 529 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 if (pending_entry != controller_->GetVisibleEntry() || | 1200 if (pending_entry != controller_->GetVisibleEntry() || |
1201 !should_preserve_entry) { | 1201 !should_preserve_entry) { |
1202 controller_->DiscardPendingEntry(true); | 1202 controller_->DiscardPendingEntry(true); |
1203 | 1203 |
1204 // Also force the UI to refresh. | 1204 // Also force the UI to refresh. |
1205 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); | 1205 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); |
1206 } | 1206 } |
1207 } | 1207 } |
1208 | 1208 |
1209 } // namespace content | 1209 } // namespace content |
OLD | NEW |