| 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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 frame_tree->root()->render_manager()->DidNavigateFrame( | 475 frame_tree->root()->render_manager()->DidNavigateFrame( |
| 476 render_frame_host, params.gesture == NavigationGestureUser); | 476 render_frame_host, params.gesture == NavigationGestureUser); |
| 477 } | 477 } |
| 478 | 478 |
| 479 // Save the origin of the new page. Do this before calling | 479 // Save the origin of the new page. Do this before calling |
| 480 // DidNavigateFrame(), because the origin needs to be included in the SwapOut | 480 // DidNavigateFrame(), because the origin needs to be included in the SwapOut |
| 481 // message, which is sent inside DidNavigateFrame(). SwapOut needs the | 481 // message, which is sent inside DidNavigateFrame(). SwapOut needs the |
| 482 // origin because it creates a RenderFrameProxy that needs this to initialize | 482 // origin because it creates a RenderFrameProxy that needs this to initialize |
| 483 // its security context. This origin will also be sent to RenderFrameProxies | 483 // its security context. This origin will also be sent to RenderFrameProxies |
| 484 // created via ViewMsg_New and FrameMsg_NewFrameProxy. | 484 // created via ViewMsg_New and FrameMsg_NewFrameProxy. |
| 485 render_frame_host->frame_tree_node()->SetCurrentOrigin(params.origin); | 485 render_frame_host->frame_tree_node()->SetCurrentOrigin( |
| 486 params.origin, params.has_potentially_trustworthy_unique_origin); |
| 486 | 487 |
| 487 render_frame_host->frame_tree_node()->SetEnforceStrictMixedContentChecking( | 488 render_frame_host->frame_tree_node()->SetEnforceStrictMixedContentChecking( |
| 488 params.should_enforce_strict_mixed_content_checking); | 489 params.should_enforce_strict_mixed_content_checking); |
| 489 | 490 |
| 490 // When using --site-per-process, we notify the RFHM for all navigations, | 491 // When using --site-per-process, we notify the RFHM for all navigations, |
| 491 // not just main frame navigations. | 492 // not just main frame navigations. |
| 492 if (oopifs_possible) { | 493 if (oopifs_possible) { |
| 493 FrameTreeNode* frame = render_frame_host->frame_tree_node(); | 494 FrameTreeNode* frame = render_frame_host->frame_tree_node(); |
| 494 frame->render_manager()->DidNavigateFrame( | 495 frame->render_manager()->DidNavigateFrame( |
| 495 render_frame_host, params.gesture == NavigationGestureUser); | 496 render_frame_host, params.gesture == NavigationGestureUser); |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 if (pending_entry != controller_->GetVisibleEntry() || | 1132 if (pending_entry != controller_->GetVisibleEntry() || |
| 1132 !should_preserve_entry) { | 1133 !should_preserve_entry) { |
| 1133 controller_->DiscardPendingEntry(true); | 1134 controller_->DiscardPendingEntry(true); |
| 1134 | 1135 |
| 1135 // Also force the UI to refresh. | 1136 // Also force the UI to refresh. |
| 1136 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); | 1137 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); |
| 1137 } | 1138 } |
| 1138 } | 1139 } |
| 1139 | 1140 |
| 1140 } // namespace content | 1141 } // namespace content |
| OLD | NEW |