| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "CCThread.h" | 5 #include "CCThread.h" |
| 6 #include "base/threading/platform_thread.h" | 6 #include "base/threading/platform_thread.h" |
| 7 #include <wtf/OwnPtr.h> | 7 #include <wtf/OwnPtr.h> |
| 8 #include <wtf/Threading.h> | 8 #include <wtf/Threading.h> |
| 9 | 9 |
| 10 #ifndef CCThreadImpl_h | 10 #ifndef CCThreadImpl_h |
| 11 #define CCThreadImpl_h | 11 #define CCThreadImpl_h |
| 12 | 12 |
| 13 namespace WebKit { | 13 namespace WebKit { |
| 14 | 14 |
| 15 class WebThread; | 15 class WebThread; |
| 16 | 16 |
| 17 // Implements CCThread in terms of WebThread. | 17 // Implements CCThread in terms of WebThread. |
| 18 class CCThreadImpl : public WebCore::CCThread { | 18 class CCThreadImpl : public cc::CCThread { |
| 19 public: | 19 public: |
| 20 // Creates a CCThreadImpl wrapping the current thread. | 20 // Creates a CCThreadImpl wrapping the current thread. |
| 21 static PassOwnPtr<WebCore::CCThread> createForCurrentThread(); | 21 static PassOwnPtr<cc::CCThread> createForCurrentThread(); |
| 22 | 22 |
| 23 // Creates a CCThread wrapping a non-current WebThread. | 23 // Creates a CCThread wrapping a non-current WebThread. |
| 24 static PassOwnPtr<WebCore::CCThread> createForDifferentThread(WebThread*); | 24 static PassOwnPtr<cc::CCThread> createForDifferentThread(WebThread*); |
| 25 | 25 |
| 26 virtual ~CCThreadImpl(); | 26 virtual ~CCThreadImpl(); |
| 27 virtual void postTask(PassOwnPtr<WebCore::CCThread::Task>); | 27 virtual void postTask(PassOwnPtr<cc::CCThread::Task>); |
| 28 virtual void postDelayedTask(PassOwnPtr<WebCore::CCThread::Task>, long long
delayMs); | 28 virtual void postDelayedTask(PassOwnPtr<cc::CCThread::Task>, long long delay
Ms); |
| 29 base::PlatformThreadId threadID() const; | 29 base::PlatformThreadId threadID() const; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 CCThreadImpl(WebThread*, bool currentThread); | 32 CCThreadImpl(WebThread*, bool currentThread); |
| 33 | 33 |
| 34 WebThread* m_thread; | 34 WebThread* m_thread; |
| 35 base::PlatformThreadId m_threadID; | 35 base::PlatformThreadId m_threadID; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 } // namespace WebKit | 38 } // namespace WebKit |
| 39 | 39 |
| 40 #endif | 40 #endif |
| OLD | NEW |