OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 #else | 469 #else |
470 incoming_task_queue_->ReloadWorkQueue(&work_queue_); | 470 incoming_task_queue_->ReloadWorkQueue(&work_queue_); |
471 #endif | 471 #endif |
472 } | 472 } |
473 } | 473 } |
474 | 474 |
475 void MessageLoop::ScheduleWork() { | 475 void MessageLoop::ScheduleWork() { |
476 pump_->ScheduleWork(); | 476 pump_->ScheduleWork(); |
477 } | 477 } |
478 | 478 |
479 #if defined(OS_WIN) | |
480 bool MessageLoop::MessagePumpWasSignaled() { | |
481 return pump_->WasSignaled(); | |
482 } | |
483 #endif | |
484 | |
485 void MessageLoop::NotifyBeginNestedLoop() { | 479 void MessageLoop::NotifyBeginNestedLoop() { |
486 FOR_EACH_OBSERVER(NestingObserver, nesting_observers_, | 480 FOR_EACH_OBSERVER(NestingObserver, nesting_observers_, |
487 OnBeginNestedMessageLoop()); | 481 OnBeginNestedMessageLoop()); |
488 } | 482 } |
489 | 483 |
490 bool MessageLoop::DoWork() { | 484 bool MessageLoop::DoWork() { |
491 if (!nestable_tasks_allowed_) { | 485 if (!nestable_tasks_allowed_) { |
492 // Task can't be executed right now. | 486 // Task can't be executed right now. |
493 return false; | 487 return false; |
494 } | 488 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 persistent, | 646 persistent, |
653 mode, | 647 mode, |
654 controller, | 648 controller, |
655 delegate); | 649 delegate); |
656 } | 650 } |
657 #endif | 651 #endif |
658 | 652 |
659 #endif // !defined(OS_NACL_SFI) | 653 #endif // !defined(OS_NACL_SFI) |
660 | 654 |
661 } // namespace base | 655 } // namespace base |
OLD | NEW |