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

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

Issue 2499313003: Set user_gesture bit at NavigationHandle creation time. (Closed)
Patch Set: rebase Created 4 years 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
« no previous file with comments | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/frame_host/navigator_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 5adba8d0796f05b27d99a1473f84b0e4f3a85b69..44873594afe061d98414abd3f993b87c5ff7d9de 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -143,7 +143,8 @@ NavigationController* NavigatorImpl::GetController() {
void NavigatorImpl::DidStartProvisionalLoad(
RenderFrameHostImpl* render_frame_host,
const GURL& url,
- const base::TimeTicks& navigation_start) {
+ const base::TimeTicks& navigation_start,
+ NavigationGesture gesture) {
bool is_main_frame = render_frame_host->frame_tree_node()->IsMainFrame();
bool is_error_page = (url.spec() == kUnreachableWebDataURL);
bool is_iframe_srcdoc = (url.spec() == kAboutSrcDocURL);
@@ -209,7 +210,8 @@ void NavigatorImpl::DidStartProvisionalLoad(
is_renderer_initiated,
false, // is_same_page
is_iframe_srcdoc, // is_srcdoc
- navigation_start, pending_nav_entry_id, started_from_context_menu));
+ navigation_start, pending_nav_entry_id, gesture,
+ started_from_context_menu));
}
void NavigatorImpl::DidFailProvisionalLoadWithError(
@@ -969,8 +971,9 @@ void NavigatorImpl::OnBeginNavigation(
// request is not user-initiated.
if (ongoing_navigation_request &&
(ongoing_navigation_request->browser_initiated() ||
- ongoing_navigation_request->begin_params().has_user_gesture) &&
- !begin_params.has_user_gesture) {
+ ongoing_navigation_request->common_params().gesture ==
+ NavigationGestureUser) &&
+ common_params.gesture != NavigationGestureUser) {
RenderFrameHost* current_frame_host =
frame_tree_node->render_manager()->current_frame_host();
current_frame_host->Send(
« no previous file with comments | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/frame_host/navigator_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698