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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 void CloseFileDescriptors(Message* msg); | 77 void CloseFileDescriptors(Message* msg); |
78 void QueueCloseFDMessage(int fd, int hops); | 78 void QueueCloseFDMessage(int fd, int hops); |
79 | 79 |
80 // ChannelReader implementation. | 80 // ChannelReader implementation. |
81 ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override; | 81 ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override; |
82 bool ShouldDispatchInputMessage(Message* msg) override; | 82 bool ShouldDispatchInputMessage(Message* msg) override; |
83 bool GetNonBrokeredAttachments(Message* msg) override; | 83 bool GetNonBrokeredAttachments(Message* msg) override; |
84 bool DidEmptyInputBuffers() override; | 84 bool DidEmptyInputBuffers() override; |
85 void HandleInternalMessage(const Message& msg) override; | 85 void HandleInternalMessage(const Message& msg) override; |
86 base::ProcessId GetSenderPID() override; | 86 base::ProcessId GetSenderPID() override; |
| 87 bool IsAttachmentBrokerEndpoint() override; |
87 | 88 |
88 // Finds the set of file descriptors in the given message. On success, | 89 // Finds the set of file descriptors in the given message. On success, |
89 // appends the descriptors to the input_fds_ member and returns true | 90 // appends the descriptors to the input_fds_ member and returns true |
90 // | 91 // |
91 // Returns false if the message was truncated. In this case, any handles that | 92 // Returns false if the message was truncated. In this case, any handles that |
92 // were sent will be closed. | 93 // were sent will be closed. |
93 bool ExtractFileDescriptorsFromMsghdr(msghdr* msg); | 94 bool ExtractFileDescriptorsFromMsghdr(msghdr* msg); |
94 | 95 |
95 // Closes all handles in the input_fds_ list and clears the list. This is | 96 // Closes all handles in the input_fds_ list and clears the list. This is |
96 // used to clean up handles in error conditions to avoid leaking the handles. | 97 // used to clean up handles in error conditions to avoid leaking the handles. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 184 |
184 // |broker_| must outlive this instance. | 185 // |broker_| must outlive this instance. |
185 AttachmentBroker* broker_; | 186 AttachmentBroker* broker_; |
186 | 187 |
187 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); | 188 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); |
188 }; | 189 }; |
189 | 190 |
190 } // namespace IPC | 191 } // namespace IPC |
191 | 192 |
192 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 193 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
OLD | NEW |