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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 if (m_webScheduler) | 63 if (m_webScheduler) |
64 m_webScheduler->shutdown(); | 64 m_webScheduler->shutdown(); |
65 } | 65 } |
66 | 66 |
67 void Scheduler::postIdleTask(const WebTraceLocation& location, PassOwnPtr<IdleTa
sk> idleTask) | 67 void Scheduler::postIdleTask(const WebTraceLocation& location, PassOwnPtr<IdleTa
sk> idleTask) |
68 { | 68 { |
69 if (m_webScheduler) | 69 if (m_webScheduler) |
70 m_webScheduler->postIdleTask(location, new IdleTaskRunner(idleTask)); | 70 m_webScheduler->postIdleTask(location, new IdleTaskRunner(idleTask)); |
71 } | 71 } |
72 | 72 |
| 73 void Scheduler::postNonNestableIdleTask(const WebTraceLocation& location, PassOw
nPtr<IdleTask> idleTask) |
| 74 { |
| 75 if (m_webScheduler) |
| 76 m_webScheduler->postNonNestableIdleTask(location, new IdleTaskRunner(idl
eTask)); |
| 77 } |
| 78 |
73 void Scheduler::postIdleTaskAfterWakeup(const WebTraceLocation& location, PassOw
nPtr<IdleTask> idleTask) | 79 void Scheduler::postIdleTaskAfterWakeup(const WebTraceLocation& location, PassOw
nPtr<IdleTask> idleTask) |
74 { | 80 { |
75 if (m_webScheduler) | 81 if (m_webScheduler) |
76 m_webScheduler->postIdleTaskAfterWakeup(location, new IdleTaskRunner(idl
eTask)); | 82 m_webScheduler->postIdleTaskAfterWakeup(location, new IdleTaskRunner(idl
eTask)); |
77 } | 83 } |
78 | 84 |
79 void Scheduler::postLoadingTask(const WebTraceLocation& location, WebThread::Tas
k* task) | 85 void Scheduler::postLoadingTask(const WebTraceLocation& location, WebThread::Tas
k* task) |
80 { | 86 { |
81 if (m_webScheduler) | 87 if (m_webScheduler) |
82 m_webScheduler->postLoadingTask(location, task); | 88 m_webScheduler->postLoadingTask(location, task); |
83 } | 89 } |
84 | 90 |
85 bool Scheduler::shouldYieldForHighPriorityWork() const | 91 bool Scheduler::shouldYieldForHighPriorityWork() const |
86 { | 92 { |
87 if (m_webScheduler) | 93 if (m_webScheduler) |
88 return m_webScheduler->shouldYieldForHighPriorityWork(); | 94 return m_webScheduler->shouldYieldForHighPriorityWork(); |
89 return false; | 95 return false; |
90 } | 96 } |
91 | 97 |
92 } // namespace blink | 98 } // namespace blink |
OLD | NEW |