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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/child/scheduler_tqm_delegate_for_test.h

Issue 2122543002: Replace Closure in TaskRunner::PostTask with OneShotCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@07_oneshot
Patch Set: fix Created 4 years, 3 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_TQM_DELEGAT E_FOR_TEST_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_TQM_DELEGAT E_FOR_TEST_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_TQM_DELEGAT E_FOR_TEST_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_TQM_DELEGAT E_FOR_TEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/test/simple_test_tick_clock.h" 11 #include "base/test/simple_test_tick_clock.h"
12 #include "platform/scheduler/child/scheduler_tqm_delegate.h" 12 #include "platform/scheduler/child/scheduler_tqm_delegate.h"
13 13
14 namespace blink { 14 namespace blink {
15 namespace scheduler { 15 namespace scheduler {
16 16
17 class TaskQueueManagerDelegateForTest; 17 class TaskQueueManagerDelegateForTest;
18 18
19 class SchedulerTqmDelegateForTest : public SchedulerTqmDelegate { 19 class SchedulerTqmDelegateForTest : public SchedulerTqmDelegate {
20 public: 20 public:
21 static scoped_refptr<SchedulerTqmDelegateForTest> Create( 21 static scoped_refptr<SchedulerTqmDelegateForTest> Create(
22 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 22 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
23 std::unique_ptr<base::TickClock> time_source); 23 std::unique_ptr<base::TickClock> time_source);
24 24
25 // SchedulerTqmDelegate implementation 25 // SchedulerTqmDelegate implementation
26 void SetDefaultTaskRunner( 26 void SetDefaultTaskRunner(
27 scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; 27 scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
28 void RestoreDefaultTaskRunner() override; 28 void RestoreDefaultTaskRunner() override;
29 bool PostDelayedTask(const tracked_objects::Location& from_here, 29 bool PostDelayedTask(const tracked_objects::Location& from_here,
30 const base::Closure& task, 30 base::OnceClosure tsk,
31 base::TimeDelta delay) override; 31 base::TimeDelta delay) override;
32 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 32 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
33 const base::Closure& task, 33 base::OnceClosure task,
34 base::TimeDelta delay) override; 34 base::TimeDelta delay) override;
35 bool RunsTasksOnCurrentThread() const override; 35 bool RunsTasksOnCurrentThread() const override;
36 bool IsNested() const override; 36 bool IsNested() const override;
37 void AddNestingObserver( 37 void AddNestingObserver(
38 base::MessageLoop::NestingObserver* observer) override; 38 base::MessageLoop::NestingObserver* observer) override;
39 void RemoveNestingObserver( 39 void RemoveNestingObserver(
40 base::MessageLoop::NestingObserver* observer) override; 40 base::MessageLoop::NestingObserver* observer) override;
41 base::TimeTicks NowTicks() override; 41 base::TimeTicks NowTicks() override;
42 42
43 base::SingleThreadTaskRunner* default_task_runner() const { 43 base::SingleThreadTaskRunner* default_task_runner() const {
(...skipping 12 matching lines...) Expand all
56 56
57 scoped_refptr<TaskQueueManagerDelegateForTest> task_runner_; 57 scoped_refptr<TaskQueueManagerDelegateForTest> task_runner_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(SchedulerTqmDelegateForTest); 59 DISALLOW_COPY_AND_ASSIGN(SchedulerTqmDelegateForTest);
60 }; 60 };
61 61
62 } // namespace scheduler 62 } // namespace scheduler
63 } // namespace blink 63 } // namespace blink
64 64
65 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_TQM_DELE GATE_FOR_TEST_H_ 65 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_TQM_DELE GATE_FOR_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698