| 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_REQUEST_INFO_H_ | 5 #ifndef PPAPI_CPP_URL_REQUEST_INFO_H_ |
| 6 #define PPAPI_CPP_URL_REQUEST_INFO_H_ | 6 #define PPAPI_CPP_URL_REQUEST_INFO_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/ppb_url_request_info.h" | 8 #include "ppapi/c/ppb_url_request_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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 } | 47 } |
| 48 bool SetFollowRedirects(bool enable) { | 48 bool SetFollowRedirects(bool enable) { |
| 49 return SetProperty(PP_URLREQUESTPROPERTY_FOLLOWREDIRECTS, enable); | 49 return SetProperty(PP_URLREQUESTPROPERTY_FOLLOWREDIRECTS, enable); |
| 50 } | 50 } |
| 51 bool SetRecordDownloadProgress(bool enable) { | 51 bool SetRecordDownloadProgress(bool enable) { |
| 52 return SetProperty(PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS, enable); | 52 return SetProperty(PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS, enable); |
| 53 } | 53 } |
| 54 bool SetRecordUploadProgress(bool enable) { | 54 bool SetRecordUploadProgress(bool enable) { |
| 55 return SetProperty(PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS, enable); | 55 return SetProperty(PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS, enable); |
| 56 } | 56 } |
| 57 // To use the default referrer, set url_string to an Undefined Var. | 57 // To use the default referrer, set url to an Undefined Var. |
| 58 bool SetCustomReferrerURL(const Var& url_string) { | 58 bool SetCustomReferrerURL(const Var& url) { |
| 59 return SetProperty(PP_URLREQUESTPROPERTY_CUSTOMREFERRERURL, url_string); | 59 return SetProperty(PP_URLREQUESTPROPERTY_CUSTOMREFERRERURL, url); |
| 60 } | 60 } |
| 61 bool SetAllowCrossOriginRequests(bool enable) { | 61 bool SetAllowCrossOriginRequests(bool enable) { |
| 62 return SetProperty(PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS, enable); | 62 return SetProperty(PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS, enable); |
| 63 } | 63 } |
| 64 bool SetAllowCredentials(bool enable) { | 64 bool SetAllowCredentials(bool enable) { |
| 65 return SetProperty(PP_URLREQUESTPROPERTY_ALLOWCREDENTIALS, enable); | 65 return SetProperty(PP_URLREQUESTPROPERTY_ALLOWCREDENTIALS, enable); |
| 66 } | 66 } |
| 67 // To use the default content transfer encoding, set content_transfer_encoding |
| 68 // to an Undefined Var. |
| 69 bool SetCustomContentTransferEncoding(const Var& content_transfer_encoding) { |
| 70 return SetProperty(PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING, |
| 71 content_transfer_encoding); |
| 72 } |
| 67 }; | 73 }; |
| 68 | 74 |
| 69 } // namespace pp | 75 } // namespace pp |
| 70 | 76 |
| 71 #endif // PPAPI_CPP_URL_REQUEST_INFO_H_ | 77 #endif // PPAPI_CPP_URL_REQUEST_INFO_H_ |
| OLD | NEW |