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 #ifndef PPAPI_CPP_URL_RESPONSE_INFO_H_ | 5 #ifndef PPAPI_CPP_URL_RESPONSE_INFO_H_ |
6 #define PPAPI_CPP_URL_RESPONSE_INFO_H_ | 6 #define PPAPI_CPP_URL_RESPONSE_INFO_H_ |
7 | 7 |
8 #include "ppapi/c/ppb_url_response_info.h" | 8 #include "ppapi/c/ppb_url_response_info.h" |
9 #include "ppapi/cpp/resource.h" | 9 #include "ppapi/cpp/resource.h" |
10 #include "ppapi/cpp/var.h" | 10 #include "ppapi/cpp/var.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 /// @param[in] resource A <code>PP_Resource</code>. | 32 /// @param[in] resource A <code>PP_Resource</code>. |
33 URLResponseInfo(PassRef, PP_Resource resource); | 33 URLResponseInfo(PassRef, PP_Resource resource); |
34 | 34 |
35 /// The copy constructor for <code>URLResponseInfo</code>. | 35 /// The copy constructor for <code>URLResponseInfo</code>. |
36 URLResponseInfo(const URLResponseInfo& other); | 36 URLResponseInfo(const URLResponseInfo& other); |
37 | 37 |
38 /// This function gets a response property. | 38 /// This function gets a response property. |
39 /// | 39 /// |
40 /// @param[in] property A <code>PP_URLResponseProperty</code> identifying the | 40 /// @param[in] property A <code>PP_URLResponseProperty</code> identifying the |
41 /// type of property in the response. | 41 /// type of property in the response. |
| 42 /// |
42 /// @return A <code>Var</code> containing the response property value if | 43 /// @return A <code>Var</code> containing the response property value if |
43 /// successful, <code>is_undefined Var</code> if an input parameter is | 44 /// successful, <code>is_undefined Var</code> if an input parameter is |
44 /// invalid. | 45 /// invalid. |
45 Var GetProperty(PP_URLResponseProperty property) const; | 46 Var GetProperty(PP_URLResponseProperty property) const; |
46 | 47 |
47 /// This function returns a <code>FileRef</code> | 48 /// This function returns a <code>FileRef</code> |
48 /// pointing to the file containing the response body. This | 49 /// pointing to the file containing the response body. This |
49 /// is only valid if <code>PP_URLREQUESTPROPERTY_STREAMTOFILE</code> was set | 50 /// is only valid if <code>PP_URLREQUESTPROPERTY_STREAMTOFILE</code> was set |
50 /// on the <code>URLRequestInfo</code> used to produce this response. This | 51 /// on the <code>URLRequestInfo</code> used to produce this response. This |
51 /// file remains valid until the <code>URLLoader</code> associated with this | 52 /// file remains valid until the <code>URLLoader</code> associated with this |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 /// value if successful, <code>is_undefined Var</code> if an input parameter | 114 /// value if successful, <code>is_undefined Var</code> if an input parameter |
114 /// is invalid. | 115 /// is invalid. |
115 Var GetHeaders() const { | 116 Var GetHeaders() const { |
116 return GetProperty(PP_URLRESPONSEPROPERTY_HEADERS); | 117 return GetProperty(PP_URLRESPONSEPROPERTY_HEADERS); |
117 } | 118 } |
118 }; | 119 }; |
119 | 120 |
120 } // namespace pp | 121 } // namespace pp |
121 | 122 |
122 #endif // PPAPI_CPP_URL_RESPONSE_INFO_H_ | 123 #endif // PPAPI_CPP_URL_RESPONSE_INFO_H_ |
OLD | NEW |