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

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

Issue 987193002: Redirect the MessageLoop's task runner to the renderer scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 5 months 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
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 "components/scheduler/child/nestable_single_thread_task_runner.h" 8 #include "components/scheduler/child/nestable_single_thread_task_runner.h"
9 9
10 namespace scheduler { 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);
18
19 // NestableSingleThreadTaskRunner implementation 17 // NestableSingleThreadTaskRunner implementation
20 bool PostDelayedTask(const tracked_objects::Location& from_here, 18 bool PostDelayedTask(const tracked_objects::Location& from_here,
21 const base::Closure& task, 19 const base::Closure& task,
22 base::TimeDelta delay) override; 20 base::TimeDelta delay) override;
23 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 21 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
24 const base::Closure& task, 22 const base::Closure& task,
25 base::TimeDelta delay) override; 23 base::TimeDelta delay) override;
26 bool RunsTasksOnCurrentThread() const override; 24 bool RunsTasksOnCurrentThread() const override;
27 bool IsNested() const override; 25 bool IsNested() const override;
28 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; 26 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override;
(...skipping 16 matching lines...) Expand all
45 43
46 base::WeakPtr<NestableTaskRunnerForTest> weak_nestable_task_runner_ptr_; 44 base::WeakPtr<NestableTaskRunnerForTest> weak_nestable_task_runner_ptr_;
47 base::WeakPtrFactory<NestableTaskRunnerForTest> weak_factory_; 45 base::WeakPtrFactory<NestableTaskRunnerForTest> weak_factory_;
48 46
49 DISALLOW_COPY_AND_ASSIGN(NestableTaskRunnerForTest); 47 DISALLOW_COPY_AND_ASSIGN(NestableTaskRunnerForTest);
50 }; 48 };
51 49
52 } // namespace scheduler 50 } // namespace scheduler
53 51
54 #endif // CONTENT_RENDERER_SCHEDULER_NESTABLE_TASK_RUNNER_FOR_TEST_H_ 52 #endif // CONTENT_RENDERER_SCHEDULER_NESTABLE_TASK_RUNNER_FOR_TEST_H_
OLDNEW
« no previous file with comments | « components/scheduler/child/idle_helper_unittest.cc ('k') | components/scheduler/child/nestable_task_runner_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698