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

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

Issue 2555013004: UserGestureIndicator: remove many unnecessary calls to isMainThread (Closed)
Patch Set: remove bad comment (trybots prev) 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..1c63f2ca908f9d0a55740d89624f0820c65a1de7 100644
--- a/third_party/WebKit/public/web/WebUserGestureIndicator.h
+++ b/third_party/WebKit/public/web/WebUserGestureIndicator.h
@@ -40,8 +40,13 @@ 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. Note that this is slower than the non
+ // thread-safe version due to thread id lookups. Prefer the non thread-safe
+ // version for code that will only execute on the main thread.
+ 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