| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ipc/ipc_channel.h" | 9 #include "ipc/ipc_channel.h" |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 bool ProcessIncomingMessages(); | 75 bool ProcessIncomingMessages(); |
| 76 bool ProcessOutgoingMessages(); | 76 bool ProcessOutgoingMessages(); |
| 77 | 77 |
| 78 bool AcceptConnection(); | 78 bool AcceptConnection(); |
| 79 void ClosePipeOnError(); | 79 void ClosePipeOnError(); |
| 80 int GetHelloMessageProcId(); | 80 int GetHelloMessageProcId(); |
| 81 void QueueHelloMessage(); | 81 void QueueHelloMessage(); |
| 82 bool IsHelloMessage(const Message* m) const; | 82 bool IsHelloMessage(const Message* m) const; |
| 83 | 83 |
| 84 // MessageLoopForIO::Watcher implementation. | 84 // MessageLoopForIO::Watcher implementation. |
| 85 virtual void OnFileCanReadWithoutBlocking(int fd); | 85 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; |
| 86 virtual void OnFileCanWriteWithoutBlocking(int fd); | 86 virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE; |
| 87 | 87 |
| 88 Mode mode_; | 88 Mode mode_; |
| 89 | 89 |
| 90 // After accepting one client connection on our server socket we want to | 90 // After accepting one client connection on our server socket we want to |
| 91 // stop listening. | 91 // stop listening. |
| 92 MessageLoopForIO::FileDescriptorWatcher server_listen_connection_watcher_; | 92 MessageLoopForIO::FileDescriptorWatcher server_listen_connection_watcher_; |
| 93 MessageLoopForIO::FileDescriptorWatcher read_watcher_; | 93 MessageLoopForIO::FileDescriptorWatcher read_watcher_; |
| 94 MessageLoopForIO::FileDescriptorWatcher write_watcher_; | 94 MessageLoopForIO::FileDescriptorWatcher write_watcher_; |
| 95 | 95 |
| 96 // Indicates whether we're currently blocked waiting for a write to complete. | 96 // Indicates whether we're currently blocked waiting for a write to complete. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or | 164 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or |
| 165 // MODE_NAMED_CLIENT if you want to pass in your own socket. | 165 // MODE_NAMED_CLIENT if you want to pass in your own socket. |
| 166 // The standard size on linux is 108, mac is 104. To maintain consistency | 166 // The standard size on linux is 108, mac is 104. To maintain consistency |
| 167 // across platforms we standardize on the smaller value. | 167 // across platforms we standardize on the smaller value. |
| 168 static const size_t kMaxPipeNameLength = 104; | 168 static const size_t kMaxPipeNameLength = 104; |
| 169 | 169 |
| 170 } // namespace IPC | 170 } // namespace IPC |
| 171 | 171 |
| 172 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 172 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
| OLD | NEW |