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

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

Issue 2376643002: Clean up NavigationControllerImpl::IsURLInPageNavigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up NavigationControllerImpl::IsURLInPageNavigation 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 | « content/browser/frame_host/navigation_controller_impl.cc ('k') | no next file » | 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // TODO(jungshik): Add a test for the encoding menu to avoid 559 // TODO(jungshik): Add a test for the encoding menu to avoid
560 // regressing it again. 560 // regressing it again.
561 // TODO(nasko): Verify the correctness of the above comment, since some of the 561 // TODO(nasko): Verify the correctness of the above comment, since some of the
562 // code doesn't exist anymore. Also, move this code in the 562 // code doesn't exist anymore. Also, move this code in the
563 // PageTransitionIsMainFrame code block above. 563 // PageTransitionIsMainFrame code block above.
564 if (ui::PageTransitionIsMainFrame(params.transition) && delegate_) 564 if (ui::PageTransitionIsMainFrame(params.transition) && delegate_)
565 delegate_->SetMainFrameMimeType(params.contents_mime_type); 565 delegate_->SetMainFrameMimeType(params.contents_mime_type);
566 566
567 int old_entry_count = controller_->GetEntryCount(); 567 int old_entry_count = controller_->GetEntryCount();
568 LoadCommittedDetails details; 568 LoadCommittedDetails details;
569 bool did_navigate = controller_->RendererDidNavigate(render_frame_host, 569 bool did_navigate = controller_->RendererDidNavigate(
570 params, &details); 570 render_frame_host, params, &details, is_navigation_within_page);
571 571
572 // If the history length and/or offset changed, update other renderers in the 572 // If the history length and/or offset changed, update other renderers in the
573 // FrameTree. 573 // FrameTree.
574 if (old_entry_count != controller_->GetEntryCount() || 574 if (old_entry_count != controller_->GetEntryCount() ||
575 details.previous_entry_index != 575 details.previous_entry_index !=
576 controller_->GetLastCommittedEntryIndex()) { 576 controller_->GetLastCommittedEntryIndex()) {
577 frame_tree->root()->render_manager()->SendPageMessage( 577 frame_tree->root()->render_manager()->SendPageMessage(
578 new PageMsg_SetHistoryOffsetAndLength( 578 new PageMsg_SetHistoryOffsetAndLength(
579 MSG_ROUTING_NONE, controller_->GetLastCommittedEntryIndex(), 579 MSG_ROUTING_NONE, controller_->GetLastCommittedEntryIndex(),
580 controller_->GetEntryCount()), 580 controller_->GetEntryCount()),
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 if (pending_entry != controller_->GetVisibleEntry() || 1199 if (pending_entry != controller_->GetVisibleEntry() ||
1200 !should_preserve_entry) { 1200 !should_preserve_entry) {
1201 controller_->DiscardPendingEntry(true); 1201 controller_->DiscardPendingEntry(true);
1202 1202
1203 // Also force the UI to refresh. 1203 // Also force the UI to refresh.
1204 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1204 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1205 } 1205 }
1206 } 1206 }
1207 1207
1208 } // namespace content 1208 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698