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

Unified Diff: content/browser/frame_host/interstitial_page_navigator_impl.cc

Issue 2364943002: Create NavigationHandles for interstitials if needed (Closed)
Patch Set: Fixed Android issue Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/interstitial_page_navigator_impl.cc
diff --git a/content/browser/frame_host/interstitial_page_navigator_impl.cc b/content/browser/frame_host/interstitial_page_navigator_impl.cc
index 8b1a3a6865f238458a77200361f06e61ed038ec9..a3fcac36251812fcb855798d2d7dbb8e8b04a92e 100644
--- a/content/browser/frame_host/interstitial_page_navigator_impl.cc
+++ b/content/browser/frame_host/interstitial_page_navigator_impl.cc
@@ -17,6 +17,8 @@ InterstitialPageNavigatorImpl::InterstitialPageNavigatorImpl(
: interstitial_(interstitial),
controller_(navigation_controller) {}
+InterstitialPageNavigatorImpl::~InterstitialPageNavigatorImpl() {}
+
NavigatorDelegate* InterstitialPageNavigatorImpl::GetDelegate() {
return interstitial_;
}
@@ -25,13 +27,40 @@ NavigationController* InterstitialPageNavigatorImpl::GetController() {
return controller_;
}
+void InterstitialPageNavigatorImpl::DidStartProvisionalLoad(
+ RenderFrameHostImpl* render_frame_host,
+ const GURL& url,
+ const base::TimeTicks& navigation_start) {
+ // The interstitial page should only navigate once.
+ DCHECK(!navigation_handle_.get());
+ navigation_handle_ =
+ NavigationHandleImpl::Create(url, render_frame_host->frame_tree_node(),
+ false, // is_renderer_initiated
+ false, // is_synchronous
+ false, // is_srcdoc
+ navigation_start,
+ 0); // pending_nav_entry_id
+}
+
void InterstitialPageNavigatorImpl::DidNavigate(
RenderFrameHostImpl* render_frame_host,
const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params) {
+ if (navigation_handle_) {
+ navigation_handle_->DidCommitNavigation(input_params, false,
+ render_frame_host);
+ navigation_handle_.reset();
+ }
+
// TODO(nasko): Move implementation here, but for the time being call out
// to the interstitial page code.
- interstitial_->DidNavigate(
- render_frame_host->render_view_host(), input_params);
+ interstitial_->DidNavigate(render_frame_host->render_view_host(),
+ input_params);
+}
+
+NavigationHandleImpl*
+InterstitialPageNavigatorImpl::GetNavigationHandleForFrameHost(
+ RenderFrameHostImpl* render_frame_host) {
+ return navigation_handle_.get();
}
} // namespace content
« no previous file with comments | « content/browser/frame_host/interstitial_page_navigator_impl.h ('k') | content/browser/frame_host/navigation_handle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698