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

Unified Diff: content/public/browser/navigation_handle.h

Issue 2524763002: make NavigationGesture part of public content API and use it outside content (Closed)
Patch Set: Created 4 years, 1 month 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/common/view_messages.h ('k') | content/public/browser/navigation_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/navigation_handle.h
diff --git a/content/public/browser/navigation_handle.h b/content/public/browser/navigation_handle.h
index b1a4a1df8392a0c687545456e74734a685a8beee..5df7a938b69940d35051e4f52f2aad44c251738a 100644
--- a/content/public/browser/navigation_handle.h
+++ b/content/public/browser/navigation_handle.h
@@ -10,6 +10,7 @@
#include "content/common/content_export.h"
#include "content/public/browser/navigation_throttle.h"
+#include "content/public/common/navigation_gesture.h"
#include "content/public/common/referrer.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_info.h"
@@ -120,11 +121,11 @@ class CONTENT_EXPORT NavigationHandle {
// Returns a sanitized version of the referrer for this request.
virtual const Referrer& GetReferrer() = 0;
- // Whether the navigation was initiated by a user gesture. Note that this
- // will return false for browser-initiated navigations.
- // TODO(clamy): when PlzNavigate launches, this should return true for
- // browser-initiated navigations.
- virtual bool HasUserGesture() = 0;
+ // The type of NavigationGesture that initiated the navigation for this
+ // NavigationHandle. Note that this will return NavigationGestureAuto for
+ // browser-initiated navigations. TODO(clamy): when PlzNavigate launches,
+ // this should return NavigationGestureUser for browser-initiated navigations.
+ virtual NavigationGesture GetNavigationGesture() = 0;
// Returns the page transition type.
virtual ui::PageTransition GetPageTransition() = 0;
@@ -211,7 +212,7 @@ class CONTENT_EXPORT NavigationHandle {
RenderFrameHost* render_frame_host,
bool committed = false,
net::Error error = net::OK,
- bool has_user_gesture = false);
+ NavigationGesture gesture = NavigationGestureUnknown);
// Registers a NavigationThrottle for tests. The throttle can
// modify the request, pause the request or cancel the request. This will
« no previous file with comments | « content/common/view_messages.h ('k') | content/public/browser/navigation_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698