| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ |
| 7 | 7 |
| 8 #include "content/common/p2p_sockets.h" | 8 #include "content/common/p2p_sockets.h" |
| 9 | 9 |
| 10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 STATE_OPEN, | 55 STATE_OPEN, |
| 56 STATE_ERROR, | 56 STATE_ERROR, |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 P2PSocketHost(IPC::Message::Sender* message_sender, int routing_id, int id); | 59 P2PSocketHost(IPC::Message::Sender* message_sender, int routing_id, int id); |
| 60 | 60 |
| 61 // Verifies that the packet |data| has a valid STUN header. In case | 61 // Verifies that the packet |data| has a valid STUN header. In case |
| 62 // of success stores type of the message in |type|. | 62 // of success stores type of the message in |type|. |
| 63 static bool GetStunPacketType(const char* data, int data_size, | 63 static bool GetStunPacketType(const char* data, int data_size, |
| 64 StunMessageType* type); | 64 StunMessageType* type); |
| 65 static bool IsRequestOrResponse(StunMessageType type); |
| 65 | 66 |
| 66 IPC::Message::Sender* message_sender_; | 67 IPC::Message::Sender* message_sender_; |
| 67 int routing_id_; | 68 int routing_id_; |
| 68 int id_; | 69 int id_; |
| 69 State state_; | 70 State state_; |
| 70 | 71 |
| 71 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost); | 72 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost); |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ | 75 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ |
| OLD | NEW |