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

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

Issue 2378393002: Pass the user_gesture context in the IPC message FrameMsg_CommitNavigation to the renderer. (Closed)
Patch Set: Fix compile failures 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/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index 11e987c4ada6ba868054f0f6445ecd8bc0bc3ff8..7929e266f410ccdaa1146854bd741c7892f81d4e 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -176,7 +176,8 @@ std::unique_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated(
-1, // pending_history_list_offset
current_history_list_offset, current_history_list_length,
false, // is_view_source
- false); // should_clear_history_list
+ false, // should_clear_history_list
+ begin_params.has_user_gesture);
std::unique_ptr<NavigationRequest> navigation_request(
new NavigationRequest(frame_tree_node, common_params, begin_params,
request_params, false, nullptr, nullptr));
@@ -516,6 +517,9 @@ void NavigationRequest::CommitNavigation() {
frame_tree_node_->render_manager()->speculative_frame_host());
TransferNavigationHandleOwnership(render_frame_host);
+
+ DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture);
nasko 2016/09/30 20:21:47 nit: I'd move this DCHECK at the beginning of the
+
render_frame_host->CommitNavigation(response_.get(), std::move(body_),
common_params_, request_params_,
is_view_source_);

Powered by Google App Engine
This is Rietveld 408576698