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

Unified Diff: webkit/compositor_bindings/CCThreadImpl.h

Issue 10913158: Avoid using WTF threading code in cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « cc/test/CCSchedulerTestCommon.h ('k') | webkit/compositor_bindings/CCThreadImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/compositor_bindings/CCThreadImpl.h
diff --git a/webkit/compositor_bindings/CCThreadImpl.h b/webkit/compositor_bindings/CCThreadImpl.h
index 094d5b5a414932385ba546dd7c7d210454bcc6d2..31b017e0e7fa7d8041585b33ca5474961945bf07 100644
--- a/webkit/compositor_bindings/CCThreadImpl.h
+++ b/webkit/compositor_bindings/CCThreadImpl.h
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "CCThread.h"
+#include "base/threading/platform_thread.h"
#include <wtf/OwnPtr.h>
#include <wtf/Threading.h>
@@ -16,17 +17,22 @@ class WebThread;
// Implements CCThread in terms of WebThread.
class CCThreadImpl : public WebCore::CCThread {
public:
- static PassOwnPtr<WebCore::CCThread> create(WebThread*);
+ // Creates a CCThreadImpl wrapping the current thread.
+ static PassOwnPtr<WebCore::CCThread> createForCurrentThread();
+
+ // Creates a CCThread wrapping a non-current WebThread.
+ static PassOwnPtr<WebCore::CCThread> createForDifferentThread(WebThread*);
+
virtual ~CCThreadImpl();
virtual void postTask(PassOwnPtr<WebCore::CCThread::Task>);
virtual void postDelayedTask(PassOwnPtr<WebCore::CCThread::Task>, long long delayMs);
- WTF::ThreadIdentifier threadID() const;
+ base::PlatformThreadId threadID() const;
private:
- explicit CCThreadImpl(WebThread*);
+ CCThreadImpl(WebThread*, bool currentThread);
WebThread* m_thread;
- WTF::ThreadIdentifier m_threadID;
+ base::PlatformThreadId m_threadID;
};
} // namespace WebKit
« no previous file with comments | « cc/test/CCSchedulerTestCommon.h ('k') | webkit/compositor_bindings/CCThreadImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698