summaryrefslogtreecommitdiffstats
path: root/cc/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'cc/thread.h')
-rw-r--r--cc/thread.h23
1 files changed, 5 insertions, 18 deletions
diff --git a/cc/thread.h b/cc/thread.h
index 341b2db..a017c42 100644
--- a/cc/thread.h
+++ b/cc/thread.h
@@ -5,9 +5,8 @@
#ifndef CCThread_h
#define CCThread_h
+#include "base/callback.h"
#include "base/basictypes.h"
-#include "base/threading/platform_thread.h"
-#include <wtf/PassOwnPtr.h>
namespace cc {
@@ -17,25 +16,13 @@ class Thread {
public:
virtual ~Thread() { }
- class Task {
- public:
- virtual ~Task() { }
- virtual void performTask() = 0;
- void* instance() const { return m_instance; }
- protected:
- Task(void* instance) : m_instance(instance) { }
- void* m_instance;
- private:
- DISALLOW_COPY_AND_ASSIGN(Task);
- };
-
- // Executes the task on context's thread asynchronously.
- virtual void postTask(PassOwnPtr<Task>) = 0;
+ // Executes the callback on context's thread asynchronously.
+ virtual void postTask(base::Closure cb) = 0;
// Executes the task after the specified delay.
- virtual void postDelayedTask(PassOwnPtr<Task>, long long delayMs) = 0;
+ virtual void postDelayedTask(base::Closure cb, long long delayMs) = 0;
- virtual base::PlatformThreadId threadID() const = 0;
+ virtual bool belongsToCurrentThread() const = 0;
};
}