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

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

Issue 2555013004: UserGestureIndicator: remove many unnecessary calls to isMainThread (Closed)
Patch Set: Avoid duplicate thread checks in DOMTimer 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 | « third_party/WebKit/Source/web/WebUserGestureIndicator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « third_party/WebKit/Source/web/WebUserGestureIndicator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698