| 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 #include "core/dom/TaskRunnerHelper.h" | 5 #include "core/dom/TaskRunnerHelper.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "public/platform/Platform.h" | 9 #include "public/platform/Platform.h" |
| 10 #include "public/platform/WebFrameScheduler.h" | 10 #include "public/platform/WebFrameScheduler.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 WebTaskRunner* TaskRunnerHelper::getTimerTaskRunner(Document* document) | 36 WebTaskRunner* TaskRunnerHelper::getTimerTaskRunner(Document* document) |
| 37 { | 37 { |
| 38 return getTimerTaskRunner(document ? document->frame() : nullptr); | 38 return getTimerTaskRunner(document ? document->frame() : nullptr); |
| 39 } | 39 } |
| 40 | 40 |
| 41 WebTaskRunner* TaskRunnerHelper::getLoadingTaskRunner(Document* document) | 41 WebTaskRunner* TaskRunnerHelper::getLoadingTaskRunner(Document* document) |
| 42 { | 42 { |
| 43 return getLoadingTaskRunner(document ? document->frame() : nullptr); | 43 return getLoadingTaskRunner(document ? document->frame() : nullptr); |
| 44 } | 44 } |
| 45 | 45 |
| 46 WebTaskRunner* TaskRunnerHelper::getUnthrottledTaskRunner(ExecutionContext* exec
utionContext) |
| 47 { |
| 48 return getUnthrottledTaskRunner(executionContext && executionContext->isDocu
ment() ? static_cast<Document*>(executionContext) : nullptr); |
| 49 } |
| 50 |
| 51 WebTaskRunner* TaskRunnerHelper::getUnthrottledTaskRunner(ScriptState* scriptSta
te) |
| 52 { |
| 53 return getUnthrottledTaskRunner(scriptState ? scriptState->getExecutionConte
xt() : nullptr); |
| 54 } |
| 55 |
| 46 } // namespace blink | 56 } // namespace blink |
| OLD | NEW |