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

Unified Diff: cc/thread.h

Issue 11344004: Remove WebKit::Platform dependencies from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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
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;
};
}

Powered by Google App Engine
This is Rietveld 408576698