| 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 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 // for some tasks. | 633 // for some tasks. |
| 634 bool high_res = pending_high_res_tasks_ > 0; | 634 bool high_res = pending_high_res_tasks_ > 0; |
| 635 if (high_res != in_high_res_mode_) { | 635 if (high_res != in_high_res_mode_) { |
| 636 in_high_res_mode_ = high_res; | 636 in_high_res_mode_ = high_res; |
| 637 Time::ActivateHighResolutionTimer(in_high_res_mode_); | 637 Time::ActivateHighResolutionTimer(in_high_res_mode_); |
| 638 } | 638 } |
| 639 #endif | 639 #endif |
| 640 return false; | 640 return false; |
| 641 } | 641 } |
| 642 | 642 |
| 643 TimeTicks MessageLoop::GetNewlyAddedTaskDelay() { | |
| 644 return incoming_task_queue_->GetNewlyAddedTaskDelay(); | |
| 645 } | |
| 646 | |
| 647 void MessageLoop::DeleteSoonInternal(const tracked_objects::Location& from_here, | 643 void MessageLoop::DeleteSoonInternal(const tracked_objects::Location& from_here, |
| 648 void(*deleter)(const void*), | 644 void(*deleter)(const void*), |
| 649 const void* object) { | 645 const void* object) { |
| 650 PostNonNestableTask(from_here, Bind(deleter, object)); | 646 PostNonNestableTask(from_here, Bind(deleter, object)); |
| 651 } | 647 } |
| 652 | 648 |
| 653 void MessageLoop::ReleaseSoonInternal( | 649 void MessageLoop::ReleaseSoonInternal( |
| 654 const tracked_objects::Location& from_here, | 650 const tracked_objects::Location& from_here, |
| 655 void(*releaser)(const void*), | 651 void(*releaser)(const void*), |
| 656 const void* object) { | 652 const void* object) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 persistent, | 725 persistent, |
| 730 mode, | 726 mode, |
| 731 controller, | 727 controller, |
| 732 delegate); | 728 delegate); |
| 733 } | 729 } |
| 734 #endif | 730 #endif |
| 735 | 731 |
| 736 #endif // !defined(OS_NACL_SFI) | 732 #endif // !defined(OS_NACL_SFI) |
| 737 | 733 |
| 738 } // namespace base | 734 } // namespace base |
| OLD | NEW |