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/ip_endpoint.h" | 12 #include "net/base/ip_endpoint.h" |
13 #include "net/base/net_util.h" | 13 #include "net/base/net_util.h" |
| 14 #include "third_party/libjingle/source/talk/base/asyncpacketsocket.h" |
14 | 15 |
15 #undef IPC_MESSAGE_EXPORT | 16 #undef IPC_MESSAGE_EXPORT |
16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 17 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
17 #define IPC_MESSAGE_START P2PMsgStart | 18 #define IPC_MESSAGE_START P2PMsgStart |
18 | 19 |
19 IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketType, | 20 IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketType, |
20 content::P2P_SOCKET_TYPE_LAST) | 21 content::P2P_SOCKET_TYPE_LAST) |
21 IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketOption, | 22 IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketOption, |
22 content::P2P_SOCKET_OPT_MAX - 1) | 23 content::P2P_SOCKET_OPT_MAX - 1) |
23 IPC_ENUM_TRAITS_MIN_MAX_VALUE(net::DiffServCodePoint, | 24 IPC_ENUM_TRAITS_MIN_MAX_VALUE(talk_base::DiffServCodePoint, |
24 net::DSCP_FIRST, | 25 talk_base::DSCP_NO_CHANGE, |
25 net::DSCP_LAST) | 26 talk_base::DSCP_CS7) |
26 | 27 |
27 IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface) | 28 IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface) |
28 IPC_STRUCT_TRAITS_MEMBER(name) | 29 IPC_STRUCT_TRAITS_MEMBER(name) |
29 IPC_STRUCT_TRAITS_MEMBER(address) | 30 IPC_STRUCT_TRAITS_MEMBER(address) |
30 IPC_STRUCT_TRAITS_END() | 31 IPC_STRUCT_TRAITS_END() |
31 | 32 |
| 33 IPC_STRUCT_TRAITS_BEGIN(talk_base::PacketTimeUpdateParams) |
| 34 IPC_STRUCT_TRAITS_MEMBER(rtp_sendtime_extension_id) |
| 35 IPC_STRUCT_TRAITS_MEMBER(srtp_auth_key) |
| 36 IPC_STRUCT_TRAITS_MEMBER(srtp_auth_tag_len) |
| 37 IPC_STRUCT_TRAITS_MEMBER(srtp_packet_index) |
| 38 IPC_STRUCT_TRAITS_END() |
| 39 |
| 40 IPC_STRUCT_TRAITS_BEGIN(talk_base::PacketOptions) |
| 41 IPC_STRUCT_TRAITS_MEMBER(dscp) |
| 42 IPC_STRUCT_TRAITS_MEMBER(packet_time_params) |
| 43 IPC_STRUCT_TRAITS_END() |
| 44 |
32 // P2P Socket messages sent from the browser to the renderer. | 45 // P2P Socket messages sent from the browser to the renderer. |
33 | 46 |
34 IPC_MESSAGE_CONTROL1(P2PMsg_NetworkListChanged, | 47 IPC_MESSAGE_CONTROL1(P2PMsg_NetworkListChanged, |
35 net::NetworkInterfaceList /* networks */) | 48 net::NetworkInterfaceList /* networks */) |
36 | 49 |
37 IPC_MESSAGE_CONTROL2(P2PMsg_GetHostAddressResult, | 50 IPC_MESSAGE_CONTROL2(P2PMsg_GetHostAddressResult, |
38 int32 /* request_id */, | 51 int32 /* request_id */, |
39 net::IPAddressList /* address list*/) | 52 net::IPAddressList /* address list*/) |
40 | 53 |
41 IPC_MESSAGE_CONTROL2(P2PMsg_OnSocketCreated, | 54 IPC_MESSAGE_CONTROL2(P2PMsg_OnSocketCreated, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 IPC_MESSAGE_CONTROL3(P2PHostMsg_AcceptIncomingTcpConnection, | 91 IPC_MESSAGE_CONTROL3(P2PHostMsg_AcceptIncomingTcpConnection, |
79 int /* listen_socket_id */, | 92 int /* listen_socket_id */, |
80 net::IPEndPoint /* remote_address */, | 93 net::IPEndPoint /* remote_address */, |
81 int /* connected_socket_id */) | 94 int /* connected_socket_id */) |
82 | 95 |
83 // TODO(sergeyu): Use shared memory to pass the data. | 96 // TODO(sergeyu): Use shared memory to pass the data. |
84 IPC_MESSAGE_CONTROL5(P2PHostMsg_Send, | 97 IPC_MESSAGE_CONTROL5(P2PHostMsg_Send, |
85 int /* socket_id */, | 98 int /* socket_id */, |
86 net::IPEndPoint /* socket_address */, | 99 net::IPEndPoint /* socket_address */, |
87 std::vector<char> /* data */, | 100 std::vector<char> /* data */, |
88 net::DiffServCodePoint /* dscp */, | 101 talk_base::PacketOptions /* packet options */, |
89 uint64 /* packet_id */) | 102 uint64 /* packet_id */) |
90 | 103 |
91 IPC_MESSAGE_CONTROL1(P2PHostMsg_DestroySocket, | 104 IPC_MESSAGE_CONTROL1(P2PHostMsg_DestroySocket, |
92 int /* socket_id */) | 105 int /* socket_id */) |
93 | 106 |
94 IPC_MESSAGE_CONTROL3(P2PHostMsg_SetOption, | 107 IPC_MESSAGE_CONTROL3(P2PHostMsg_SetOption, |
95 int /* socket_id */, | 108 int /* socket_id */, |
96 content::P2PSocketOption /* socket option type */, | 109 content::P2PSocketOption /* socket option type */, |
97 int /* value */) | 110 int /* value */) |
OLD | NEW |