| Index: Source/platform/PlatformThreadData.h
|
| diff --git a/Source/platform/Task.h b/Source/platform/PlatformThreadData.h
|
| similarity index 77%
|
| copy from Source/platform/Task.h
|
| copy to Source/platform/PlatformThreadData.h
|
| index b4fbafb9ed7c37e0e609da56e261d41e21fa3172..428da4b9e48b3a393b82d2835918fbe5508c6ef7 100644
|
| --- a/Source/platform/Task.h
|
| +++ b/Source/platform/PlatformThreadData.h
|
| @@ -28,32 +28,32 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef Task_h
|
| -#define Task_h
|
| +#ifndef PlatformThreadData_h
|
| +#define PlatformThreadData_h
|
|
|
| -#include "public/platform/WebThread.h"
|
| -#include "wtf/Functional.h"
|
| +#include "platform/PlatformExport.h"
|
| +#include "wtf/Noncopyable.h"
|
| #include "wtf/OwnPtr.h"
|
| -#include "wtf/PassOwnPtr.h"
|
|
|
| namespace blink {
|
|
|
| -class Task : public WebThread::Task {
|
| +class ThreadTimers;
|
| +
|
| +class PLATFORM_EXPORT PlatformThreadData {
|
| + WTF_MAKE_NONCOPYABLE(PlatformThreadData);
|
| public:
|
| - explicit Task(PassOwnPtr<Closure> closure)
|
| - : m_closure(closure)
|
| - {
|
| - }
|
| + PlatformThreadData();
|
| + ~PlatformThreadData();
|
| +
|
| + ThreadTimers& threadTimers() { return *m_threadTimers; }
|
|
|
| - virtual void run() override
|
| - {
|
| - (*m_closure)();
|
| - }
|
| + static PlatformThreadData& current();
|
| + void destroy();
|
|
|
| private:
|
| - OwnPtr<Closure> m_closure;
|
| + OwnPtr<ThreadTimers> m_threadTimers;
|
| };
|
|
|
| } // namespace blink
|
|
|
| -#endif // Task_h
|
| +#endif // PlatformThreadData_h
|
|
|