diff options
Diffstat (limited to 'Source/WebKit/chromium/public/platform/WebThread.h')
| -rw-r--r-- | Source/WebKit/chromium/public/platform/WebThread.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/WebKit/chromium/public/platform/WebThread.h b/Source/WebKit/chromium/public/platform/WebThread.h index a7b372fee..b54bee849 100644 --- a/Source/WebKit/chromium/public/platform/WebThread.h +++ b/Source/WebKit/chromium/public/platform/WebThread.h @@ -51,9 +51,19 @@ public: virtual void postTask(Task*) = 0; virtual void postDelayedTask(Task*, long long delayMs) = 0; + virtual void addTaskObserver(TaskObserver*) { } virtual void removeTaskObserver(TaskObserver*) { } + // enterRunLoop() processes tasks posted to this WebThread. This call does not return until some task calls exitRunLoop(). + // WebThread does not support nesting, meaning that once the run loop is entered for a given WebThread it is not valid to + // call enterRunLoop() again. + virtual void enterRunLoop() = 0; + + // exitRunLoop() runs tasks until there are no tasks available to run, then returns control to the caller of enterRunLoop(). + // Must be called when the WebThread is running. + virtual void exitRunLoop() = 0; + virtual ~WebThread() { } }; |
