diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:20:33 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:28:57 +0000 |
commit | d17ea114e5ef69ad5d5d7413280a13e6428098aa (patch) | |
tree | 2c01a75df69f30d27b1432467cfe7c1467a498da /chromium/third_party/blink/renderer/platform/scheduler/base/task_queue_manager_delegate_for_test.cc | |
parent | 8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (diff) | |
download | qtwebengine-chromium-d17ea114e5ef69ad5d5d7413280a13e6428098aa.tar.gz |
BASELINE: Update Chromium to 67.0.3396.47
Change-Id: Idcb1341782e417561a2473eeecc82642dafda5b7
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/scheduler/base/task_queue_manager_delegate_for_test.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/platform/scheduler/base/task_queue_manager_delegate_for_test.cc | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/platform/scheduler/base/task_queue_manager_delegate_for_test.cc b/chromium/third_party/blink/renderer/platform/scheduler/base/task_queue_manager_delegate_for_test.cc new file mode 100644 index 00000000000..e24c8827fdb --- /dev/null +++ b/chromium/third_party/blink/renderer/platform/scheduler/base/task_queue_manager_delegate_for_test.cc @@ -0,0 +1,65 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "third_party/blink/renderer/platform/scheduler/base/task_queue_manager_delegate_for_test.h" + +#include <utility> + +#include "base/bind.h" +#include "base/bind_helpers.h" + +namespace blink { +namespace scheduler { + +// static +scoped_refptr<TaskQueueManagerDelegateForTest> +TaskQueueManagerDelegateForTest::Create( + scoped_refptr<base::SingleThreadTaskRunner> task_runner, + const base::TickClock* time_source) { + return base::WrapRefCounted( + new TaskQueueManagerDelegateForTest(task_runner, time_source)); +} + +TaskQueueManagerDelegateForTest::TaskQueueManagerDelegateForTest( + scoped_refptr<base::SingleThreadTaskRunner> task_runner, + const base::TickClock* time_source) + : task_runner_(task_runner), time_source_(time_source) {} + +TaskQueueManagerDelegateForTest::~TaskQueueManagerDelegateForTest() {} + +bool TaskQueueManagerDelegateForTest::PostDelayedTask( + const base::Location& from_here, + base::OnceClosure task, + base::TimeDelta delay) { + return task_runner_->PostDelayedTask(from_here, std::move(task), delay); +} + +bool TaskQueueManagerDelegateForTest::PostNonNestableDelayedTask( + const base::Location& from_here, + base::OnceClosure task, + base::TimeDelta delay) { + return task_runner_->PostNonNestableDelayedTask(from_here, std::move(task), + delay); +} + +bool TaskQueueManagerDelegateForTest::RunsTasksInCurrentSequence() const { + return task_runner_->RunsTasksInCurrentSequence(); +} + +bool TaskQueueManagerDelegateForTest::IsNested() const { + return false; +} + +void TaskQueueManagerDelegateForTest::AddNestingObserver( + base::RunLoop::NestingObserver* observer) {} + +void TaskQueueManagerDelegateForTest::RemoveNestingObserver( + base::RunLoop::NestingObserver* observer) {} + +base::TimeTicks TaskQueueManagerDelegateForTest::NowTicks() const { + return time_source_->NowTicks(); +} + +} // namespace scheduler +} // namespace blink |