diff options
Diffstat (limited to 'chromium/ipc/ipc_channel_win.h')
-rw-r--r-- | chromium/ipc/ipc_channel_win.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/chromium/ipc/ipc_channel_win.h b/chromium/ipc/ipc_channel_win.h index a544f8be4bb..29042bf1ca3 100644 --- a/chromium/ipc/ipc_channel_win.h +++ b/chromium/ipc/ipc_channel_win.h @@ -21,18 +21,23 @@ class ThreadChecker; namespace IPC { -class Channel::ChannelImpl : public internal::ChannelReader, - public base::MessageLoopForIO::IOHandler { +class ChannelWin : public Channel, + public internal::ChannelReader, + public base::MessageLoopForIO::IOHandler { public: // Mirror methods of Channel, see ipc_channel.h for description. - ChannelImpl(const IPC::ChannelHandle &channel_handle, Mode mode, - Listener* listener); - ~ChannelImpl(); - bool Connect(); - void Close(); - bool Send(Message* message); + ChannelWin(const IPC::ChannelHandle &channel_handle, Mode mode, + Listener* listener); + ~ChannelWin(); + + // Channel implementation + virtual bool Connect() OVERRIDE; + virtual void Close() OVERRIDE; + virtual bool Send(Message* message) OVERRIDE; + virtual base::ProcessId GetPeerPID() const OVERRIDE; + static bool IsNamedServerInitialized(const std::string& channel_id); - base::ProcessId peer_pid() const { return peer_pid_; } + private: // ChannelReader implementation. @@ -43,8 +48,8 @@ class Channel::ChannelImpl : public internal::ChannelReader, bool DidEmptyInputBuffers() OVERRIDE; virtual void HandleInternalMessage(const Message& msg) OVERRIDE; - static const string16 PipeName(const std::string& channel_id, - int32* secret); + static const base::string16 PipeName(const std::string& channel_id, + int32* secret); bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); bool ProcessConnection(); @@ -58,7 +63,7 @@ class Channel::ChannelImpl : public internal::ChannelReader, private: struct State { - explicit State(ChannelImpl* channel); + explicit State(ChannelWin* channel); ~State(); base::MessageLoopForIO::IOContext context; bool is_pending; @@ -94,11 +99,11 @@ class Channel::ChannelImpl : public internal::ChannelReader, int32 client_secret_; - base::WeakPtrFactory<ChannelImpl> weak_factory_; + base::WeakPtrFactory<ChannelWin> weak_factory_; scoped_ptr<base::ThreadChecker> thread_check_; - DISALLOW_COPY_AND_ASSIGN(ChannelImpl); + DISALLOW_COPY_AND_ASSIGN(ChannelWin); }; } // namespace IPC |