| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef WebTaskRunner_h | 5 #ifndef WebTaskRunner_h |
| 6 #define WebTaskRunner_h | 6 #define WebTaskRunner_h |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "public/platform/WebCommon.h" | 9 #include "public/platform/WebCommon.h" |
| 10 #include "public/platform/WebTraceLocation.h" | 10 #include "public/platform/WebTraceLocation.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // This function is not thread safe. Call this on the thread that has posted | 44 // This function is not thread safe. Call this on the thread that has posted |
| 45 // the task. | 45 // the task. |
| 46 void cancel(); | 46 void cancel(); |
| 47 | 47 |
| 48 TaskHandle(); | 48 TaskHandle(); |
| 49 ~TaskHandle(); | 49 ~TaskHandle(); |
| 50 | 50 |
| 51 TaskHandle(TaskHandle&&); | 51 TaskHandle(TaskHandle&&); |
| 52 TaskHandle& operator=(TaskHandle&&); | 52 TaskHandle& operator=(TaskHandle&&); |
| 53 | 53 |
| 54 class Runner; |
| 55 |
| 54 private: | 56 private: |
| 55 class Runner; | |
| 56 friend class WebTaskRunner; | 57 friend class WebTaskRunner; |
| 57 | 58 |
| 58 explicit TaskHandle(RefPtr<Runner>); | 59 explicit TaskHandle(RefPtr<Runner>); |
| 59 RefPtr<Runner> m_runner; | 60 RefPtr<Runner> m_runner; |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 #endif | 63 #endif |
| 63 | 64 |
| 64 // The blink representation of a chromium SingleThreadTaskRunner. | 65 // The blink representation of a chromium SingleThreadTaskRunner. |
| 65 class BLINK_PLATFORM_EXPORT WebTaskRunner { | 66 class BLINK_PLATFORM_EXPORT WebTaskRunner { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 WARN_UNUSED_RETURN; | 140 WARN_UNUSED_RETURN; |
| 140 TaskHandle postDelayedCancellableTask(const WebTraceLocation&, | 141 TaskHandle postDelayedCancellableTask(const WebTraceLocation&, |
| 141 std::unique_ptr<WTF::Closure>, | 142 std::unique_ptr<WTF::Closure>, |
| 142 long long delayMs) WARN_UNUSED_RETURN; | 143 long long delayMs) WARN_UNUSED_RETURN; |
| 143 #endif | 144 #endif |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 } // namespace blink | 147 } // namespace blink |
| 147 | 148 |
| 148 #endif // WebTaskRunner_h | 149 #endif // WebTaskRunner_h |
| OLD | NEW |