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 #include "platform/scheduler/child/scheduler_tqm_delegate_impl.h" | 5 #include "platform/scheduler/child/scheduler_tqm_delegate_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 base::TimeDelta delay) { | 54 base::TimeDelta delay) { |
55 return message_loop_task_runner_->PostNonNestableDelayedTask( | 55 return message_loop_task_runner_->PostNonNestableDelayedTask( |
56 from_here, std::move(task), delay); | 56 from_here, std::move(task), delay); |
57 } | 57 } |
58 | 58 |
59 bool SchedulerTqmDelegateImpl::RunsTasksInCurrentSequence() const { | 59 bool SchedulerTqmDelegateImpl::RunsTasksInCurrentSequence() const { |
60 return message_loop_task_runner_->RunsTasksInCurrentSequence(); | 60 return message_loop_task_runner_->RunsTasksInCurrentSequence(); |
61 } | 61 } |
62 | 62 |
63 bool SchedulerTqmDelegateImpl::IsNested() const { | 63 bool SchedulerTqmDelegateImpl::IsNested() const { |
64 DCHECK(RunsTasksOnCurrentThread()); | 64 DCHECK(RunsTasksInCurrentSequence()); |
65 return base::RunLoop::IsNestedOnCurrentThread(); | 65 return base::RunLoop::IsNestedOnCurrentThread(); |
66 } | 66 } |
67 | 67 |
68 void SchedulerTqmDelegateImpl::AddNestingObserver( | 68 void SchedulerTqmDelegateImpl::AddNestingObserver( |
69 base::RunLoop::NestingObserver* observer) { | 69 base::RunLoop::NestingObserver* observer) { |
70 base::RunLoop::AddNestingObserverOnCurrentThread(observer); | 70 base::RunLoop::AddNestingObserverOnCurrentThread(observer); |
71 } | 71 } |
72 | 72 |
73 void SchedulerTqmDelegateImpl::RemoveNestingObserver( | 73 void SchedulerTqmDelegateImpl::RemoveNestingObserver( |
74 base::RunLoop::NestingObserver* observer) { | 74 base::RunLoop::NestingObserver* observer) { |
75 base::RunLoop::RemoveNestingObserverOnCurrentThread(observer); | 75 base::RunLoop::RemoveNestingObserverOnCurrentThread(observer); |
76 } | 76 } |
77 | 77 |
78 base::TimeTicks SchedulerTqmDelegateImpl::NowTicks() { | 78 base::TimeTicks SchedulerTqmDelegateImpl::NowTicks() { |
79 return time_source_->NowTicks(); | 79 return time_source_->NowTicks(); |
80 } | 80 } |
81 | 81 |
82 } // namespace scheduler | 82 } // namespace scheduler |
83 } // namespace blink | 83 } // namespace blink |
OLD | NEW |