| Index: ipc/ipc_channel_win.h
|
| diff --git a/ipc/ipc_channel_win.h b/ipc/ipc_channel_win.h
|
| index 77bc119bc197c28e13f86aef10c1c77f91f6db79..121bc8623dbc6b5e1ec7179e161610f1abd09d24 100644
|
| --- a/ipc/ipc_channel_win.h
|
| +++ b/ipc/ipc_channel_win.h
|
| @@ -32,13 +32,35 @@ class Channel::ChannelImpl : public MessageLoopForIO::IOHandler {
|
| void set_listener(Listener* listener) { listener_ = listener; }
|
| bool Send(Message* message);
|
| static bool IsNamedServerInitialized(const std::string& channel_id);
|
| +
|
| private:
|
| + enum ReadState { READ_SUCCEEDED, READ_FAILED, READ_PENDING };
|
| +
|
| + // This will become the virtual interface implemented by this class to
|
| + // handle platform-specific reading.
|
| + // TODO(brettw) finish refactoring.
|
| + ReadState ReadData(char* buffer, int buffer_len, int* bytes_read);
|
| + bool WillDispatchInputMessage(Message* msg);
|
| + void HandleHelloMessage(const Message& msg);
|
| + bool DidEmptyInputBuffers();
|
| +
|
| + bool DispatchInputData(const char* input_data, int input_data_len);
|
| +
|
| + // Returns true if the given message is the hello message.
|
| + bool IsHelloMessage(const Message& m) const;
|
| +
|
| + // Handles asynchronously read data.
|
| + //
|
| + // Optionally call this after returning READ_PENDING from ReadData to
|
| + // indicate that buffer was filled with the given number of bytes of
|
| + // data. See ReadData for more.
|
| + bool AsyncReadComplete(int bytes_read);
|
| +
|
| static const std::wstring PipeName(const std::string& channel_id);
|
| bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode);
|
|
|
| bool ProcessConnection();
|
| - bool ProcessIncomingMessages(MessageLoopForIO::IOContext* context,
|
| - DWORD bytes_read);
|
| + bool ProcessIncomingMessages();
|
| bool ProcessOutgoingMessages(MessageLoopForIO::IOContext* context,
|
| DWORD bytes_written);
|
|
|
|
|