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

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

Issue 2364943002: Create NavigationHandles for interstitials if needed (Closed)
Patch Set: Fixed Android issue 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/navigator_impl.h ('k') | content/browser/loader/DEPS » ('j') | 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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 const base::TimeTicks& renderer_before_unload_end_time) { 997 const base::TimeTicks& renderer_before_unload_end_time) {
998 // Only stores the beforeunload delay if we're tracking a browser initiated 998 // Only stores the beforeunload delay if we're tracking a browser initiated
999 // navigation and it happened later than the navigation request. 999 // navigation and it happened later than the navigation request.
1000 if (navigation_data_ && 1000 if (navigation_data_ &&
1001 renderer_before_unload_start_time > navigation_data_->start_time_) { 1001 renderer_before_unload_start_time > navigation_data_->start_time_) {
1002 navigation_data_->before_unload_delay_ = 1002 navigation_data_->before_unload_delay_ =
1003 renderer_before_unload_end_time - renderer_before_unload_start_time; 1003 renderer_before_unload_end_time - renderer_before_unload_start_time;
1004 } 1004 }
1005 } 1005 }
1006 1006
1007 NavigationHandleImpl* NavigatorImpl::GetNavigationHandleForFrameHost(
1008 RenderFrameHostImpl* render_frame_host) {
1009 return render_frame_host->navigation_handle();
1010 }
1011
1007 // PlzNavigate 1012 // PlzNavigate
1008 void NavigatorImpl::RequestNavigation(FrameTreeNode* frame_tree_node, 1013 void NavigatorImpl::RequestNavigation(FrameTreeNode* frame_tree_node,
1009 const GURL& dest_url, 1014 const GURL& dest_url,
1010 const Referrer& dest_referrer, 1015 const Referrer& dest_referrer,
1011 const FrameNavigationEntry& frame_entry, 1016 const FrameNavigationEntry& frame_entry,
1012 const NavigationEntryImpl& entry, 1017 const NavigationEntryImpl& entry,
1013 ReloadType reload_type, 1018 ReloadType reload_type,
1014 LoFiState lofi_state, 1019 LoFiState lofi_state,
1015 bool is_same_document_history_load, 1020 bool is_same_document_history_load,
1016 bool is_history_navigation_in_new_child, 1021 bool is_history_navigation_in_new_child,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 if (pending_entry != controller_->GetVisibleEntry() || 1204 if (pending_entry != controller_->GetVisibleEntry() ||
1200 !should_preserve_entry) { 1205 !should_preserve_entry) {
1201 controller_->DiscardPendingEntry(true); 1206 controller_->DiscardPendingEntry(true);
1202 1207
1203 // Also force the UI to refresh. 1208 // Also force the UI to refresh.
1204 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1209 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1205 } 1210 }
1206 } 1211 }
1207 1212
1208 } // namespace content 1213 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/loader/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698