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 // IPC messages for the P2P Transport API. | 5 // IPC messages for the P2P Transport API. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/common/p2p_socket_type.h" | 10 #include "content/common/p2p_socket_type.h" |
11 #include "ipc/ipc_message_macros.h" | 11 #include "ipc/ipc_message_macros.h" |
12 #include "net/base/net_util.h" | 12 #include "net/base/net_util.h" |
13 #include "third_party/libjingle/source/talk/base/asyncpacketsocket.h" | 13 #include "third_party/webrtc/base/asyncpacketsocket.h" |
14 | 14 |
15 #undef IPC_MESSAGE_EXPORT | 15 #undef IPC_MESSAGE_EXPORT |
16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
17 #define IPC_MESSAGE_START P2PMsgStart | 17 #define IPC_MESSAGE_START P2PMsgStart |
18 | 18 |
19 IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketType, | 19 IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketType, |
20 content::P2P_SOCKET_TYPE_LAST) | 20 content::P2P_SOCKET_TYPE_LAST) |
21 IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketOption, | 21 IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketOption, |
22 content::P2P_SOCKET_OPT_MAX - 1) | 22 content::P2P_SOCKET_OPT_MAX - 1) |
23 IPC_ENUM_TRAITS_MIN_MAX_VALUE(talk_base::DiffServCodePoint, | 23 IPC_ENUM_TRAITS_MIN_MAX_VALUE(rtc::DiffServCodePoint, |
24 talk_base::DSCP_NO_CHANGE, | 24 rtc::DSCP_NO_CHANGE, |
25 talk_base::DSCP_CS7) | 25 rtc::DSCP_CS7) |
26 | 26 |
27 IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface) | 27 IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface) |
28 IPC_STRUCT_TRAITS_MEMBER(name) | 28 IPC_STRUCT_TRAITS_MEMBER(name) |
29 IPC_STRUCT_TRAITS_MEMBER(type) | 29 IPC_STRUCT_TRAITS_MEMBER(type) |
30 IPC_STRUCT_TRAITS_MEMBER(address) | 30 IPC_STRUCT_TRAITS_MEMBER(address) |
31 IPC_STRUCT_TRAITS_END() | 31 IPC_STRUCT_TRAITS_END() |
32 | 32 |
33 IPC_STRUCT_TRAITS_BEGIN(talk_base::PacketTimeUpdateParams) | 33 IPC_STRUCT_TRAITS_BEGIN(rtc::PacketTimeUpdateParams) |
34 IPC_STRUCT_TRAITS_MEMBER(rtp_sendtime_extension_id) | 34 IPC_STRUCT_TRAITS_MEMBER(rtp_sendtime_extension_id) |
35 IPC_STRUCT_TRAITS_MEMBER(srtp_auth_key) | 35 IPC_STRUCT_TRAITS_MEMBER(srtp_auth_key) |
36 IPC_STRUCT_TRAITS_MEMBER(srtp_auth_tag_len) | 36 IPC_STRUCT_TRAITS_MEMBER(srtp_auth_tag_len) |
37 IPC_STRUCT_TRAITS_MEMBER(srtp_packet_index) | 37 IPC_STRUCT_TRAITS_MEMBER(srtp_packet_index) |
38 IPC_STRUCT_TRAITS_END() | 38 IPC_STRUCT_TRAITS_END() |
39 | 39 |
40 IPC_STRUCT_TRAITS_BEGIN(talk_base::PacketOptions) | 40 IPC_STRUCT_TRAITS_BEGIN(rtc::PacketOptions) |
41 IPC_STRUCT_TRAITS_MEMBER(dscp) | 41 IPC_STRUCT_TRAITS_MEMBER(dscp) |
42 IPC_STRUCT_TRAITS_MEMBER(packet_time_params) | 42 IPC_STRUCT_TRAITS_MEMBER(packet_time_params) |
43 IPC_STRUCT_TRAITS_END() | 43 IPC_STRUCT_TRAITS_END() |
44 | 44 |
45 IPC_STRUCT_TRAITS_BEGIN(content::P2PHostAndIPEndPoint) | 45 IPC_STRUCT_TRAITS_BEGIN(content::P2PHostAndIPEndPoint) |
46 IPC_STRUCT_TRAITS_MEMBER(hostname) | 46 IPC_STRUCT_TRAITS_MEMBER(hostname) |
47 IPC_STRUCT_TRAITS_MEMBER(ip_address) | 47 IPC_STRUCT_TRAITS_MEMBER(ip_address) |
48 IPC_STRUCT_TRAITS_END() | 48 IPC_STRUCT_TRAITS_END() |
49 | 49 |
50 // P2P Socket messages sent from the browser to the renderer. | 50 // P2P Socket messages sent from the browser to the renderer. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 IPC_MESSAGE_CONTROL3(P2PHostMsg_AcceptIncomingTcpConnection, | 97 IPC_MESSAGE_CONTROL3(P2PHostMsg_AcceptIncomingTcpConnection, |
98 int /* listen_socket_id */, | 98 int /* listen_socket_id */, |
99 net::IPEndPoint /* remote_address */, | 99 net::IPEndPoint /* remote_address */, |
100 int /* connected_socket_id */) | 100 int /* connected_socket_id */) |
101 | 101 |
102 // TODO(sergeyu): Use shared memory to pass the data. | 102 // TODO(sergeyu): Use shared memory to pass the data. |
103 IPC_MESSAGE_CONTROL5(P2PHostMsg_Send, | 103 IPC_MESSAGE_CONTROL5(P2PHostMsg_Send, |
104 int /* socket_id */, | 104 int /* socket_id */, |
105 net::IPEndPoint /* socket_address */, | 105 net::IPEndPoint /* socket_address */, |
106 std::vector<char> /* data */, | 106 std::vector<char> /* data */, |
107 talk_base::PacketOptions /* packet options */, | 107 rtc::PacketOptions /* packet options */, |
108 uint64 /* packet_id */) | 108 uint64 /* packet_id */) |
109 | 109 |
110 IPC_MESSAGE_CONTROL1(P2PHostMsg_DestroySocket, | 110 IPC_MESSAGE_CONTROL1(P2PHostMsg_DestroySocket, |
111 int /* socket_id */) | 111 int /* socket_id */) |
112 | 112 |
113 IPC_MESSAGE_CONTROL3(P2PHostMsg_SetOption, | 113 IPC_MESSAGE_CONTROL3(P2PHostMsg_SetOption, |
114 int /* socket_id */, | 114 int /* socket_id */, |
115 content::P2PSocketOption /* socket option type */, | 115 content::P2PSocketOption /* socket option type */, |
116 int /* value */) | 116 int /* value */) |
OLD | NEW |