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

Unified Diff: public/platform/WebThread.h

Issue 514193002: Expose platform thread id on WebThread (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months 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 | « Source/platform/scheduler/SchedulerTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebThread.h
diff --git a/public/platform/WebThread.h b/public/platform/WebThread.h
index 6bee10fbfebd929305b7c94031e4bf87e545f79b..60e4731048c75607496dbb4195199fff617afe0d 100644
--- a/public/platform/WebThread.h
+++ b/public/platform/WebThread.h
@@ -26,9 +26,13 @@
#define WebThread_h
#include "WebCommon.h"
+#include <stdint.h>
namespace blink {
+// Always an integer value.
+typedef uintptr_t PlatformThreadId;
+
// Provides an interface to an embedder-defined thread implementation.
//
// Deleting the thread blocks until all pending, non-delayed tasks have been
@@ -55,6 +59,7 @@ public:
virtual void postDelayedTask(Task*, long long delayMs) = 0;
virtual bool isCurrentThread() const = 0;
+ virtual PlatformThreadId threadId() const { return 0; }
virtual void addTaskObserver(TaskObserver*) { }
virtual void removeTaskObserver(TaskObserver*) { }
« no previous file with comments | « Source/platform/scheduler/SchedulerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698