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