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