Index: cc/thread.h |
diff --git a/cc/thread.h b/cc/thread.h |
index 341b2db5c460af4fe71bc8a9537bd1cfcb30fdf4..a017c421cd13bd960af4f9db78f49f328c88bb9c 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; |
}; |
} |