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

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: fixes Created 6 years, 1 month 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/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 RenderFrameHostImpl* render_frame_host, 455 RenderFrameHostImpl* render_frame_host,
456 NavigationController::ReloadType reload_type) { 456 NavigationController::ReloadType reload_type) {
457 return NavigateToEntry( 457 return NavigateToEntry(
458 render_frame_host, 458 render_frame_host,
459 *NavigationEntryImpl::FromNavigationEntry(controller_->GetPendingEntry()), 459 *NavigationEntryImpl::FromNavigationEntry(controller_->GetPendingEntry()),
460 reload_type); 460 reload_type);
461 } 461 }
462 462
463 void NavigatorImpl::DidNavigate( 463 void NavigatorImpl::DidNavigate(
464 RenderFrameHostImpl* render_frame_host, 464 RenderFrameHostImpl* render_frame_host,
465 int32 page_id,
465 const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params) { 466 const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params) {
466 // PlzNavigate 467 // PlzNavigate
467 // The navigation request has been committed so the browser process doesn't 468 // The navigation request has been committed so the browser process doesn't
468 // need to care about it anymore. 469 // need to care about it anymore.
469 if (CommandLine::ForCurrentProcess()->HasSwitch( 470 if (CommandLine::ForCurrentProcess()->HasSwitch(
470 switches::kEnableBrowserSideNavigation)) { 471 switches::kEnableBrowserSideNavigation)) {
471 navigation_request_map_.erase( 472 navigation_request_map_.erase(
472 render_frame_host->frame_tree_node()->frame_tree_node_id()); 473 render_frame_host->frame_tree_node()->frame_tree_node_id());
473 } 474 }
474 475
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // (see http://code.google.com/p/chromium/issues/detail?id=2929 ) 546 // (see http://code.google.com/p/chromium/issues/detail?id=2929 )
546 // TODO(jungshik): Add a test for the encoding menu to avoid 547 // TODO(jungshik): Add a test for the encoding menu to avoid
547 // regressing it again. 548 // regressing it again.
548 // TODO(nasko): Verify the correctness of the above comment, since some of the 549 // TODO(nasko): Verify the correctness of the above comment, since some of the
549 // code doesn't exist anymore. Also, move this code in the 550 // code doesn't exist anymore. Also, move this code in the
550 // PageTransitionIsMainFrame code block above. 551 // PageTransitionIsMainFrame code block above.
551 if (ui::PageTransitionIsMainFrame(params.transition) && delegate_) 552 if (ui::PageTransitionIsMainFrame(params.transition) && delegate_)
552 delegate_->SetMainFrameMimeType(params.contents_mime_type); 553 delegate_->SetMainFrameMimeType(params.contents_mime_type);
553 554
554 LoadCommittedDetails details; 555 LoadCommittedDetails details;
555 bool did_navigate = controller_->RendererDidNavigate(render_frame_host, 556 bool did_navigate = controller_->RendererDidNavigate(
556 params, &details); 557 render_frame_host, page_id, params, &details);
557 558
558 // For now, keep track of each frame's URL in its FrameTreeNode. This lets 559 // For now, keep track of each frame's URL in its FrameTreeNode. This lets
559 // us estimate our process count for implementing OOP iframes. 560 // us estimate our process count for implementing OOP iframes.
560 // TODO(creis): Remove this when we track which pages commit in each frame. 561 // TODO(creis): Remove this when we track which pages commit in each frame.
561 render_frame_host->frame_tree_node()->set_current_url(params.url); 562 render_frame_host->frame_tree_node()->set_current_url(params.url);
562 563
563 // Send notification about committed provisional loads. This notification is 564 // Send notification about committed provisional loads. This notification is
564 // different from the NAV_ENTRY_COMMITTED notification which doesn't include 565 // different from the NAV_ENTRY_COMMITTED notification which doesn't include
565 // the actual URL navigated to and isn't sent for AUTO_SUBFRAME navigations. 566 // the actual URL navigated to and isn't sent for AUTO_SUBFRAME navigations.
566 if (details.type != NAVIGATION_TYPE_NAV_IGNORE && delegate_) { 567 if (details.type != NAVIGATION_TYPE_NAV_IGNORE && delegate_) {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", 912 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted",
912 time_to_commit); 913 time_to_commit);
913 UMA_HISTOGRAM_TIMES( 914 UMA_HISTOGRAM_TIMES(
914 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", 915 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted",
915 time_to_network); 916 time_to_network);
916 } 917 }
917 navigation_data_.reset(); 918 navigation_data_.reset();
918 } 919 }
919 920
920 } // namespace content 921 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698