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 <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 // MessageLoopForUI | 702 // MessageLoopForUI |
703 | 703 |
704 MessageLoopForUI::MessageLoopForUI(std::unique_ptr<MessagePump> pump) | 704 MessageLoopForUI::MessageLoopForUI(std::unique_ptr<MessagePump> pump) |
705 : MessageLoop(TYPE_UI, Bind(&ReturnPump, Passed(&pump))) {} | 705 : MessageLoop(TYPE_UI, Bind(&ReturnPump, Passed(&pump))) {} |
706 | 706 |
707 #if defined(OS_ANDROID) | 707 #if defined(OS_ANDROID) |
708 void MessageLoopForUI::Start() { | 708 void MessageLoopForUI::Start() { |
709 // No Histogram support for UI message loop as it is managed by Java side | 709 // No Histogram support for UI message loop as it is managed by Java side |
710 static_cast<MessagePumpForUI*>(pump_.get())->Start(this); | 710 static_cast<MessagePumpForUI*>(pump_.get())->Start(this); |
711 } | 711 } |
| 712 |
| 713 void MessageLoopForUI::StartForTesting( |
| 714 base::android::JavaMessageHandlerFactory* factory, |
| 715 WaitableEvent* test_done_event) { |
| 716 // No Histogram support for UI message loop as it is managed by Java side |
| 717 static_cast<MessagePumpForUI*>(pump_.get()) |
| 718 ->StartForUnitTest(this, factory, test_done_event); |
| 719 } |
| 720 |
| 721 void MessageLoopForUI::Abort() { |
| 722 static_cast<MessagePumpForUI*>(pump_.get())->Abort(); |
| 723 } |
712 #endif | 724 #endif |
713 | 725 |
714 #if defined(OS_IOS) | 726 #if defined(OS_IOS) |
715 void MessageLoopForUI::Attach() { | 727 void MessageLoopForUI::Attach() { |
716 static_cast<MessagePumpUIApplication*>(pump_.get())->Attach(this); | 728 static_cast<MessagePumpUIApplication*>(pump_.get())->Attach(this); |
717 } | 729 } |
718 #endif | 730 #endif |
719 | 731 |
720 #if defined(USE_OZONE) || (defined(USE_X11) && !defined(USE_GLIB)) | 732 #if defined(USE_OZONE) || (defined(USE_X11) && !defined(USE_GLIB)) |
721 bool MessageLoopForUI::WatchFileDescriptor( | 733 bool MessageLoopForUI::WatchFileDescriptor( |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 persistent, | 775 persistent, |
764 mode, | 776 mode, |
765 controller, | 777 controller, |
766 delegate); | 778 delegate); |
767 } | 779 } |
768 #endif | 780 #endif |
769 | 781 |
770 #endif // !defined(OS_NACL_SFI) | 782 #endif // !defined(OS_NACL_SFI) |
771 | 783 |
772 } // namespace base | 784 } // namespace base |
OLD | NEW |