| 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 // 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 "content/common/p2p_sockets.h" | 8 #include "content/common/p2p_sockets.h" |
| 9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
| 10 #include "net/base/ip_endpoint.h" | 10 #include "net/base/ip_endpoint.h" |
| 11 #include "net/base/net_util.h" | 11 #include "net/base/net_util.h" |
| 12 | 12 |
| 13 #define IPC_MESSAGE_START P2PMsgStart | 13 #define IPC_MESSAGE_START P2PMsgStart |
| 14 | 14 |
| 15 IPC_ENUM_TRAITS(P2PSocketType) | 15 IPC_ENUM_TRAITS(content::P2PSocketType) |
| 16 | 16 |
| 17 IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface) | 17 IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface) |
| 18 IPC_STRUCT_TRAITS_MEMBER(name) | 18 IPC_STRUCT_TRAITS_MEMBER(name) |
| 19 IPC_STRUCT_TRAITS_MEMBER(address) | 19 IPC_STRUCT_TRAITS_MEMBER(address) |
| 20 IPC_STRUCT_TRAITS_END() | 20 IPC_STRUCT_TRAITS_END() |
| 21 | 21 |
| 22 // P2P Socket messages sent from the browser to the renderer. | 22 // P2P Socket messages sent from the browser to the renderer. |
| 23 | 23 |
| 24 IPC_MESSAGE_ROUTED1(P2PMsg_NetworkListChanged, | 24 IPC_MESSAGE_ROUTED1(P2PMsg_NetworkListChanged, |
| 25 net::NetworkInterfaceList /* networks */) | 25 net::NetworkInterfaceList /* networks */) |
| (...skipping 23 matching lines...) Expand all Loading... |
| 49 // Start/stop sending P2PMsg_NetworkListChanged messages when network | 49 // Start/stop sending P2PMsg_NetworkListChanged messages when network |
| 50 // configuration changes. | 50 // configuration changes. |
| 51 IPC_MESSAGE_ROUTED0(P2PHostMsg_StartNetworkNotifications) | 51 IPC_MESSAGE_ROUTED0(P2PHostMsg_StartNetworkNotifications) |
| 52 IPC_MESSAGE_ROUTED0(P2PHostMsg_StopNetworkNotifications) | 52 IPC_MESSAGE_ROUTED0(P2PHostMsg_StopNetworkNotifications) |
| 53 | 53 |
| 54 IPC_MESSAGE_ROUTED2(P2PHostMsg_GetHostAddress, | 54 IPC_MESSAGE_ROUTED2(P2PHostMsg_GetHostAddress, |
| 55 std::string /* host_name */, | 55 std::string /* host_name */, |
| 56 int32 /* request_id */) | 56 int32 /* request_id */) |
| 57 | 57 |
| 58 IPC_MESSAGE_ROUTED4(P2PHostMsg_CreateSocket, | 58 IPC_MESSAGE_ROUTED4(P2PHostMsg_CreateSocket, |
| 59 P2PSocketType /* type */, | 59 content::P2PSocketType /* type */, |
| 60 int /* socket_id */, | 60 int /* socket_id */, |
| 61 net::IPEndPoint /* local_address */, | 61 net::IPEndPoint /* local_address */, |
| 62 net::IPEndPoint /* remote_address */) | 62 net::IPEndPoint /* remote_address */) |
| 63 | 63 |
| 64 IPC_MESSAGE_ROUTED3(P2PHostMsg_AcceptIncomingTcpConnection, | 64 IPC_MESSAGE_ROUTED3(P2PHostMsg_AcceptIncomingTcpConnection, |
| 65 int /* listen_socket_id */, | 65 int /* listen_socket_id */, |
| 66 net::IPEndPoint /* remote_address */, | 66 net::IPEndPoint /* remote_address */, |
| 67 int /* connected_socket_id */) | 67 int /* connected_socket_id */) |
| 68 | 68 |
| 69 // TODO(sergeyu): Use shared memory to pass the data. | 69 // TODO(sergeyu): Use shared memory to pass the data. |
| 70 IPC_MESSAGE_ROUTED3(P2PHostMsg_Send, | 70 IPC_MESSAGE_ROUTED3(P2PHostMsg_Send, |
| 71 int /* socket_id */, | 71 int /* socket_id */, |
| 72 net::IPEndPoint /* socket_address */, | 72 net::IPEndPoint /* socket_address */, |
| 73 std::vector<char> /* data */) | 73 std::vector<char> /* data */) |
| 74 | 74 |
| 75 IPC_MESSAGE_ROUTED1(P2PHostMsg_DestroySocket, | 75 IPC_MESSAGE_ROUTED1(P2PHostMsg_DestroySocket, |
| 76 int /* socket_id */) | 76 int /* socket_id */) |
| OLD | NEW |