Avi Drissman | 468e51b6 | 2022-09-13 20:47:01 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors |
Andreas Haas | c13cae8 | 2017-11-16 12:54:38 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "v8_foreground_task_runner_base.h" |
| 6 | |
| 7 | namespace gin { |
| 8 | |
Chris Watkins | 756035a | 2017-12-01 03:03:27 | [diff] [blame] | 9 | V8ForegroundTaskRunnerBase::V8ForegroundTaskRunnerBase() = default; |
Andreas Haas | c13cae8 | 2017-11-16 12:54:38 | [diff] [blame] | 10 | |
Chris Watkins | 756035a | 2017-12-01 03:03:27 | [diff] [blame] | 11 | V8ForegroundTaskRunnerBase::~V8ForegroundTaskRunnerBase() = default; |
Andreas Haas | c13cae8 | 2017-11-16 12:54:38 | [diff] [blame] | 12 | |
| 13 | void V8ForegroundTaskRunnerBase::EnableIdleTasks( |
| 14 | std::unique_ptr<V8IdleTaskRunner> idle_task_runner) { |
| 15 | idle_task_runner_ = std::move(idle_task_runner); |
| 16 | } |
| 17 | |
| 18 | bool V8ForegroundTaskRunnerBase::IdleTasksEnabled() { |
| 19 | return idle_task_runner() != nullptr; |
| 20 | } |
| 21 | |
| 22 | } // namespace gin |