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

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

Issue 1312213010: PageLoadMetrics renderer and browser implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Instrumented NavigationHandle for IsSamePage, fixed broken logic and tests Created 5 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/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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 // in-page navigations to be super fast, and taking a screenshot 403 // in-page navigations to be super fast, and taking a screenshot
404 // currently blocks GPU for a longer time than we are willing to 404 // currently blocks GPU for a longer time than we are willing to
405 // tolerate in this use case. 405 // tolerate in this use case.
406 if (!params.was_within_same_page) 406 if (!params.was_within_same_page)
407 controller_->TakeScreenshot(); 407 controller_->TakeScreenshot();
408 } 408 }
409 409
410 // Run tasks that must execute just before the commit. 410 // Run tasks that must execute just before the commit.
411 bool is_navigation_within_page = controller_->IsURLInPageNavigation( 411 bool is_navigation_within_page = controller_->IsURLInPageNavigation(
412 params.url, params.was_within_same_page, render_frame_host); 412 params.url, params.was_within_same_page, render_frame_host);
413 render_frame_host->navigation_handle()->set_is_same_page(
clamy 2015/09/08 13:25:59 As mentioned in the NavigationHandleImpl, instead
Charlie Harrison 2015/09/08 23:05:16 Done.
414 is_navigation_within_page);
413 delegate_->DidNavigateMainFramePreCommit(is_navigation_within_page); 415 delegate_->DidNavigateMainFramePreCommit(is_navigation_within_page);
414 } 416 }
415 417
416 if (!oopifs_possible) 418 if (!oopifs_possible)
417 frame_tree->root()->render_manager()->DidNavigateFrame( 419 frame_tree->root()->render_manager()->DidNavigateFrame(
418 render_frame_host, params.gesture == NavigationGestureUser); 420 render_frame_host, params.gesture == NavigationGestureUser);
419 } 421 }
420 422
421 // Save the origin of the new page. Do this before calling 423 // Save the origin of the new page. Do this before calling
422 // DidNavigateFrame(), because the origin needs to be included in the SwapOut 424 // DidNavigateFrame(), because the origin needs to be included in the SwapOut
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 entry->set_should_replace_entry(pending_entry->should_replace_entry()); 945 entry->set_should_replace_entry(pending_entry->should_replace_entry());
944 entry->SetRedirectChain(pending_entry->GetRedirectChain()); 946 entry->SetRedirectChain(pending_entry->GetRedirectChain());
945 } 947 }
946 controller_->SetPendingEntry(entry.Pass()); 948 controller_->SetPendingEntry(entry.Pass());
947 if (delegate_) 949 if (delegate_)
948 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 950 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
949 } 951 }
950 } 952 }
951 953
952 } // namespace content 954 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698