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

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

Issue 404613005: Start using RenderFrameProxyHost objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix Created 6 years, 4 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 | Annotate | Revision Log
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/navigation_controller_impl.h" 5 #include "content/browser/frame_host/navigation_controller_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 details->http_status_code = params.http_status_code; 871 details->http_status_code = params.http_status_code;
872 NotifyNavigationEntryCommitted(details); 872 NotifyNavigationEntryCommitted(details);
873 873
874 return true; 874 return true;
875 } 875 }
876 876
877 NavigationType NavigationControllerImpl::ClassifyNavigation( 877 NavigationType NavigationControllerImpl::ClassifyNavigation(
878 RenderFrameHost* rfh, 878 RenderFrameHost* rfh,
879 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) const { 879 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) const {
880 if (params.page_id == -1) { 880 if (params.page_id == -1) {
881 // TODO(nasko, creis): An out-of-process child frame has no way of
882 // knowing the page_id of its parent, so it is passing back -1. The
883 // semantics here should be re-evaluated during session history refactor
884 // (see http://crbug.com/236848). For now, we assume this means the
885 // child frame loaded and proceed. Note that this may do the wrong thing
886 // for cross-process AUTO_SUBFRAME navigations.
887 if (rfh->IsCrossProcessSubframe())
888 return NAVIGATION_TYPE_NEW_SUBFRAME;
889
881 // The renderer generates the page IDs, and so if it gives us the invalid 890 // The renderer generates the page IDs, and so if it gives us the invalid
882 // page ID (-1) we know it didn't actually navigate. This happens in a few 891 // page ID (-1) we know it didn't actually navigate. This happens in a few
883 // cases: 892 // cases:
884 // 893 //
885 // - If a page makes a popup navigated to about blank, and then writes 894 // - If a page makes a popup navigated to about blank, and then writes
886 // stuff like a subframe navigated to a real page. We'll get the commit 895 // stuff like a subframe navigated to a real page. We'll get the commit
887 // for the subframe, but there won't be any commit for the outer page. 896 // for the subframe, but there won't be any commit for the outer page.
888 // 897 //
889 // - We were also getting these for failed loads (for example, bug 21849). 898 // - We were also getting these for failed loads (for example, bug 21849).
890 // The guess is that we get a "load commit" for the alternate error page, 899 // The guess is that we get a "load commit" for the alternate error page,
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 } 1791 }
1783 } 1792 }
1784 } 1793 }
1785 1794
1786 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 1795 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
1787 const base::Callback<base::Time()>& get_timestamp_callback) { 1796 const base::Callback<base::Time()>& get_timestamp_callback) {
1788 get_timestamp_callback_ = get_timestamp_callback; 1797 get_timestamp_callback_ = get_timestamp_callback;
1789 } 1798 }
1790 1799
1791 } // namespace content 1800 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698