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

Unified Diff: public/web/WebUserGestureIndicator.h

Issue 82693006: Adding handlers for user gesture callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Simplified handler implementation and added unit test Created 7 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
Index: public/web/WebUserGestureIndicator.h
diff --git a/public/web/WebUserGestureIndicator.h b/public/web/WebUserGestureIndicator.h
index b7c7f3cfcf1da8abd31c6af2cd8fef7b65e31ea4..d9d1d72a6c88ebb00e64fda9d0a7f751e6d6b35e 100644
--- a/public/web/WebUserGestureIndicator.h
+++ b/public/web/WebUserGestureIndicator.h
@@ -37,6 +37,12 @@ namespace blink {
class WebUserGestureToken;
+class WebUserGestureHandler {
+public:
+ virtual ~WebUserGestureHandler() { }
+ virtual void onGesture() = 0;
+};
+
class WebUserGestureIndicator {
public:
// Returns true if a user gesture is currently being processed.
@@ -49,6 +55,10 @@ public:
// continue processing the user gesture later on using a
// WebScopedUserGesture.
BLINK_EXPORT static WebUserGestureToken currentUserGestureToken();
+
+ BLINK_EXPORT static void setHandler(WebUserGestureHandler*);
+
+ BLINK_EXPORT static WebUserGestureHandler* getHandler();
abarth-chromium 2013/11/26 19:36:37 Why do you need a getHandler API? I'd suggest rem
jww 2013/11/26 20:11:55 I was using this API in our autofill code, but I w
};
}
« Source/web/WebUserGestureIndicator.cpp ('K') | « Source/web/tests/WebUserGestureTokenTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698