OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ClosureRunnerTask_h |
| 6 #define ClosureRunnerTask_h |
| 7 |
| 8 #include "platform/PlatformExport.h" |
| 9 #include "public/platform/WebThread.h" |
| 10 #include "wtf/Functional.h" |
| 11 #include "wtf/Noncopyable.h" |
| 12 #include "wtf/OwnPtr.h" |
| 13 #include "wtf/PassOwnPtr.h" |
| 14 |
| 15 namespace blink { |
| 16 |
| 17 class PLATFORM_EXPORT ClosureRunnerTask : public WebThread::Task { |
| 18 WTF_MAKE_NONCOPYABLE(ClosureRunnerTask); |
| 19 |
| 20 public: |
| 21 explicit ClosureRunnerTask(PassOwnPtr<Closure> closure) |
| 22 : m_closure(closure) |
| 23 { |
| 24 } |
| 25 |
| 26 ~ClosureRunnerTask() override { } |
| 27 |
| 28 // WebThread::Task implementation. |
| 29 void run() override; |
| 30 |
| 31 private: |
| 32 OwnPtr<Closure> m_closure; |
| 33 }; |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif // ClosureRunnerTask_h |
OLD | NEW |