| Index: chrome/common/ipc_channel_posix.h
|
| diff --git a/chrome/common/ipc_channel_posix.h b/chrome/common/ipc_channel_posix.h
|
| index b2849dc4f23fe1f843e99cdb842b04d0ce09d516..e788963042ec85fe5dfad7af5a4f845ede3f10f5 100644
|
| --- a/chrome/common/ipc_channel_posix.h
|
| +++ b/chrome/common/ipc_channel_posix.h
|
| @@ -11,11 +11,10 @@
|
| #include <string>
|
|
|
| #include "base/message_loop.h"
|
| -#include "third_party/libevent/event.h"
|
|
|
| namespace IPC {
|
|
|
| -class Channel::ChannelImpl : public MessageLoopForIO::FileWatcher {
|
| +class Channel::ChannelImpl : public MessageLoopForIO::Watcher {
|
| public:
|
| // Mirror methods of Channel, see ipc_channel.h for description.
|
| ChannelImpl(const std::wstring& channel_id, Mode mode, Listener* listener);
|
| @@ -31,27 +30,19 @@ class Channel::ChannelImpl : public MessageLoopForIO::FileWatcher {
|
| bool ProcessIncomingMessages();
|
| bool ProcessOutgoingMessages();
|
|
|
| - void OnFileReadReady(int fd);
|
| - void OnFileWriteReady(int fd);
|
| + void OnFileCanReadWithoutBlocking(int fd);
|
| + void OnFileCanWriteWithoutBlocking(int fd);
|
|
|
| Mode mode_;
|
|
|
| - // Wrapper for Libevent event.
|
| - // TODO(playmobil): MessageLoopForIO needs to better encapsulate libevent.
|
| - struct EventHolder {
|
| - EventHolder() : is_active(false) {}
|
| - ~EventHolder() {}
|
| + // After accepting one client connection on our server socket we want to
|
| + // stop listening.
|
| + MessageLoopForIO::FileDescriptorWatcher server_listen_connection_watcher_;
|
| + MessageLoopForIO::FileDescriptorWatcher read_watcher_;
|
| + MessageLoopForIO::FileDescriptorWatcher write_watcher_;
|
|
|
| - bool is_active;
|
| -
|
| - // libevent's set functions set all the needed members of this struct, so no
|
| - // need to initialize before use.
|
| - struct event event;
|
| - };
|
| -
|
| - EventHolder *server_listen_connection_event_;
|
| - EventHolder *read_event_;
|
| - EventHolder *write_event_;
|
| + // Indicates whether we're currently blocked waiting for a write to complete.
|
| + bool is_blocked_on_write_;
|
|
|
| // If sending a message blocks then we use this variable
|
| // to keep track of where we are.
|
|
|