OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef IPC_IPC_CHANNEL_WIN_H_ | 5 #ifndef IPC_IPC_CHANNEL_WIN_H_ |
6 #define IPC_IPC_CHANNEL_WIN_H_ | 6 #define IPC_IPC_CHANNEL_WIN_H_ |
7 | 7 |
8 #include "ipc/ipc_channel.h" | 8 #include "ipc/ipc_channel.h" |
9 | 9 |
10 #include <queue> | 10 #include <queue> |
(...skipping 14 matching lines...) Expand all Loading... |
25 class ChannelWin : public Channel, | 25 class ChannelWin : public Channel, |
26 public internal::ChannelReader, | 26 public internal::ChannelReader, |
27 public base::MessageLoopForIO::IOHandler { | 27 public base::MessageLoopForIO::IOHandler { |
28 public: | 28 public: |
29 // Mirror methods of Channel, see ipc_channel.h for description. | 29 // Mirror methods of Channel, see ipc_channel.h for description. |
30 ChannelWin(const IPC::ChannelHandle &channel_handle, Mode mode, | 30 ChannelWin(const IPC::ChannelHandle &channel_handle, Mode mode, |
31 Listener* listener); | 31 Listener* listener); |
32 ~ChannelWin(); | 32 ~ChannelWin(); |
33 | 33 |
34 // Channel implementation | 34 // Channel implementation |
35 virtual bool Connect() OVERRIDE; | 35 virtual bool Connect() override; |
36 virtual void Close() OVERRIDE; | 36 virtual void Close() override; |
37 virtual bool Send(Message* message) OVERRIDE; | 37 virtual bool Send(Message* message) override; |
38 virtual base::ProcessId GetPeerPID() const OVERRIDE; | 38 virtual base::ProcessId GetPeerPID() const override; |
39 virtual base::ProcessId GetSelfPID() const OVERRIDE; | 39 virtual base::ProcessId GetSelfPID() const override; |
40 | 40 |
41 static bool IsNamedServerInitialized(const std::string& channel_id); | 41 static bool IsNamedServerInitialized(const std::string& channel_id); |
42 | 42 |
43 | 43 |
44 private: | 44 private: |
45 // ChannelReader implementation. | 45 // ChannelReader implementation. |
46 virtual ReadState ReadData(char* buffer, | 46 virtual ReadState ReadData(char* buffer, |
47 int buffer_len, | 47 int buffer_len, |
48 int* bytes_read) OVERRIDE; | 48 int* bytes_read) override; |
49 virtual bool WillDispatchInputMessage(Message* msg) OVERRIDE; | 49 virtual bool WillDispatchInputMessage(Message* msg) override; |
50 bool DidEmptyInputBuffers() OVERRIDE; | 50 bool DidEmptyInputBuffers() override; |
51 virtual void HandleInternalMessage(const Message& msg) OVERRIDE; | 51 virtual void HandleInternalMessage(const Message& msg) override; |
52 | 52 |
53 static const base::string16 PipeName(const std::string& channel_id, | 53 static const base::string16 PipeName(const std::string& channel_id, |
54 int32* secret); | 54 int32* secret); |
55 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); | 55 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); |
56 | 56 |
57 bool ProcessConnection(); | 57 bool ProcessConnection(); |
58 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context, | 58 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context, |
59 DWORD bytes_written); | 59 DWORD bytes_written); |
60 | 60 |
61 // MessageLoop::IOHandler implementation. | 61 // MessageLoop::IOHandler implementation. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 scoped_ptr<base::ThreadChecker> thread_check_; | 118 scoped_ptr<base::ThreadChecker> thread_check_; |
119 base::WeakPtrFactory<ChannelWin> weak_factory_; | 119 base::WeakPtrFactory<ChannelWin> weak_factory_; |
120 | 120 |
121 DISALLOW_COPY_AND_ASSIGN(ChannelWin); | 121 DISALLOW_COPY_AND_ASSIGN(ChannelWin); |
122 }; | 122 }; |
123 | 123 |
124 } // namespace IPC | 124 } // namespace IPC |
125 | 125 |
126 #endif // IPC_IPC_CHANNEL_WIN_H_ | 126 #endif // IPC_IPC_CHANNEL_WIN_H_ |
OLD | NEW |