Index: net/base/listen_socket.h |
diff --git a/net/base/listen_socket.h b/net/base/listen_socket.h |
index 2b32b5b047711036b75381a0c8f0fd4940fc3ff3..e40594042dc71db85c9208d8d9fc96e3864de3c9 100644 |
--- a/net/base/listen_socket.h |
+++ b/net/base/listen_socket.h |
@@ -13,13 +13,14 @@ |
#if defined(OS_WIN) |
#include <winsock2.h> |
+#endif |
+#include <string> |
+#if defined(OS_WIN) |
#include "base/object_watcher.h" |
#elif defined(OS_POSIX) |
#include "base/message_loop.h" |
#include "net/base/net_util.h" |
#include "net/base/net_errors.h" |
-#include "third_party/libevent/event.h" |
-#include "base/message_pump_libevent.h" |
#endif |
#include "base/basictypes.h" |
@@ -35,7 +36,7 @@ class ListenSocket : public base::RefCountedThreadSafe<ListenSocket>, |
#if defined(OS_WIN) |
public base::ObjectWatcher::Delegate |
#elif defined(OS_POSIX) |
- public base::MessagePumpLibevent::Watcher |
+ public MessageLoopForIO::Watcher |
#endif |
{ |
public: |
@@ -80,11 +81,11 @@ class ListenSocket : public base::RefCountedThreadSafe<ListenSocket>, |
NOT_WAITING = 0, |
WAITING_ACCEPT = 1, |
WAITING_READ = 3, |
- WAITING_CLOSE = 4 |
+ WAITING_CLOSE = 4 |
}; |
- // Pass any value in case of Windows, because in Windows |
- // we are not using state. |
- void WatchSocket(WaitState state); |
+ // Pass any value in case of Windows, because in Windows |
+ // we are not using state. |
+ void WatchSocket(WaitState state); |
void UnwatchSocket(); |
#if defined(OS_WIN) |
@@ -95,17 +96,17 @@ class ListenSocket : public base::RefCountedThreadSafe<ListenSocket>, |
#elif defined(OS_POSIX) |
WaitState wait_state_; |
// The socket's libevent wrapper |
- scoped_ptr<event> event_; |
+ MessageLoopForIO::FileDescriptorWatcher watcher_; |
// Called by MessagePumpLibevent when the socket is ready to do I/O |
- void OnSocketReady(short flags); |
+ void OnFileCanReadWithoutBlocking(int fd); |
+ void OnFileCanWriteWithoutBlocking(int fd); |
#endif |
- SOCKET socket_; |
+ SOCKET socket_; |
ListenSocketDelegate *socket_delegate_; |
private: |
DISALLOW_EVIL_CONSTRUCTORS(ListenSocket); |
}; |
-#endif // NET_BASE_SOCKET_H_ |
- |
+#endif // NET_BASE_SOCKET_H_ |