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_POSIX_H_ | 5 #ifndef IPC_IPC_CHANNEL_POSIX_H_ |
6 #define IPC_IPC_CHANNEL_POSIX_H_ | 6 #define IPC_IPC_CHANNEL_POSIX_H_ |
7 | 7 |
8 #include "ipc/ipc_channel.h" | 8 #include "ipc/ipc_channel.h" |
9 | 9 |
10 #include <sys/socket.h> // for CMSG macros | 10 #include <sys/socket.h> // for CMSG macros |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace IPC { | 23 namespace IPC { |
24 | 24 |
25 class IPC_EXPORT ChannelPosix : public Channel, | 25 class IPC_EXPORT ChannelPosix : public Channel, |
26 public internal::ChannelReader, | 26 public internal::ChannelReader, |
27 public base::MessageLoopForIO::Watcher { | 27 public base::MessageLoopForIO::Watcher { |
28 public: | 28 public: |
29 // |broker| must outlive the newly created object. | 29 // |broker| must outlive the newly created object. |
30 ChannelPosix(const IPC::ChannelHandle& channel_handle, | 30 ChannelPosix(const IPC::ChannelHandle& channel_handle, |
31 Mode mode, | 31 Mode mode, |
32 Listener* listener, | 32 Listener* listener); |
33 AttachmentBroker* broker); | |
34 ~ChannelPosix() override; | 33 ~ChannelPosix() override; |
35 | 34 |
36 // Channel implementation | 35 // Channel implementation |
37 bool Connect() override; | 36 bool Connect() override; |
38 void Close() override; | 37 void Close() override; |
39 bool Send(Message* message) override; | 38 bool Send(Message* message) override; |
40 AttachmentBroker* GetAttachmentBroker() override; | 39 AttachmentBroker* GetAttachmentBroker() override; |
41 base::ProcessId GetPeerPID() const override; | 40 base::ProcessId GetPeerPID() const override; |
42 base::ProcessId GetSelfPID() const override; | 41 base::ProcessId GetSelfPID() const override; |
43 int GetClientFileDescriptor() const override; | 42 int GetClientFileDescriptor() const override; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 #endif | 174 #endif |
176 | 175 |
177 // True if we are responsible for unlinking the unix domain socket file. | 176 // True if we are responsible for unlinking the unix domain socket file. |
178 bool must_unlink_; | 177 bool must_unlink_; |
179 | 178 |
180 #if defined(OS_LINUX) | 179 #if defined(OS_LINUX) |
181 // If non-zero, overrides the process ID sent in the hello message. | 180 // If non-zero, overrides the process ID sent in the hello message. |
182 static int global_pid_; | 181 static int global_pid_; |
183 #endif // OS_LINUX | 182 #endif // OS_LINUX |
184 | 183 |
185 // |broker_| must outlive this instance. | |
186 AttachmentBroker* broker_; | |
187 | |
188 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); | 184 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); |
189 }; | 185 }; |
190 | 186 |
191 } // namespace IPC | 187 } // namespace IPC |
192 | 188 |
193 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 189 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
OLD | NEW |