| 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 "WebCommon.h" | 8 #include "WebCommon.h" |
| 9 #include "public/platform/WebTraceLocation.h" |
| 9 | 10 |
| 10 #ifdef INSIDE_BLINK | 11 #ifdef INSIDE_BLINK |
| 11 #include "wtf/Functional.h" | 12 #include "wtf/Functional.h" |
| 12 #include "wtf/PtrUtil.h" | 13 #include "wtf/PtrUtil.h" |
| 13 #include <memory> | 14 #include <memory> |
| 14 #endif | 15 #endif |
| 15 | 16 |
| 16 namespace blink { | 17 namespace blink { |
| 17 | 18 |
| 18 class WebTraceLocation; | |
| 19 | |
| 20 // The blink representation of a chromium SingleThreadTaskRunner. | 19 // The blink representation of a chromium SingleThreadTaskRunner. |
| 21 class BLINK_PLATFORM_EXPORT WebTaskRunner { | 20 class BLINK_PLATFORM_EXPORT WebTaskRunner { |
| 22 public: | 21 public: |
| 23 virtual ~WebTaskRunner() {} | 22 virtual ~WebTaskRunner() {} |
| 24 | 23 |
| 25 class BLINK_PLATFORM_EXPORT Task { | 24 class BLINK_PLATFORM_EXPORT Task { |
| 26 public: | 25 public: |
| 27 virtual ~Task() { } | 26 virtual ~Task() { } |
| 28 virtual void run() = 0; | 27 virtual void run() = 0; |
| 29 }; | 28 }; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 std::unique_ptr<WebTaskRunner> adoptClone() | 70 std::unique_ptr<WebTaskRunner> adoptClone() |
| 72 { | 71 { |
| 73 return wrapUnique(clone()); | 72 return wrapUnique(clone()); |
| 74 } | 73 } |
| 75 #endif | 74 #endif |
| 76 }; | 75 }; |
| 77 | 76 |
| 78 } // namespace blink | 77 } // namespace blink |
| 79 | 78 |
| 80 #endif // WebTaskRunner_h | 79 #endif // WebTaskRunner_h |
| OLD | NEW |