OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "base/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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 | 744 |
745 //------------------------------------------------------------------------------ | 745 //------------------------------------------------------------------------------ |
746 // MessageLoopForIO | 746 // MessageLoopForIO |
747 | 747 |
748 #if defined(OS_WIN) | 748 #if defined(OS_WIN) |
749 | 749 |
750 void MessageLoopForIO::RegisterIOHandler(HANDLE file, IOHandler* handler) { | 750 void MessageLoopForIO::RegisterIOHandler(HANDLE file, IOHandler* handler) { |
751 pump_io()->RegisterIOHandler(file, handler); | 751 pump_io()->RegisterIOHandler(file, handler); |
752 } | 752 } |
753 | 753 |
| 754 bool MessageLoopForIO::RegisterJobObject(HANDLE job, IOHandler* handler) { |
| 755 return pump_io()->RegisterJobObject(job, handler); |
| 756 } |
| 757 |
754 bool MessageLoopForIO::WaitForIOCompletion(DWORD timeout, IOHandler* filter) { | 758 bool MessageLoopForIO::WaitForIOCompletion(DWORD timeout, IOHandler* filter) { |
755 return pump_io()->WaitForIOCompletion(timeout, filter); | 759 return pump_io()->WaitForIOCompletion(timeout, filter); |
756 } | 760 } |
757 | 761 |
758 #elif defined(OS_POSIX) && !defined(OS_NACL) | 762 #elif defined(OS_POSIX) && !defined(OS_NACL) |
759 | 763 |
760 bool MessageLoopForIO::WatchFileDescriptor(int fd, | 764 bool MessageLoopForIO::WatchFileDescriptor(int fd, |
761 bool persistent, | 765 bool persistent, |
762 Mode mode, | 766 Mode mode, |
763 FileDescriptorWatcher *controller, | 767 FileDescriptorWatcher *controller, |
764 Watcher *delegate) { | 768 Watcher *delegate) { |
765 return pump_libevent()->WatchFileDescriptor( | 769 return pump_libevent()->WatchFileDescriptor( |
766 fd, | 770 fd, |
767 persistent, | 771 persistent, |
768 static_cast<base::MessagePumpLibevent::Mode>(mode), | 772 static_cast<base::MessagePumpLibevent::Mode>(mode), |
769 controller, | 773 controller, |
770 delegate); | 774 delegate); |
771 } | 775 } |
772 | 776 |
773 #endif | 777 #endif |
OLD | NEW |