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 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ |
7 | 7 |
8 #include "content/public/common/socket_permission_request.h" | 8 #include "content/public/common/socket_permission_request.h" |
9 #include "ppapi/c/pp_stdint.h" | 9 #include "ppapi/c/pp_stdint.h" |
10 | 10 |
| 11 #if defined(OS_CHROMEOS) |
| 12 #include "base/callback_forward.h" |
| 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "net/base/ip_endpoint.h" |
| 15 #endif // defined(OS_CHROMEOS) |
| 16 |
11 struct PP_NetAddress_Private; | 17 struct PP_NetAddress_Private; |
12 | 18 |
| 19 #if defined(OS_CHROMEOS) |
| 20 namespace chromeos { |
| 21 class FirewallHole; |
| 22 } |
| 23 #endif // defined(OS_CHROMEOS) |
| 24 |
13 namespace net { | 25 namespace net { |
14 class X509Certificate; | 26 class X509Certificate; |
15 } | 27 } |
16 | 28 |
17 namespace ppapi { | 29 namespace ppapi { |
18 class PPB_X509Certificate_Fields; | 30 class PPB_X509Certificate_Fields; |
19 } | 31 } |
20 | 32 |
21 namespace content { | 33 namespace content { |
22 | 34 |
(...skipping 16 matching lines...) Expand all Loading... |
39 // PPB_X509Certificate_Fields. | 51 // PPB_X509Certificate_Fields. |
40 bool GetCertificateFields(const net::X509Certificate& cert, | 52 bool GetCertificateFields(const net::X509Certificate& cert, |
41 ppapi::PPB_X509Certificate_Fields* fields); | 53 ppapi::PPB_X509Certificate_Fields* fields); |
42 | 54 |
43 // Extracts the certificate field data from the DER representation of a | 55 // Extracts the certificate field data from the DER representation of a |
44 // certificate into PPB_X509Certificate_Fields. | 56 // certificate into PPB_X509Certificate_Fields. |
45 bool GetCertificateFields(const char* der, | 57 bool GetCertificateFields(const char* der, |
46 uint32_t length, | 58 uint32_t length, |
47 ppapi::PPB_X509Certificate_Fields* fields); | 59 ppapi::PPB_X509Certificate_Fields* fields); |
48 | 60 |
| 61 #if defined(OS_CHROMEOS) |
| 62 typedef base::Callback<void(scoped_ptr<chromeos::FirewallHole>)> |
| 63 FirewallHoleOpenCallback; |
| 64 |
| 65 // Returns true if the open operation is in progress. |
| 66 void OpenTCPFirewallHole(const net::IPEndPoint& address, |
| 67 FirewallHoleOpenCallback callback); |
| 68 |
| 69 void OpenUDPFirewallHole(const net::IPEndPoint& address, |
| 70 FirewallHoleOpenCallback callback); |
| 71 #endif // defined(OS_CHROMEOS) |
| 72 |
49 } // namespace pepper_socket_utils | 73 } // namespace pepper_socket_utils |
50 | 74 |
51 } // namespace content | 75 } // namespace content |
52 | 76 |
53 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ | 77 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ |
OLD | NEW |