| 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 // From ppb_url_request_info.idl modified Tue Aug 20 08:13:36 2013. | 5 // From ppb_url_request_info.idl modified Mon May 6 10:11:29 2013. |
| 6 | 6 |
| 7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
| 8 #include "ppapi/c/ppb_url_request_info.h" | 8 #include "ppapi/c/ppb_url_request_info.h" |
| 9 #include "ppapi/shared_impl/tracked_callback.h" | 9 #include "ppapi/shared_impl/tracked_callback.h" |
| 10 #include "ppapi/thunk/enter.h" | 10 #include "ppapi/thunk/enter.h" |
| 11 #include "ppapi/thunk/ppapi_thunk_export.h" | 11 #include "ppapi/thunk/ppapi_thunk_export.h" |
| 12 #include "ppapi/thunk/ppb_url_request_info_api.h" | 12 #include "ppapi/thunk/ppb_url_request_info_api.h" |
| 13 | 13 |
| 14 namespace ppapi { | 14 namespace ppapi { |
| 15 namespace thunk { | 15 namespace thunk { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 PP_Bool AppendFileToBody(PP_Resource request, | 51 PP_Bool AppendFileToBody(PP_Resource request, |
| 52 PP_Resource file_ref, | 52 PP_Resource file_ref, |
| 53 int64_t start_offset, | 53 int64_t start_offset, |
| 54 int64_t number_of_bytes, | 54 int64_t number_of_bytes, |
| 55 PP_Time expected_last_modified_time) { | 55 PP_Time expected_last_modified_time) { |
| 56 VLOG(4) << "PPB_URLRequestInfo::AppendFileToBody()"; | 56 VLOG(4) << "PPB_URLRequestInfo::AppendFileToBody()"; |
| 57 EnterResource<PPB_URLRequestInfo_API> enter(request, true); | 57 EnterResource<PPB_URLRequestInfo_API> enter(request, true); |
| 58 if (enter.failed()) | 58 if (enter.failed()) |
| 59 return PP_FALSE; | 59 return PP_FALSE; |
| 60 return enter.object()->AppendFileToBody(file_ref, | 60 return enter.object()->AppendFileToBody( |
| 61 start_offset, | 61 file_ref, start_offset, number_of_bytes, expected_last_modified_time); |
| 62 number_of_bytes, | |
| 63 expected_last_modified_time); | |
| 64 } | 62 } |
| 65 | 63 |
| 66 const PPB_URLRequestInfo_1_0 g_ppb_urlrequestinfo_thunk_1_0 = { | 64 const PPB_URLRequestInfo_1_0 g_ppb_urlrequestinfo_thunk_1_0 = { // |
| 67 &Create, | 65 &Create, // |
| 68 &IsURLRequestInfo, | 66 &IsURLRequestInfo, // |
| 69 &SetProperty, | 67 &SetProperty, // |
| 70 &AppendDataToBody, | 68 &AppendDataToBody, // |
| 71 &AppendFileToBody | 69 &AppendFileToBody // |
| 72 }; | 70 }; |
| 73 | 71 |
| 74 } // namespace | 72 } // namespace |
| 75 | 73 |
| 76 PPAPI_THUNK_EXPORT const PPB_URLRequestInfo_1_0* | 74 PPAPI_THUNK_EXPORT const PPB_URLRequestInfo_1_0* |
| 77 GetPPB_URLRequestInfo_1_0_Thunk() { | 75 GetPPB_URLRequestInfo_1_0_Thunk() { |
| 78 return &g_ppb_urlrequestinfo_thunk_1_0; | 76 return &g_ppb_urlrequestinfo_thunk_1_0; |
| 79 } | 77 } |
| 80 | 78 |
| 81 } // namespace thunk | 79 } // namespace thunk |
| 82 } // namespace ppapi | 80 } // namespace ppapi |
| OLD | NEW |