RenderText: handle center-aligned text in UpdateCachedBoundsAndOffset()
[chromium-blink-merge.git] / content / common / p2p_socket_type.h
blobb47ae933134ef1c8da8d3b315ccedb569245ff26
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file defines some basic types used by the P2P-related IPC
6 // messages.
8 #ifndef CONTENT_COMMON_P2P_SOCKET_TYPE_H_
9 #define CONTENT_COMMON_P2P_SOCKET_TYPE_H_
11 #include <string>
13 #include "net/base/ip_endpoint.h"
15 namespace content {
17 enum P2PSocketOption {
18 P2P_SOCKET_OPT_RCVBUF, // Receive buffer size.
19 P2P_SOCKET_OPT_SNDBUF, // Send buffer size.
20 P2P_SOCKET_OPT_DSCP, // DSCP code.
21 P2P_SOCKET_OPT_MAX
24 // Type of P2P Socket.
25 enum P2PSocketType {
26 P2P_SOCKET_UDP,
27 P2P_SOCKET_TCP_SERVER,
28 P2P_SOCKET_STUN_TCP_SERVER,
29 P2P_SOCKET_TCP_CLIENT,
30 P2P_SOCKET_STUN_TCP_CLIENT,
31 P2P_SOCKET_SSLTCP_CLIENT,
32 P2P_SOCKET_STUN_SSLTCP_CLIENT,
33 P2P_SOCKET_TLS_CLIENT,
34 P2P_SOCKET_STUN_TLS_CLIENT,
35 P2P_SOCKET_TYPE_LAST = P2P_SOCKET_STUN_TLS_CLIENT
38 // Struct which carries both resolved IP address and host string literal.
39 // Port number will be part of |ip_address|.
40 struct P2PHostAndIPEndPoint {
41 P2PHostAndIPEndPoint() {}
42 P2PHostAndIPEndPoint(const std::string& hostname,
43 const net::IPEndPoint& ip_address)
44 : hostname(hostname), ip_address(ip_address) {
47 std::string hostname;
48 net::IPEndPoint ip_address;
51 } // namespace content
53 #endif // CONTENT_COMMON_P2P_SOCKET_TYPE_H_