| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 // A set of helper functions to get a WebTaskRunner for TaskType and a context | 74 // A set of helper functions to get a WebTaskRunner for TaskType and a context |
| 75 // object. The posted tasks are guaranteed to run in a sequence if they have the | 75 // object. The posted tasks are guaranteed to run in a sequence if they have the |
| 76 // same TaskType and the context objects belong to the same frame. | 76 // same TaskType and the context objects belong to the same frame. |
| 77 class CORE_EXPORT TaskRunnerHelper final { | 77 class CORE_EXPORT TaskRunnerHelper final { |
| 78 STATIC_ONLY(TaskRunnerHelper); | 78 STATIC_ONLY(TaskRunnerHelper); |
| 79 | 79 |
| 80 public: | 80 public: |
| 81 static WebTaskRunner* get(TaskType, LocalFrame*); | 81 static RefPtr<WebTaskRunner> get(TaskType, LocalFrame*); |
| 82 static WebTaskRunner* get(TaskType, Document*); | 82 static RefPtr<WebTaskRunner> get(TaskType, Document*); |
| 83 static WebTaskRunner* get(TaskType, ExecutionContext*); | 83 static RefPtr<WebTaskRunner> get(TaskType, ExecutionContext*); |
| 84 static WebTaskRunner* get(TaskType, ScriptState*); | 84 static RefPtr<WebTaskRunner> get(TaskType, ScriptState*); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace blink | 87 } // namespace blink |
| 88 | 88 |
| 89 #endif | 89 #endif |
| OLD | NEW |