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 28 matching lines...) Expand all Loading... |
39 // This function is not thread safe. Call this on the thread that has posted | 39 // This function is not thread safe. Call this on the thread that has posted |
40 // the task. | 40 // the task. |
41 void cancel(); | 41 void cancel(); |
42 | 42 |
43 TaskHandle(); | 43 TaskHandle(); |
44 ~TaskHandle(); | 44 ~TaskHandle(); |
45 | 45 |
46 TaskHandle(TaskHandle&&); | 46 TaskHandle(TaskHandle&&); |
47 TaskHandle& operator=(TaskHandle&&); | 47 TaskHandle& operator=(TaskHandle&&); |
48 | 48 |
| 49 class Runner; |
| 50 |
49 private: | 51 private: |
50 class Runner; | |
51 friend class WebTaskRunner; | 52 friend class WebTaskRunner; |
52 | 53 |
53 explicit TaskHandle(RefPtr<Runner>); | 54 explicit TaskHandle(RefPtr<Runner>); |
54 RefPtr<Runner> m_runner; | 55 RefPtr<Runner> m_runner; |
55 }; | 56 }; |
56 | 57 |
57 // The blink representation of a chromium SingleThreadTaskRunner. | 58 // The blink representation of a chromium SingleThreadTaskRunner. |
58 class BLINK_PLATFORM_EXPORT WebTaskRunner { | 59 class BLINK_PLATFORM_EXPORT WebTaskRunner { |
59 public: | 60 public: |
60 virtual ~WebTaskRunner() {} | 61 virtual ~WebTaskRunner() {} |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 std::unique_ptr<WTF::Closure>) | 131 std::unique_ptr<WTF::Closure>) |
131 WARN_UNUSED_RETURN; | 132 WARN_UNUSED_RETURN; |
132 TaskHandle postDelayedCancellableTask(const WebTraceLocation&, | 133 TaskHandle postDelayedCancellableTask(const WebTraceLocation&, |
133 std::unique_ptr<WTF::Closure>, | 134 std::unique_ptr<WTF::Closure>, |
134 long long delayMs) WARN_UNUSED_RETURN; | 135 long long delayMs) WARN_UNUSED_RETURN; |
135 }; | 136 }; |
136 | 137 |
137 } // namespace blink | 138 } // namespace blink |
138 | 139 |
139 #endif // WebTaskRunner_h | 140 #endif // WebTaskRunner_h |
OLD | NEW |