| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "ppapi/cpp/url_request_info.h" | 5 #include "ppapi/cpp/url_request_info.h" |
| 6 | 6 |
| 7 #include "ppapi/cpp/common.h" | 7 #include "ppapi/cpp/common.h" |
| 8 #include "ppapi/cpp/dev/file_ref_dev.h" | 8 #include "ppapi/cpp/dev/file_ref_dev.h" |
| 9 #include "ppapi/cpp/instance.h" | 9 #include "ppapi/cpp/instance.h" |
| 10 #include "ppapi/cpp/module.h" | 10 #include "ppapi/cpp/module.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 } | 32 } |
| 33 | 33 |
| 34 bool URLRequestInfo::SetProperty(PP_URLRequestProperty property, | 34 bool URLRequestInfo::SetProperty(PP_URLRequestProperty property, |
| 35 const Var& value) { | 35 const Var& value) { |
| 36 if (!has_interface<PPB_URLRequestInfo>()) | 36 if (!has_interface<PPB_URLRequestInfo>()) |
| 37 return false; | 37 return false; |
| 38 return PPBoolToBool(get_interface<PPB_URLRequestInfo>()->SetProperty( | 38 return PPBoolToBool(get_interface<PPB_URLRequestInfo>()->SetProperty( |
| 39 pp_resource(), property, value.pp_var())); | 39 pp_resource(), property, value.pp_var())); |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool URLRequestInfo::AppendDataToBody(const char* data, uint32_t len) { | 42 bool URLRequestInfo::AppendDataToBody(const void* data, uint32_t len) { |
| 43 if (!has_interface<PPB_URLRequestInfo>()) | 43 if (!has_interface<PPB_URLRequestInfo>()) |
| 44 return false; | 44 return false; |
| 45 return PPBoolToBool(get_interface<PPB_URLRequestInfo>()->AppendDataToBody( | 45 return PPBoolToBool(get_interface<PPB_URLRequestInfo>()->AppendDataToBody( |
| 46 pp_resource(), data, len)); | 46 pp_resource(), data, len)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool URLRequestInfo::AppendFileToBody(const FileRef_Dev& file_ref, | 49 bool URLRequestInfo::AppendFileToBody(const FileRef_Dev& file_ref, |
| 50 PP_Time expected_last_modified_time) { | 50 PP_Time expected_last_modified_time) { |
| 51 if (!has_interface<PPB_URLRequestInfo>()) | 51 if (!has_interface<PPB_URLRequestInfo>()) |
| 52 return false; | 52 return false; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 69 return PPBoolToBool( | 69 return PPBoolToBool( |
| 70 get_interface<PPB_URLRequestInfo>()->AppendFileToBody( | 70 get_interface<PPB_URLRequestInfo>()->AppendFileToBody( |
| 71 pp_resource(), | 71 pp_resource(), |
| 72 file_ref.pp_resource(), | 72 file_ref.pp_resource(), |
| 73 start_offset, | 73 start_offset, |
| 74 length, | 74 length, |
| 75 expected_last_modified_time)); | 75 expected_last_modified_time)); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace pp | 78 } // namespace pp |
| OLD | NEW |