Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Side by Side Diff: content/browser/frame_host/navigator_impl.cc

Issue 2381493003: Move ViewMsg_New to mojom (Closed)
Patch Set: . Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 if (!oopifs_possible) 512 if (!oopifs_possible)
513 frame_tree->root()->render_manager()->DidNavigateFrame( 513 frame_tree->root()->render_manager()->DidNavigateFrame(
514 render_frame_host, params.gesture == NavigationGestureUser); 514 render_frame_host, params.gesture == NavigationGestureUser);
515 } 515 }
516 516
517 // Save the origin of the new page. Do this before calling 517 // Save the origin of the new page. Do this before calling
518 // DidNavigateFrame(), because the origin needs to be included in the SwapOut 518 // DidNavigateFrame(), because the origin needs to be included in the SwapOut
519 // message, which is sent inside DidNavigateFrame(). SwapOut needs the 519 // message, which is sent inside DidNavigateFrame(). SwapOut needs the
520 // origin because it creates a RenderFrameProxy that needs this to initialize 520 // origin because it creates a RenderFrameProxy that needs this to initialize
521 // its security context. This origin will also be sent to RenderFrameProxies 521 // its security context. This origin will also be sent to RenderFrameProxies
522 // created via ViewMsg_New and FrameMsg_NewFrameProxy. 522 // created via mojom::Renderer::CreateView and FrameMsg_NewFrameProxy.
523 render_frame_host->frame_tree_node()->SetCurrentOrigin( 523 render_frame_host->frame_tree_node()->SetCurrentOrigin(
524 params.origin, params.has_potentially_trustworthy_unique_origin); 524 params.origin, params.has_potentially_trustworthy_unique_origin);
525 525
526 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy( 526 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy(
527 params.insecure_request_policy); 527 params.insecure_request_policy);
528 528
529 // Navigating to a new location means a new, fresh set of http headers and/or 529 // Navigating to a new location means a new, fresh set of http headers and/or
530 // <meta> elements - we need to reset CSP policy to an empty set. 530 // <meta> elements - we need to reset CSP policy to an empty set.
531 if (!is_navigation_within_page) 531 if (!is_navigation_within_page)
532 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); 532 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy();
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 if (pending_entry != controller_->GetVisibleEntry() || 1204 if (pending_entry != controller_->GetVisibleEntry() ||
1205 !should_preserve_entry) { 1205 !should_preserve_entry) {
1206 controller_->DiscardPendingEntry(true); 1206 controller_->DiscardPendingEntry(true);
1207 1207
1208 // Also force the UI to refresh. 1208 // Also force the UI to refresh.
1209 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1209 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1210 } 1210 }
1211 } 1211 }
1212 1212
1213 } // namespace content 1213 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698