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; | |
88 | 87 |
89 // Finds the set of file descriptors in the given message. On success, | 88 // Finds the set of file descriptors in the given message. On success, |
90 // appends the descriptors to the input_fds_ member and returns true | 89 // appends the descriptors to the input_fds_ member and returns true |
91 // | 90 // |
92 // Returns false if the message was truncated. In this case, any handles that | 91 // Returns false if the message was truncated. In this case, any handles that |
93 // were sent will be closed. | 92 // were sent will be closed. |
94 bool ExtractFileDescriptorsFromMsghdr(msghdr* msg); | 93 bool ExtractFileDescriptorsFromMsghdr(msghdr* msg); |
95 | 94 |
96 // Closes all handles in the input_fds_ list and clears the list. This is | 95 // Closes all handles in the input_fds_ list and clears the list. This is |
97 // used to clean up handles in error conditions to avoid leaking the handles. | 96 // 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... |
184 | 183 |
185 // |broker_| must outlive this instance. | 184 // |broker_| must outlive this instance. |
186 AttachmentBroker* broker_; | 185 AttachmentBroker* broker_; |
187 | 186 |
188 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); | 187 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); |
189 }; | 188 }; |
190 | 189 |
191 } // namespace IPC | 190 } // namespace IPC |
192 | 191 |
193 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 192 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
OLD | NEW |