Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: components/scheduler/base/nestable_task_runner_for_test.h

Issue 1424053002: Adds a flag to support "Virtual Time" to the blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_SCHEDULER_BASE_NESTABLE_TASK_RUNNER_FOR_TEST_H_
6 #define CONTENT_RENDERER_SCHEDULER_BASE_NESTABLE_TASK_RUNNER_FOR_TEST_H_
7
8 #include "components/scheduler/base/nestable_single_thread_task_runner.h"
9
10 namespace scheduler {
11
12 class NestableTaskRunnerForTest : public NestableSingleThreadTaskRunner {
13 public:
14 static scoped_refptr<NestableTaskRunnerForTest> Create(
15 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
16
17 // NestableSingleThreadTaskRunner implementation
18 bool PostDelayedTask(const tracked_objects::Location& from_here,
19 const base::Closure& task,
20 base::TimeDelta delay) override;
21 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
22 const base::Closure& task,
23 base::TimeDelta delay) override;
24 bool RunsTasksOnCurrentThread() const override;
25 bool IsNested() const override;
26
27 protected:
28 ~NestableTaskRunnerForTest() override;
29 NestableTaskRunnerForTest(
30 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
31
32 private:
33 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
34
35 DISALLOW_COPY_AND_ASSIGN(NestableTaskRunnerForTest);
36 };
37
38 } // namespace scheduler
39
40 #endif // CONTENT_RENDERER_SCHEDULER_BASE_NESTABLE_TASK_RUNNER_FOR_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698