OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_message.h" | 10 #include "ipc/ipc_message.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 virtual void OnChannelConnected(int32 peer_pid) {} | 31 virtual void OnChannelConnected(int32 peer_pid) {} |
32 | 32 |
33 // Called when an error is detected that causes the channel to close. | 33 // Called when an error is detected that causes the channel to close. |
34 // This method is not called when a channel is closed normally. | 34 // This method is not called when a channel is closed normally. |
35 virtual void OnChannelError() {} | 35 virtual void OnChannelError() {} |
36 }; | 36 }; |
37 | 37 |
38 enum Mode { | 38 enum Mode { |
39 MODE_NONE, | 39 MODE_NONE, |
40 MODE_SERVER, | 40 MODE_SERVER, |
41 MODE_CLIENT | 41 MODE_CLIENT, |
| 42 MODE_NAMED_SERVER, |
| 43 MODE_NAMED_CLIENT |
42 }; | 44 }; |
43 | 45 |
44 enum { | 46 enum { |
45 // The maximum message size in bytes. Attempting to receive a | 47 // The maximum message size in bytes. Attempting to receive a |
46 // message of this size or bigger results in a channel error. | 48 // message of this size or bigger results in a channel error. |
47 kMaximumMessageSize = 256 * 1024 * 1024, | 49 kMaximumMessageSize = 256 * 1024 * 1024, |
48 | 50 |
49 // Ammount of data to read at once from the pipe. | 51 // Ammount of data to read at once from the pipe. |
50 kReadBufferSize = 4 * 1024 | 52 kReadBufferSize = 4 * 1024 |
51 }; | 53 }; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16), | 116 HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16), |
115 // to avoid conflicting with normal | 117 // to avoid conflicting with normal |
116 // message types, which are enumeration | 118 // message types, which are enumeration |
117 // constants starting from 0. | 119 // constants starting from 0. |
118 }; | 120 }; |
119 }; | 121 }; |
120 | 122 |
121 } // namespace IPC | 123 } // namespace IPC |
122 | 124 |
123 #endif // IPC_IPC_CHANNEL_H_ | 125 #endif // IPC_IPC_CHANNEL_H_ |
OLD | NEW |