Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Side by Side Diff: content/browser/renderer_host/pepper/pepper_tcp_socket.h

Issue 17314012: Move PPB_TCPSocket out of dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_TCP_SOCKET_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TCP_SOCKET_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TCP_SOCKET_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TCP_SOCKET_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "net/base/address_list.h" 13 #include "net/base/address_list.h"
14 #include "net/base/completion_callback.h" 14 #include "net/base/completion_callback.h"
15 #include "ppapi/c/dev/ppb_tcp_socket_dev.h"
16 #include "ppapi/c/pp_stdint.h" 15 #include "ppapi/c/pp_stdint.h"
16 #include "ppapi/c/ppb_tcp_socket.h"
17 17
18 struct PP_NetAddress_Private; 18 struct PP_NetAddress_Private;
19 19
20 namespace ppapi { 20 namespace ppapi {
21 class PPB_X509Certificate_Fields; 21 class PPB_X509Certificate_Fields;
22 class SocketOptionData; 22 class SocketOptionData;
23 } 23 }
24 24
25 namespace net { 25 namespace net {
26 class DrainableIOBuffer; 26 class DrainableIOBuffer;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 void Connect(const std::string& host, uint16_t port); 59 void Connect(const std::string& host, uint16_t port);
60 void ConnectWithNetAddress(const PP_NetAddress_Private& net_addr); 60 void ConnectWithNetAddress(const PP_NetAddress_Private& net_addr);
61 void SSLHandshake( 61 void SSLHandshake(
62 const std::string& server_name, 62 const std::string& server_name,
63 uint16_t server_port, 63 uint16_t server_port,
64 const std::vector<std::vector<char> >& trusted_certs, 64 const std::vector<std::vector<char> >& trusted_certs,
65 const std::vector<std::vector<char> >& untrusted_certs); 65 const std::vector<std::vector<char> >& untrusted_certs);
66 void Read(int32 bytes_to_read); 66 void Read(int32 bytes_to_read);
67 void Write(const std::string& data); 67 void Write(const std::string& data);
68 void SetOption(PP_TCPSocket_Option_Dev name, 68 void SetOption(PP_TCPSocket_Option name,
69 const ppapi::SocketOptionData& value); 69 const ppapi::SocketOptionData& value);
70 70
71 void SendConnectACKError(int32_t error); 71 void SendConnectACKError(int32_t error);
72 72
73 // Extracts the certificate field data from a |net::X509Certificate| into 73 // Extracts the certificate field data from a |net::X509Certificate| into
74 // |PPB_X509Certificate_Fields|. 74 // |PPB_X509Certificate_Fields|.
75 static bool GetCertificateFields(const net::X509Certificate& cert, 75 static bool GetCertificateFields(const net::X509Certificate& cert,
76 ppapi::PPB_X509Certificate_Fields* fields); 76 ppapi::PPB_X509Certificate_Fields* fields);
77 // Extracts the certificate field data from the DER representation of a 77 // Extracts the certificate field data from the DER representation of a
78 // certificate into |PPB_X509Certificate_Fields|. 78 // certificate into |PPB_X509Certificate_Fields|.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // using a |DrainableIOBuffer|, which requires an underlying base |IOBuffer|. 139 // using a |DrainableIOBuffer|, which requires an underlying base |IOBuffer|.
140 scoped_refptr<net::IOBuffer> write_buffer_base_; 140 scoped_refptr<net::IOBuffer> write_buffer_base_;
141 scoped_refptr<net::DrainableIOBuffer> write_buffer_; 141 scoped_refptr<net::DrainableIOBuffer> write_buffer_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(PepperTCPSocket); 143 DISALLOW_COPY_AND_ASSIGN(PepperTCPSocket);
144 }; 144 };
145 145
146 } // namespace content 146 } // namespace content
147 147
148 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TCP_SOCKET_H_ 148 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TCP_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698