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

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

Issue 2841833002: Renamed LoadCommittedDetails.is_in_page to is_same_document. (Closed)
Patch Set: I said "once and for all" Created 3 years, 7 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 /* 5 /*
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 pending_entry_->set_restore_type(RestoreType::NONE); 825 pending_entry_->set_restore_type(RestoreType::NONE);
826 was_restored = true; 826 was_restored = true;
827 } 827 }
828 828
829 // The renderer tells us whether the navigation replaces the current entry. 829 // The renderer tells us whether the navigation replaces the current entry.
830 details->did_replace_entry = params.should_replace_current_entry; 830 details->did_replace_entry = params.should_replace_current_entry;
831 831
832 // Do navigation-type specific actions. These will make and commit an entry. 832 // Do navigation-type specific actions. These will make and commit an entry.
833 details->type = ClassifyNavigation(rfh, params); 833 details->type = ClassifyNavigation(rfh, params);
834 834
835 // is_in_page must be computed before the entry gets committed. 835 // is_same_document must be computed before the entry gets committed.
836 details->is_in_page = is_navigation_within_page; 836 details->is_same_document = is_navigation_within_page;
837 837
838 // Save reload type and timestamp for a reload navigation to detect 838 // Save reload type and timestamp for a reload navigation to detect
839 // consecutive reloads when the next reload is requested. 839 // consecutive reloads when the next reload is requested.
840 if (PendingEntryMatchesHandle(navigation_handle)) { 840 if (PendingEntryMatchesHandle(navigation_handle)) {
841 if (pending_entry_->reload_type() != ReloadType::NONE) { 841 if (pending_entry_->reload_type() != ReloadType::NONE) {
842 last_committed_reload_type_ = pending_entry_->reload_type(); 842 last_committed_reload_type_ = pending_entry_->reload_type();
843 last_committed_reload_time_ = 843 last_committed_reload_time_ =
844 time_smoother_.GetSmoothedTime(get_timestamp_callback_.Run()); 844 time_smoother_.GetSmoothedTime(get_timestamp_callback_.Run());
845 } else if (!pending_entry_->is_renderer_initiated() || 845 } else if (!pending_entry_->is_renderer_initiated() ||
846 params.gesture == NavigationGestureUser) { 846 params.gesture == NavigationGestureUser) {
847 last_committed_reload_type_ = ReloadType::NONE; 847 last_committed_reload_type_ = ReloadType::NONE;
848 last_committed_reload_time_ = base::Time(); 848 last_committed_reload_time_ = base::Time();
849 } 849 }
850 } 850 }
851 851
852 switch (details->type) { 852 switch (details->type) {
853 case NAVIGATION_TYPE_NEW_PAGE: 853 case NAVIGATION_TYPE_NEW_PAGE:
854 RendererDidNavigateToNewPage(rfh, params, details->is_in_page, 854 RendererDidNavigateToNewPage(rfh, params, details->is_same_document,
855 details->did_replace_entry, 855 details->did_replace_entry,
856 navigation_handle); 856 navigation_handle);
857 break; 857 break;
858 case NAVIGATION_TYPE_EXISTING_PAGE: 858 case NAVIGATION_TYPE_EXISTING_PAGE:
859 details->did_replace_entry = details->is_in_page; 859 details->did_replace_entry = details->is_same_document;
860 RendererDidNavigateToExistingPage(rfh, params, details->is_in_page, 860 RendererDidNavigateToExistingPage(rfh, params, details->is_same_document,
861 was_restored, navigation_handle); 861 was_restored, navigation_handle);
862 break; 862 break;
863 case NAVIGATION_TYPE_SAME_PAGE: 863 case NAVIGATION_TYPE_SAME_PAGE:
864 RendererDidNavigateToSamePage(rfh, params, navigation_handle); 864 RendererDidNavigateToSamePage(rfh, params, navigation_handle);
865 break; 865 break;
866 case NAVIGATION_TYPE_NEW_SUBFRAME: 866 case NAVIGATION_TYPE_NEW_SUBFRAME:
867 RendererDidNavigateNewSubframe(rfh, params, details->is_in_page, 867 RendererDidNavigateNewSubframe(rfh, params, details->is_same_document,
868 details->did_replace_entry); 868 details->did_replace_entry);
869 break; 869 break;
870 case NAVIGATION_TYPE_AUTO_SUBFRAME: 870 case NAVIGATION_TYPE_AUTO_SUBFRAME:
871 if (!RendererDidNavigateAutoSubframe(rfh, params)) { 871 if (!RendererDidNavigateAutoSubframe(rfh, params)) {
872 // We don't send a notification about auto-subframe PageState during 872 // We don't send a notification about auto-subframe PageState during
873 // UpdateStateForFrame, since it looks like nothing has changed. Send 873 // UpdateStateForFrame, since it looks like nothing has changed. Send
874 // it here at commit time instead. 874 // it here at commit time instead.
875 NotifyEntryChanged(GetLastCommittedEntry()); 875 NotifyEntryChanged(GetLastCommittedEntry());
876 return false; 876 return false;
877 } 877 }
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2163 } 2163 }
2164 } 2164 }
2165 } 2165 }
2166 2166
2167 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 2167 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
2168 const base::Callback<base::Time()>& get_timestamp_callback) { 2168 const base::Callback<base::Time()>& get_timestamp_callback) {
2169 get_timestamp_callback_ = get_timestamp_callback; 2169 get_timestamp_callback_ = get_timestamp_callback;
2170 } 2170 }
2171 2171
2172 } // namespace content 2172 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_bubble_manager.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698