| 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 MessagePumpLibevent::Watcher *delegate) { | 701 MessagePumpLibevent::Watcher *delegate) { |
| 702 return static_cast<MessagePumpLibevent*>(pump_.get())->WatchFileDescriptor( | 702 return static_cast<MessagePumpLibevent*>(pump_.get())->WatchFileDescriptor( |
| 703 fd, | 703 fd, |
| 704 persistent, | 704 persistent, |
| 705 mode, | 705 mode, |
| 706 controller, | 706 controller, |
| 707 delegate); | 707 delegate); |
| 708 } | 708 } |
| 709 #endif | 709 #endif |
| 710 | 710 |
| 711 #if defined(USE_X11) |
| 712 void MessageLoopForUI::SetEventSource( |
| 713 MessagePumpLibevent::EventSource* event_source) { |
| 714 static_cast<MessagePumpLibevent*>(pump_.get())->SetEventSource(event_source); |
| 715 } |
| 716 |
| 717 void MessageLoopForUI::ClearEventSource() { |
| 718 static_cast<MessagePumpLibevent*>(pump_.get())->ClearEventSource(); |
| 719 } |
| 720 #endif |
| 721 |
| 711 #endif // !defined(OS_NACL) | 722 #endif // !defined(OS_NACL) |
| 712 | 723 |
| 713 //------------------------------------------------------------------------------ | 724 //------------------------------------------------------------------------------ |
| 714 // MessageLoopForIO | 725 // MessageLoopForIO |
| 715 | 726 |
| 716 #if !defined(OS_NACL_SFI) | 727 #if !defined(OS_NACL_SFI) |
| 717 void MessageLoopForIO::AddIOObserver( | 728 void MessageLoopForIO::AddIOObserver( |
| 718 MessageLoopForIO::IOObserver* io_observer) { | 729 MessageLoopForIO::IOObserver* io_observer) { |
| 719 ToPumpIO(pump_.get())->AddIOObserver(io_observer); | 730 ToPumpIO(pump_.get())->AddIOObserver(io_observer); |
| 720 } | 731 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 747 persistent, | 758 persistent, |
| 748 mode, | 759 mode, |
| 749 controller, | 760 controller, |
| 750 delegate); | 761 delegate); |
| 751 } | 762 } |
| 752 #endif | 763 #endif |
| 753 | 764 |
| 754 #endif // !defined(OS_NACL_SFI) | 765 #endif // !defined(OS_NACL_SFI) |
| 755 | 766 |
| 756 } // namespace base | 767 } // namespace base |
| OLD | NEW |