Chromium Code Reviews| 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 | 5 |
| 6 /** | 6 /** |
| 7 * This file defines the <code>PPB_TCPSocket_Private</code> interface. | 7 * This file defines the <code>PPB_TCPSocket_Private</code> interface. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 label Chrome { | 10 label Chrome { |
| 11 M17 = 0.3 | 11 M17 = 0.3, |
| 12 M19 = 0.4 | |
|
yzshen1
2012/04/06 19:24:33
M20?
raymes
2012/04/06 23:22:47
Done.
| |
| 12 }; | 13 }; |
| 13 | 14 |
| 14 /** | 15 /** |
| 15 * The <code>PPB_TCPSocket_Private</code> interface provides TCP socket | 16 * The <code>PPB_TCPSocket_Private</code> interface provides TCP socket |
| 16 * operations. | 17 * operations. |
| 17 */ | 18 */ |
| 18 interface PPB_TCPSocket_Private { | 19 interface PPB_TCPSocket_Private { |
| 19 /** | 20 /** |
| 20 * Allocates a TCP socket resource. | 21 * Allocates a TCP socket resource. |
| 21 */ | 22 */ |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 * SSLHandshake() will fail without starting a handshake. Otherwise, any | 71 * SSLHandshake() will fail without starting a handshake. Otherwise, any |
| 71 * failure during the handshake process will cause the socket to be | 72 * failure during the handshake process will cause the socket to be |
| 72 * disconnected. | 73 * disconnected. |
| 73 */ | 74 */ |
| 74 int32_t SSLHandshake([in] PP_Resource tcp_socket, | 75 int32_t SSLHandshake([in] PP_Resource tcp_socket, |
| 75 [in] str_t server_name, | 76 [in] str_t server_name, |
| 76 [in] uint16_t server_port, | 77 [in] uint16_t server_port, |
| 77 [in] PP_CompletionCallback callback); | 78 [in] PP_CompletionCallback callback); |
| 78 | 79 |
| 79 /** | 80 /** |
| 81 * Returns the server's <code>PPB_Flash_X509Certificate</code> for a socket | |
|
yzshen1
2012/04/06 19:24:33
Please update the name to PPB_X509Certificate_Priv
raymes
2012/04/06 23:22:47
Done.
| |
| 82 * connection if an SSL connection has been established using | |
| 83 * <code>SSL_Handshake</code>. If no SSL connection has been established, a | |
|
yzshen1
2012/04/06 19:24:33
No underscore in the middle.
raymes
2012/04/06 23:22:47
Done.
| |
| 84 * null resource is returned. | |
| 85 */ | |
| 86 [version=0.4] | |
| 87 PP_Resource GetServerCertificate([in] PP_Resource tcp_socket); | |
| 88 | |
| 89 /** | |
| 90 * NOTE: This function is not implemented and will return | |
| 91 * <code>PP_FALSE</code>. | |
| 92 * Add a trusted/untrusted chain building certificate to be used for this | |
|
yzshen1
2012/04/06 19:24:33
Add -> Adds.
raymes
2012/04/06 23:22:47
Done.
| |
| 93 * connection. The <code>PP_Resource</code> must be a | |
|
yzshen1
2012/04/06 19:24:33
PP_Resource -> certificate, please.
raymes
2012/04/06 23:22:47
Done.
| |
| 94 * <code>PPB_Flash_X509Certificate<code>. <code>PP_TRUE</code> is returned | |
|
yzshen1
2012/04/06 19:24:33
Please update the name to PPB_X509Certificate_Priv
raymes
2012/04/06 23:22:47
Done.
| |
| 95 * upon success. | |
| 96 */ | |
| 97 [version=0.4] | |
| 98 PP_Bool AddChainBuildingCertificate([in] PP_Resource tcp_socket, | |
| 99 [in] PP_Resource certificate, | |
| 100 [in] PP_Bool is_trusted); | |
| 101 | |
| 102 /** | |
| 80 * Reads data from the socket. The size of |buffer| must be at least as large | 103 * Reads data from the socket. The size of |buffer| must be at least as large |
| 81 * as |bytes_to_read|. May perform a partial read. Returns the number of bytes | 104 * as |bytes_to_read|. May perform a partial read. Returns the number of bytes |
| 82 * read or an error code. If the return value is 0, then it indicates that | 105 * read or an error code. If the return value is 0, then it indicates that |
| 83 * end-of-file was reached. | 106 * end-of-file was reached. |
| 84 * This method won't return more than 1 megabyte, so if |bytes_to_read| | 107 * This method won't return more than 1 megabyte, so if |bytes_to_read| |
| 85 * exceeds 1 megabyte, it will always perform a partial read. | 108 * exceeds 1 megabyte, it will always perform a partial read. |
| 86 * Multiple outstanding read requests are not supported. | 109 * Multiple outstanding read requests are not supported. |
| 87 */ | 110 */ |
| 88 int32_t Read([in] PP_Resource tcp_socket, | 111 int32_t Read([in] PP_Resource tcp_socket, |
| 89 [out] str_t buffer, | 112 [out] str_t buffer, |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 105 /** | 128 /** |
| 106 * Cancels any IO that may be pending, and disconnects the socket. Any pending | 129 * Cancels any IO that may be pending, and disconnects the socket. Any pending |
| 107 * callbacks will still run, reporting PP_Error_Aborted if pending IO was | 130 * callbacks will still run, reporting PP_Error_Aborted if pending IO was |
| 108 * interrupted. It is NOT valid to call Connect() again after a call to this | 131 * interrupted. It is NOT valid to call Connect() again after a call to this |
| 109 * method. Note: If the socket is destroyed when it is still connected, then | 132 * method. Note: If the socket is destroyed when it is still connected, then |
| 110 * it will be implicitly disconnected, so you are not required to call this | 133 * it will be implicitly disconnected, so you are not required to call this |
| 111 * method. | 134 * method. |
| 112 */ | 135 */ |
| 113 void Disconnect([in] PP_Resource tcp_socket); | 136 void Disconnect([in] PP_Resource tcp_socket); |
| 114 }; | 137 }; |
| OLD | NEW |