| 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 "platform/TestingPlatformSupport.h" | 8 #include "platform/TestingPlatformSupport.h" |
| 9 #include "platform/TraceLocation.h" | 9 #include "platform/TraceLocation.h" |
| 10 #include "public/platform/Platform.h" | 10 #include "public/platform/Platform.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 virtual void enterRunLoop() OVERRIDE | 37 virtual void enterRunLoop() OVERRIDE |
| 38 { | 38 { |
| 39 ASSERT_NOT_REACHED(); | 39 ASSERT_NOT_REACHED(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 virtual void exitRunLoop() OVERRIDE | 42 virtual void exitRunLoop() OVERRIDE |
| 43 { | 43 { |
| 44 ASSERT_NOT_REACHED(); | 44 ASSERT_NOT_REACHED(); |
| 45 } | 45 } |
| 46 | |
| 47 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction)
OVERRIDE | |
| 48 { | |
| 49 ASSERT_NOT_REACHED(); | |
| 50 } | |
| 51 | |
| 52 virtual void setSharedTimerFireInterval(double interval) OVERRIDE | |
| 53 { | |
| 54 ASSERT_NOT_REACHED(); | |
| 55 } | |
| 56 | |
| 57 virtual void stopSharedTimer() OVERRIDE | |
| 58 { | |
| 59 ASSERT_NOT_REACHED(); | |
| 60 } | |
| 61 | 46 |
| 62 void runPendingTasks() | 47 void runPendingTasks() |
| 63 { | 48 { |
| 64 while (!m_pendingTasks.isEmpty()) | 49 while (!m_pendingTasks.isEmpty()) |
| 65 m_pendingTasks.takeFirst()->run(); | 50 m_pendingTasks.takeFirst()->run(); |
| 66 } | 51 } |
| 67 | 52 |
| 68 private: | 53 private: |
| 69 WTF::Deque<OwnPtr<Task> > m_pendingTasks; | 54 WTF::Deque<OwnPtr<Task> > m_pendingTasks; |
| 70 }; | 55 }; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 int result = 0; | 203 int result = 0; |
| 219 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); | 204 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); |
| 220 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); | 205 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); |
| 221 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); | 206 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); |
| 222 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); | 207 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); |
| 223 runPendingTasks(); | 208 runPendingTasks(); |
| 224 EXPECT_EQ(4, result); | 209 EXPECT_EQ(4, result); |
| 225 } | 210 } |
| 226 | 211 |
| 227 } // namespace | 212 } // namespace |
| OLD | NEW |