| 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_H_ | 5 #ifndef IPC_IPC_CHANNEL_H_ |
| 6 #define IPC_IPC_CHANNEL_H_ | 6 #define IPC_IPC_CHANNEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ipc/ipc_channel_handle.h" | 10 #include "ipc/ipc_channel_handle.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // connection and listen for new ones, use ResetToAcceptingConnectionState. | 133 // connection and listen for new ones, use ResetToAcceptingConnectionState. |
| 134 void Close(); | 134 void Close(); |
| 135 | 135 |
| 136 // Modify the Channel's listener. | 136 // Modify the Channel's listener. |
| 137 void set_listener(Listener* listener); | 137 void set_listener(Listener* listener); |
| 138 | 138 |
| 139 // Send a message over the Channel to the listener on the other end. | 139 // Send a message over the Channel to the listener on the other end. |
| 140 // | 140 // |
| 141 // |message| must be allocated using operator new. This object will be | 141 // |message| must be allocated using operator new. This object will be |
| 142 // deleted once the contents of the Message have been sent. | 142 // deleted once the contents of the Message have been sent. |
| 143 virtual bool Send(Message* message); | 143 virtual bool Send(Message* message) OVERRIDE; |
| 144 | 144 |
| 145 #if defined(OS_POSIX) && !defined(OS_NACL) | 145 #if defined(OS_POSIX) && !defined(OS_NACL) |
| 146 // On POSIX an IPC::Channel wraps a socketpair(), this method returns the | 146 // On POSIX an IPC::Channel wraps a socketpair(), this method returns the |
| 147 // FD # for the client end of the socket. | 147 // FD # for the client end of the socket. |
| 148 // This method may only be called on the server side of a channel. | 148 // This method may only be called on the server side of a channel. |
| 149 // This method can be called on any thread. | 149 // This method can be called on any thread. |
| 150 int GetClientFileDescriptor() const; | 150 int GetClientFileDescriptor() const; |
| 151 | 151 |
| 152 // Same as GetClientFileDescriptor, but transfers the ownership of the | 152 // Same as GetClientFileDescriptor, but transfers the ownership of the |
| 153 // file descriptor to the caller. | 153 // file descriptor to the caller. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16), | 206 HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16), |
| 207 // to avoid conflicting with normal | 207 // to avoid conflicting with normal |
| 208 // message types, which are enumeration | 208 // message types, which are enumeration |
| 209 // constants starting from 0. | 209 // constants starting from 0. |
| 210 }; | 210 }; |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 } // namespace IPC | 213 } // namespace IPC |
| 214 | 214 |
| 215 #endif // IPC_IPC_CHANNEL_H_ | 215 #endif // IPC_IPC_CHANNEL_H_ |
| OLD | NEW |