| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 static bool isDeletedValue(TaskType value) { return value == static_cast<Tas
kType>(-2); } | 52 static bool isDeletedValue(TaskType value) { return value == static_cast<Tas
kType>(-2); } |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 class CORE_EXPORT TaskRunnerHelper final { | 55 class CORE_EXPORT TaskRunnerHelper final { |
| 56 STATIC_ONLY(TaskRunnerHelper); | 56 STATIC_ONLY(TaskRunnerHelper); |
| 57 public: | 57 public: |
| 58 static WebTaskRunner* get(TaskType, LocalFrame*); | 58 static WebTaskRunner* get(TaskType, LocalFrame*); |
| 59 static WebTaskRunner* get(TaskType, Document*); | 59 static WebTaskRunner* get(TaskType, Document*); |
| 60 static WebTaskRunner* get(TaskType, ExecutionContext*); | 60 static WebTaskRunner* get(TaskType, ExecutionContext*); |
| 61 static WebTaskRunner* get(TaskType, ScriptState*); | 61 static WebTaskRunner* get(TaskType, ScriptState*); |
| 62 | |
| 63 // TODO(haraken): Remove the following APIs. | |
| 64 static WebTaskRunner* getUnthrottledTaskRunner(LocalFrame*); | |
| 65 static WebTaskRunner* getTimerTaskRunner(LocalFrame*); | |
| 66 static WebTaskRunner* getLoadingTaskRunner(LocalFrame*); | |
| 67 static WebTaskRunner* getUnthrottledTaskRunner(Document*); | |
| 68 static WebTaskRunner* getTimerTaskRunner(Document*); | |
| 69 static WebTaskRunner* getLoadingTaskRunner(Document*); | |
| 70 static WebTaskRunner* getUnthrottledTaskRunner(ExecutionContext*); | |
| 71 static WebTaskRunner* getUnthrottledTaskRunner(ScriptState*); | |
| 72 }; | 62 }; |
| 73 | 63 |
| 74 } // namespace blink | 64 } // namespace blink |
| 75 | 65 |
| 76 #endif | 66 #endif |
| OLD | NEW |