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

Unified Diff: third_party/WebKit/public/web/WebUserGestureIndicator.h

Issue 2555013004: UserGestureIndicator: remove many unnecessary calls to isMainThread (Closed)
Patch Set: [test] remove isMainThread() check in currentToken() 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
Index: third_party/WebKit/public/web/WebUserGestureIndicator.h
diff --git a/third_party/WebKit/public/web/WebUserGestureIndicator.h b/third_party/WebKit/public/web/WebUserGestureIndicator.h
index 44b1cacbd1413a3bb1b813d7e6ed635048693ad9..59f27a34d7402c2e0615d39c2e919c0080aa5ded 100644
--- a/third_party/WebKit/public/web/WebUserGestureIndicator.h
+++ b/third_party/WebKit/public/web/WebUserGestureIndicator.h
@@ -40,8 +40,11 @@ class WebUserGestureToken;
class WebUserGestureIndicator {
public:
- // Returns true if a user gesture is currently being processed.
+ // Returns true if a user gesture is currently being processed. Must be called
+ // on the main thread.
BLINK_EXPORT static bool isProcessingUserGesture();
+ // Can be called from any thread.
kinuko 2016/12/09 03:15:51 Also note that it's slow and the other one must be
Charlie Harrison 2016/12/09 15:24:14 Done.
+ BLINK_EXPORT static bool isProcessingUserGestureThreadSafe();
// Returns true if a consumable gesture exists and has been successfully
// consumed.

Powered by Google App Engine
This is Rietveld 408576698