| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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_URLResponseInfo</code> API for examining URL | 7 * This file defines the <code>PPB_URLResponseInfo</code> API for examining URL |
| 8 * responses. | 8 * responses. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 label Chrome { | 11 label Chrome { |
| 12 M14 = 1.0 | 12 M14 = 1.0 |
| 13 }; | 13 }; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * This enumeration contains properties set on a URL response. | 16 * This enumeration contains properties set on a URL response. |
| 17 */ | 17 */ |
| 18 [assert_size(4)] | 18 [assert_size(4)] |
| 19 enum PP_URLResponseProperty { | 19 enum PP_URLResponseProperty { |
| 20 /** | 20 /** |
| 21 * This corresponds to a string (PP_VARTYPE_STRING); an absolute URL formed by | 21 * This corresponds to a string (PP_VARTYPE_STRING); an absolute URL formed by |
| 22 * resolving the relative request URL with the absolute document URL. Refer | 22 * resolving the relative request URL with the absolute document URL. Refer |
| 23 * to the | 23 * to the |
| 24 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2"> | 24 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2"> |
| 25 * HTTP Request URI</a> and | 25 * HTTP Request URI</a> and |
| 26 * <a href="http://www.w3.org/TR/html4/struct/links.html#h-12.4.1"> | 26 * <a href="http://www.w3.org/TR/html4/struct/links.html#h-12.4.1"> |
| 27 * HTML Resolving Relative URIs</a> documentation for further information. | 27 * HTML Resolving Relative URIs</a> documentation for further information. |
| 28 */ | 28 */ |
| 29 PP_URLRESPONSEPROPERTY_URL, | 29 PP_URLRESPONSEPROPERTY_URL = 0, |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * This corresponds to a string (PP_VARTYPE_STRING); the absolute URL returned | 32 * This corresponds to a string (PP_VARTYPE_STRING); the absolute URL returned |
| 33 * in the response header's 'Location' field if this is a redirect response, | 33 * in the response header's 'Location' field if this is a redirect response, |
| 34 * an empty string otherwise. Refer to the | 34 * an empty string otherwise. Refer to the |
| 35 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3"> | 35 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3"> |
| 36 * HTTP Status Codes - Redirection</a> documentation for further information. | 36 * HTTP Status Codes - Redirection</a> documentation for further information. |
| 37 */ | 37 */ |
| 38 PP_URLRESPONSEPROPERTY_REDIRECTURL, | 38 PP_URLRESPONSEPROPERTY_REDIRECTURL = 1, |
| 39 | 39 |
| 40 /** | 40 /** |
| 41 * This corresponds to a string (PP_VARTYPE_STRING); the HTTP method to be | 41 * This corresponds to a string (PP_VARTYPE_STRING); the HTTP method to be |
| 42 * used in a new request if this is a redirect response, an empty string | 42 * used in a new request if this is a redirect response, an empty string |
| 43 * otherwise. Refer to the | 43 * otherwise. Refer to the |
| 44 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3"> | 44 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3"> |
| 45 * HTTP Status Codes - Redirection</a> documentation for further information. | 45 * HTTP Status Codes - Redirection</a> documentation for further information. |
| 46 */ | 46 */ |
| 47 PP_URLRESPONSEPROPERTY_REDIRECTMETHOD, | 47 PP_URLRESPONSEPROPERTY_REDIRECTMETHOD = 2, |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * This corresponds to an int32 (PP_VARETYPE_INT32); the status code from the | 50 * This corresponds to an int32 (PP_VARETYPE_INT32); the status code from the |
| 51 * response, e.g., 200 if the request was successful. Refer to the | 51 * response, e.g., 200 if the request was successful. Refer to the |
| 52 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1.1"> | 52 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1.1"> |
| 53 * HTTP Status Code and Reason Phrase</a> documentation for further | 53 * HTTP Status Code and Reason Phrase</a> documentation for further |
| 54 * information. | 54 * information. |
| 55 */ | 55 */ |
| 56 PP_URLRESPONSEPROPERTY_STATUSCODE, | 56 PP_URLRESPONSEPROPERTY_STATUSCODE = 3, |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * This corresponds to a string (PP_VARTYPE_STRING); the status line | 59 * This corresponds to a string (PP_VARTYPE_STRING); the status line |
| 60 * from the response. Refer to the | 60 * from the response. Refer to the |
| 61 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1"> | 61 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1"> |
| 62 * HTTP Response Status Line</a> documentation for further information. | 62 * HTTP Response Status Line</a> documentation for further information. |
| 63 */ | 63 */ |
| 64 PP_URLRESPONSEPROPERTY_STATUSLINE, | 64 PP_URLRESPONSEPROPERTY_STATUSLINE = 4, |
| 65 | 65 |
| 66 /** | 66 /** |
| 67 * This corresponds to a string(PP_VARTYPE_STRING), a \n-delimited list of | 67 * This corresponds to a string(PP_VARTYPE_STRING), a \n-delimited list of |
| 68 * header field/value pairs of the form "field: value", returned by the | 68 * header field/value pairs of the form "field: value", returned by the |
| 69 * server. Refer to the | 69 * server. Refer to the |
| 70 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14"> | 70 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14"> |
| 71 * HTTP Header Field Definitions</a> documentation for further information. | 71 * HTTP Header Field Definitions</a> documentation for further information. |
| 72 */ | 72 */ |
| 73 PP_URLRESPONSEPROPERTY_HEADERS | 73 PP_URLRESPONSEPROPERTY_HEADERS = 5 |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 | 76 |
| 77 /** | 77 /** |
| 78 * The PPB_URLResponseInfo interface contains APIs for | 78 * The PPB_URLResponseInfo interface contains APIs for |
| 79 * examining URL responses. Refer to <code>PPB_URLLoader</code> for further | 79 * examining URL responses. Refer to <code>PPB_URLLoader</code> for further |
| 80 * information. | 80 * information. |
| 81 */ | 81 */ |
| 82 interface PPB_URLResponseInfo { | 82 interface PPB_URLResponseInfo { |
| 83 /** | 83 /** |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 * <code>URLResponseInfo</code>. | 121 * <code>URLResponseInfo</code>. |
| 122 * | 122 * |
| 123 * @return A <code>PP_Resource</code> corresponding to a <code>FileRef</code> | 123 * @return A <code>PP_Resource</code> corresponding to a <code>FileRef</code> |
| 124 * if successful, 0 if <code>PP_URLREQUESTPROPERTY_STREAMTOFILE</code> was | 124 * if successful, 0 if <code>PP_URLREQUESTPROPERTY_STREAMTOFILE</code> was |
| 125 * not requested or if the <code>URLLoader</code> has not been opened yet. | 125 * not requested or if the <code>URLLoader</code> has not been opened yet. |
| 126 */ | 126 */ |
| 127 PP_Resource GetBodyAsFileRef( | 127 PP_Resource GetBodyAsFileRef( |
| 128 [in] PP_Resource response); | 128 [in] PP_Resource response); |
| 129 }; | 129 }; |
| 130 | 130 |
| OLD | NEW |