OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 void MessageLoopForIO::RegisterIOHandler(HANDLE file, IOHandler* handler) { | 586 void MessageLoopForIO::RegisterIOHandler(HANDLE file, IOHandler* handler) { |
587 pump_io()->RegisterIOHandler(file, handler); | 587 pump_io()->RegisterIOHandler(file, handler); |
588 } | 588 } |
589 | 589 |
590 bool MessageLoopForIO::WaitForIOCompletion(DWORD timeout, IOHandler* filter) { | 590 bool MessageLoopForIO::WaitForIOCompletion(DWORD timeout, IOHandler* filter) { |
591 return pump_io()->WaitForIOCompletion(timeout, filter); | 591 return pump_io()->WaitForIOCompletion(timeout, filter); |
592 } | 592 } |
593 | 593 |
594 #elif defined(OS_POSIX) | 594 #elif defined(OS_POSIX) |
595 | 595 |
596 void MessageLoopForIO::WatchSocket(int socket, short interest_mask, | 596 bool MessageLoopForIO::WatchFileDescriptor(int fd, |
597 struct event* e, Watcher* watcher) { | 597 bool persistent, |
598 pump_libevent()->WatchSocket(socket, interest_mask, e, watcher); | 598 Mode mode, |
| 599 FileDescriptorWatcher *controller, |
| 600 Watcher *delegate) { |
| 601 return pump_libevent()->WatchFileDescriptor( |
| 602 fd, |
| 603 persistent, |
| 604 static_cast<base::MessagePumpLibevent::Mode>(mode), |
| 605 controller, |
| 606 delegate); |
599 } | 607 } |
600 | 608 |
601 void MessageLoopForIO::WatchFileHandle(int fd, short interest_mask, | |
602 struct event* e, FileWatcher* watcher) { | |
603 pump_libevent()->WatchFileHandle(fd, interest_mask, e, watcher); | |
604 } | |
605 | |
606 | |
607 void MessageLoopForIO::UnwatchSocket(struct event* e) { | |
608 pump_libevent()->UnwatchSocket(e); | |
609 } | |
610 | |
611 void MessageLoopForIO::UnwatchFileHandle(struct event* e) { | |
612 pump_libevent()->UnwatchFileHandle(e); | |
613 } | |
614 #endif | 609 #endif |
OLD | NEW |