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

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

Issue 2383853003: Move FrameMsg_NewFrame/NewFrameProxy 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
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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 if (pending_entry != controller_->GetVisibleEntry() || 1203 if (pending_entry != controller_->GetVisibleEntry() ||
1203 !should_preserve_entry) { 1204 !should_preserve_entry) {
1204 controller_->DiscardPendingEntry(true); 1205 controller_->DiscardPendingEntry(true);
1205 1206
1206 // Also force the UI to refresh. 1207 // Also force the UI to refresh.
1207 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1208 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1208 } 1209 }
1209 } 1210 }
1210 1211
1211 } // namespace content 1212 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698