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 "ppapi/c/private/ppb_net_address_private.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 bool OpenFirewallHole(const PP_NetAddress_Private& bind_address, | |
67 FirewallHoleOpenCallback callback); | |
68 #endif // defined(OS_CHROMEOS) | |
sadrul
2015/06/30 04:54:22
Maybe move these into pepper_socket_utils_chromeos
| |
69 | |
49 } // namespace pepper_socket_utils | 70 } // namespace pepper_socket_utils |
50 | 71 |
51 } // namespace content | 72 } // namespace content |
52 | 73 |
53 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ | 74 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ |
OLD | NEW |