OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_RENDERER_SCHEDULER_NESTABLE_TASK_RUNNER_FOR_TEST_H_ | 5 #ifndef CONTENT_RENDERER_SCHEDULER_NESTABLE_TASK_RUNNER_FOR_TEST_H_ |
6 #define CONTENT_RENDERER_SCHEDULER_NESTABLE_TASK_RUNNER_FOR_TEST_H_ | 6 #define CONTENT_RENDERER_SCHEDULER_NESTABLE_TASK_RUNNER_FOR_TEST_H_ |
7 | 7 |
8 #include "content/child/scheduler/nestable_single_thread_task_runner.h" | 8 #include "components/scheduler/child/nestable_single_thread_task_runner.h" |
9 | 9 |
10 namespace content { | 10 namespace scheduler { |
11 | 11 |
12 class NestableTaskRunnerForTest : public NestableSingleThreadTaskRunner { | 12 class NestableTaskRunnerForTest : public NestableSingleThreadTaskRunner { |
13 public: | 13 public: |
14 static scoped_refptr<NestableTaskRunnerForTest> Create( | 14 static scoped_refptr<NestableTaskRunnerForTest> Create( |
15 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 15 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
16 | 16 |
17 void SetNested(bool is_nested); | 17 void SetNested(bool is_nested); |
18 | 18 |
19 // NestableSingleThreadTaskRunner implementation | 19 // NestableSingleThreadTaskRunner implementation |
20 bool PostDelayedTask(const tracked_objects::Location& from_here, | 20 bool PostDelayedTask(const tracked_objects::Location& from_here, |
(...skipping 11 matching lines...) Expand all Loading... |
32 private: | 32 private: |
33 NestableTaskRunnerForTest( | 33 NestableTaskRunnerForTest( |
34 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 34 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
35 | 35 |
36 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 36 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
37 bool is_nested_; | 37 bool is_nested_; |
38 | 38 |
39 DISALLOW_COPY_AND_ASSIGN(NestableTaskRunnerForTest); | 39 DISALLOW_COPY_AND_ASSIGN(NestableTaskRunnerForTest); |
40 }; | 40 }; |
41 | 41 |
42 } // namespace content | 42 } // namespace scheduler |
43 | 43 |
44 #endif // CONTENT_RENDERER_SCHEDULER_NESTABLE_TASK_RUNNER_FOR_TEST_H_ | 44 #endif // CONTENT_RENDERER_SCHEDULER_NESTABLE_TASK_RUNNER_FOR_TEST_H_ |
OLD | NEW |