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 COMPONENTS_SCHEDULER_CHILD_SCHEDULER_TQM_DELEGATE_IMPL_H_ | 5 #ifndef COMPONENTS_SCHEDULER_CHILD_SCHEDULER_TQM_DELEGATE_IMPL_H_ |
6 #define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_TQM_DELEGATE_IMPL_H_ | 6 #define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_TQM_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/time/tick_clock.h" | 10 #include "base/time/tick_clock.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 bool PostDelayedTask(const tracked_objects::Location& from_here, | 27 bool PostDelayedTask(const tracked_objects::Location& from_here, |
28 const base::Closure& task, | 28 const base::Closure& task, |
29 base::TimeDelta delay) override; | 29 base::TimeDelta delay) override; |
30 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 30 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
31 const base::Closure& task, | 31 const base::Closure& task, |
32 base::TimeDelta delay) override; | 32 base::TimeDelta delay) override; |
33 bool RunsTasksOnCurrentThread() const override; | 33 bool RunsTasksOnCurrentThread() const override; |
34 bool IsNested() const override; | 34 bool IsNested() const override; |
35 base::TimeTicks NowTicks() override; | 35 base::TimeTicks NowTicks() override; |
36 void OnNoMoreImmediateWork() override; | 36 void OnNoMoreImmediateWork() override; |
| 37 double CurrentTimeSeconds() const override; |
37 | 38 |
38 protected: | 39 protected: |
39 ~SchedulerTqmDelegateImpl() override; | 40 ~SchedulerTqmDelegateImpl() override; |
40 | 41 |
41 private: | 42 private: |
42 SchedulerTqmDelegateImpl(base::MessageLoop* message_loop, | 43 SchedulerTqmDelegateImpl(base::MessageLoop* message_loop, |
43 scoped_ptr<base::TickClock> time_source); | 44 scoped_ptr<base::TickClock> time_source); |
44 | 45 |
45 // Not owned. | 46 // Not owned. |
46 base::MessageLoop* message_loop_; | 47 base::MessageLoop* message_loop_; |
47 scoped_refptr<SingleThreadTaskRunner> message_loop_task_runner_; | 48 scoped_refptr<SingleThreadTaskRunner> message_loop_task_runner_; |
48 scoped_ptr<base::TickClock> time_source_; | 49 scoped_ptr<base::TickClock> time_source_; |
49 | 50 |
50 DISALLOW_COPY_AND_ASSIGN(SchedulerTqmDelegateImpl); | 51 DISALLOW_COPY_AND_ASSIGN(SchedulerTqmDelegateImpl); |
51 }; | 52 }; |
52 | 53 |
53 } // namespace scheduler | 54 } // namespace scheduler |
54 | 55 |
55 #endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_TQM_DELEGATE_IMPL_H_ | 56 #endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_TQM_DELEGATE_IMPL_H_ |
OLD | NEW |