OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 TaskRunnerHelper_h | 5 #ifndef TaskRunnerHelper_h |
6 #define TaskRunnerHelper_h | 6 #define TaskRunnerHelper_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
10 #include "wtf/HashTraits.h" | 10 #include "wtf/HashTraits.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 } | 57 } |
58 static bool isDeletedValue(TaskType value) { | 58 static bool isDeletedValue(TaskType value) { |
59 return value == static_cast<TaskType>(-2); | 59 return value == static_cast<TaskType>(-2); |
60 } | 60 } |
61 }; | 61 }; |
62 | 62 |
63 class CORE_EXPORT TaskRunnerHelper final { | 63 class CORE_EXPORT TaskRunnerHelper final { |
64 STATIC_ONLY(TaskRunnerHelper); | 64 STATIC_ONLY(TaskRunnerHelper); |
65 | 65 |
66 public: | 66 public: |
67 static WebTaskRunner* get(TaskType, LocalFrame*); | 67 static RefPtr<WebTaskRunner> get(TaskType, LocalFrame*); |
68 static WebTaskRunner* get(TaskType, Document*); | 68 static RefPtr<WebTaskRunner> get(TaskType, Document*); |
69 static WebTaskRunner* get(TaskType, ExecutionContext*); | 69 static RefPtr<WebTaskRunner> get(TaskType, ExecutionContext*); |
70 static WebTaskRunner* get(TaskType, ScriptState*); | 70 static RefPtr<WebTaskRunner> get(TaskType, ScriptState*); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace blink | 73 } // namespace blink |
74 | 74 |
75 #endif | 75 #endif |
OLD | NEW |