| 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 <stddef.h> | 10 #include <stddef.h> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 // Returns false on recoverable error. | 74 // Returns false on recoverable error. |
| 75 // There are two reasons why this method might leave messages in the | 75 // There are two reasons why this method might leave messages in the |
| 76 // output_queue_. | 76 // output_queue_. |
| 77 // 1. |waiting_connect_| is |true|. | 77 // 1. |waiting_connect_| is |true|. |
| 78 // 2. |is_blocked_on_write_| is |true|. | 78 // 2. |is_blocked_on_write_| is |true|. |
| 79 // If any of these conditionals change, this method should be called, as | 79 // If any of these conditionals change, this method should be called, as |
| 80 // previously blocked messages may no longer be blocked. | 80 // previously blocked messages may no longer be blocked. |
| 81 bool ProcessOutgoingMessages(); | 81 bool ProcessOutgoingMessages(); |
| 82 | 82 |
| 83 bool AcceptConnection(); | 83 bool OnConnect(); |
| 84 void ClosePipeOnError(); | 84 void ClosePipeOnError(); |
| 85 int GetHelloMessageProcId() const; | 85 int GetHelloMessageProcId() const; |
| 86 void QueueHelloMessage(); | 86 void QueueHelloMessage(); |
| 87 void CloseFileDescriptors(Message* msg); | 87 void CloseFileDescriptors(Message* msg); |
| 88 void QueueCloseFDMessage(int fd, int hops); | 88 void QueueCloseFDMessage(int fd, int hops); |
| 89 | 89 |
| 90 // ChannelReader implementation. | 90 // ChannelReader implementation. |
| 91 ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override; | 91 ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override; |
| 92 bool ShouldDispatchInputMessage(Message* msg) override; | 92 bool ShouldDispatchInputMessage(Message* msg) override; |
| 93 bool GetNonBrokeredAttachments(Message* msg) override; | 93 bool GetNonBrokeredAttachments(Message* msg) override; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // If non-zero, overrides the process ID sent in the hello message. | 213 // If non-zero, overrides the process ID sent in the hello message. |
| 214 static int global_pid_; | 214 static int global_pid_; |
| 215 #endif // OS_LINUX | 215 #endif // OS_LINUX |
| 216 | 216 |
| 217 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); | 217 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 } // namespace IPC | 220 } // namespace IPC |
| 221 | 221 |
| 222 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 222 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
| OLD | NEW |