OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
6 #include "platform/scheduler/Scheduler.h" | 6 #include "platform/scheduler/Scheduler.h" |
7 | 7 |
8 #include "public/platform/Platform.h" | 8 #include "public/platform/Platform.h" |
9 #include "public/platform/WebScheduler.h" | 9 #include "public/platform/WebScheduler.h" |
10 #include "public/platform/WebTraceLocation.h" | 10 #include "public/platform/WebTraceLocation.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 if (m_webScheduler) | 58 if (m_webScheduler) |
59 m_webScheduler->shutdown(); | 59 m_webScheduler->shutdown(); |
60 } | 60 } |
61 | 61 |
62 void Scheduler::postIdleTask(const WebTraceLocation& location, PassOwnPtr<IdleTa
sk> idleTask) | 62 void Scheduler::postIdleTask(const WebTraceLocation& location, PassOwnPtr<IdleTa
sk> idleTask) |
63 { | 63 { |
64 if (m_webScheduler) | 64 if (m_webScheduler) |
65 m_webScheduler->postIdleTask(location, new IdleTaskRunner(idleTask)); | 65 m_webScheduler->postIdleTask(location, new IdleTaskRunner(idleTask)); |
66 } | 66 } |
67 | 67 |
| 68 void Scheduler::postIdleTaskAfterWakeup(const WebTraceLocation& location, PassOw
nPtr<IdleTask> idleTask) |
| 69 { |
| 70 if (m_webScheduler) |
| 71 m_webScheduler->postIdleTaskAfterWakeup(location, new IdleTaskRunner(idl
eTask)); |
| 72 } |
| 73 |
68 void Scheduler::postLoadingTask(const WebTraceLocation& location, WebThread::Tas
k* task) | 74 void Scheduler::postLoadingTask(const WebTraceLocation& location, WebThread::Tas
k* task) |
69 { | 75 { |
70 if (m_webScheduler) | 76 if (m_webScheduler) |
71 m_webScheduler->postLoadingTask(location, task); | 77 m_webScheduler->postLoadingTask(location, task); |
72 } | 78 } |
73 | 79 |
74 bool Scheduler::shouldYieldForHighPriorityWork() const | 80 bool Scheduler::shouldYieldForHighPriorityWork() const |
75 { | 81 { |
76 if (m_webScheduler) | 82 if (m_webScheduler) |
77 return m_webScheduler->shouldYieldForHighPriorityWork(); | 83 return m_webScheduler->shouldYieldForHighPriorityWork(); |
78 return false; | 84 return false; |
79 } | 85 } |
80 | 86 |
81 } // namespace blink | 87 } // namespace blink |
OLD | NEW |