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

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

Issue 556703004: Remove page id from FrameNavigateParams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaner Created 6 years, 3 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/browser/frame_host/frame_tree.h" 9 #include "content/browser/frame_host/frame_tree.h"
10 #include "content/browser/frame_host/frame_tree_node.h" 10 #include "content/browser/frame_host/frame_tree_node.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 *NavigationEntryImpl::FromNavigationEntry(controller_->GetPendingEntry()), 428 *NavigationEntryImpl::FromNavigationEntry(controller_->GetPendingEntry()),
429 reload_type); 429 reload_type);
430 } 430 }
431 431
432 base::TimeTicks NavigatorImpl::GetCurrentLoadStart() { 432 base::TimeTicks NavigatorImpl::GetCurrentLoadStart() {
433 return current_load_start_; 433 return current_load_start_;
434 } 434 }
435 435
436 void NavigatorImpl::DidNavigate( 436 void NavigatorImpl::DidNavigate(
437 RenderFrameHostImpl* render_frame_host, 437 RenderFrameHostImpl* render_frame_host,
438 int32 page_id,
438 const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params) { 439 const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params) {
439 FrameHostMsg_DidCommitProvisionalLoad_Params params(input_params); 440 FrameHostMsg_DidCommitProvisionalLoad_Params params(input_params);
440 FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree(); 441 FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree();
441 bool use_site_per_process = base::CommandLine::ForCurrentProcess()->HasSwitch( 442 bool use_site_per_process = base::CommandLine::ForCurrentProcess()->HasSwitch(
442 switches::kSitePerProcess); 443 switches::kSitePerProcess);
443 444
444 if (use_site_per_process) { 445 if (use_site_per_process) {
445 // TODO(creis): Until we mirror the frame tree in the subframe's process, 446 // TODO(creis): Until we mirror the frame tree in the subframe's process,
446 // cross-process subframe navigations happen in a renderer's main frame. 447 // cross-process subframe navigations happen in a renderer's main frame.
447 // Correct the transition type here if we know it is for a subframe. 448 // Correct the transition type here if we know it is for a subframe.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 // (see http://code.google.com/p/chromium/issues/detail?id=2929 ) 510 // (see http://code.google.com/p/chromium/issues/detail?id=2929 )
510 // TODO(jungshik): Add a test for the encoding menu to avoid 511 // TODO(jungshik): Add a test for the encoding menu to avoid
511 // regressing it again. 512 // regressing it again.
512 // TODO(nasko): Verify the correctness of the above comment, since some of the 513 // TODO(nasko): Verify the correctness of the above comment, since some of the
513 // code doesn't exist anymore. Also, move this code in the 514 // code doesn't exist anymore. Also, move this code in the
514 // PageTransitionIsMainFrame code block above. 515 // PageTransitionIsMainFrame code block above.
515 if (PageTransitionIsMainFrame(params.transition) && delegate_) 516 if (PageTransitionIsMainFrame(params.transition) && delegate_)
516 delegate_->SetMainFrameMimeType(params.contents_mime_type); 517 delegate_->SetMainFrameMimeType(params.contents_mime_type);
517 518
518 LoadCommittedDetails details; 519 LoadCommittedDetails details;
519 bool did_navigate = controller_->RendererDidNavigate(render_frame_host, 520 bool did_navigate = controller_->RendererDidNavigate(
520 params, &details); 521 render_frame_host, page_id, params, &details);
521 522
522 // For now, keep track of each frame's URL in its FrameTreeNode. This lets 523 // For now, keep track of each frame's URL in its FrameTreeNode. This lets
523 // us estimate our process count for implementing OOP iframes. 524 // us estimate our process count for implementing OOP iframes.
524 // TODO(creis): Remove this when we track which pages commit in each frame. 525 // TODO(creis): Remove this when we track which pages commit in each frame.
525 render_frame_host->frame_tree_node()->set_current_url(params.url); 526 render_frame_host->frame_tree_node()->set_current_url(params.url);
526 527
527 // Send notification about committed provisional loads. This notification is 528 // Send notification about committed provisional loads. This notification is
528 // different from the NAV_ENTRY_COMMITTED notification which doesn't include 529 // different from the NAV_ENTRY_COMMITTED notification which doesn't include
529 // the actual URL navigated to and isn't sent for AUTO_SUBFRAME navigations. 530 // the actual URL navigated to and isn't sent for AUTO_SUBFRAME navigations.
530 if (details.type != NAVIGATION_TYPE_NAV_IGNORE && delegate_) { 531 if (details.type != NAVIGATION_TYPE_NAV_IGNORE && delegate_) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 controller_->GetBrowserContext(), url); 682 controller_->GetBrowserContext(), url);
682 if ((enabled_bindings & BINDINGS_POLICY_WEB_UI) && 683 if ((enabled_bindings & BINDINGS_POLICY_WEB_UI) &&
683 !is_allowed_in_web_ui_renderer) { 684 !is_allowed_in_web_ui_renderer) {
684 // Log the URL to help us diagnose any future failures of this CHECK. 685 // Log the URL to help us diagnose any future failures of this CHECK.
685 GetContentClient()->SetActiveURL(url); 686 GetContentClient()->SetActiveURL(url);
686 CHECK(0); 687 CHECK(0);
687 } 688 }
688 } 689 }
689 690
690 } // namespace content 691 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698