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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 bool AcceptConnection(); | 73 bool AcceptConnection(); |
74 void ClosePipeOnError(); | 74 void ClosePipeOnError(); |
75 int GetHelloMessageProcId() const; | 75 int GetHelloMessageProcId() const; |
76 void QueueHelloMessage(); | 76 void QueueHelloMessage(); |
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 WillDispatchInputMessage(Message* msg) override; | 82 bool ShouldDispatchInputMessage(Message* msg) override; |
| 83 bool GetNonBrokeredAttachments(Message* msg) override; |
83 bool DidEmptyInputBuffers() override; | 84 bool DidEmptyInputBuffers() override; |
84 void HandleInternalMessage(const Message& msg) override; | 85 void HandleInternalMessage(const Message& msg) override; |
85 | 86 |
86 // Finds the set of file descriptors in the given message. On success, | 87 // Finds the set of file descriptors in the given message. On success, |
87 // appends the descriptors to the input_fds_ member and returns true | 88 // appends the descriptors to the input_fds_ member and returns true |
88 // | 89 // |
89 // Returns false if the message was truncated. In this case, any handles that | 90 // Returns false if the message was truncated. In this case, any handles that |
90 // were sent will be closed. | 91 // were sent will be closed. |
91 bool ExtractFileDescriptorsFromMsghdr(msghdr* msg); | 92 bool ExtractFileDescriptorsFromMsghdr(msghdr* msg); |
92 | 93 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 182 |
182 // |broker_| must outlive this instance. | 183 // |broker_| must outlive this instance. |
183 AttachmentBroker* broker_; | 184 AttachmentBroker* broker_; |
184 | 185 |
185 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); | 186 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); |
186 }; | 187 }; |
187 | 188 |
188 } // namespace IPC | 189 } // namespace IPC |
189 | 190 |
190 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 191 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
OLD | NEW |