Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Side by Side Diff: ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c

Issue 69663002: PPAPI: Implement PPB_FileMapping on POSIX (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bbudge review comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2014 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 /* NOTE: this is auto-generated from IDL */ 6 /* NOTE: this is auto-generated from IDL */
7 #include "ppapi/generators/pnacl_shim.h" 7 #include "ppapi/generators/pnacl_shim.h"
8 8
9 #include "ppapi/c/ppb.h" 9 #include "ppapi/c/ppb.h"
10 #include "ppapi/c/dev/ppb_alarms_dev.h" 10 #include "ppapi/c/dev/ppb_alarms_dev.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 /* End wrapper methods for PPB_FileIO_1_1 */ 415 /* End wrapper methods for PPB_FileIO_1_1 */
416 416
417 /* Begin wrapper methods for PPB_FileMapping_0_1 */ 417 /* Begin wrapper methods for PPB_FileMapping_0_1 */
418 418
419 static int32_t Pnacl_M34_PPB_FileMapping_Map(PP_Instance instance, PP_Resource f ile_io, int64_t length, uint32_t map_protection, uint32_t map_flags, int64_t off set, void** address, struct PP_CompletionCallback* callback) { 419 static int32_t Pnacl_M34_PPB_FileMapping_Map(PP_Instance instance, PP_Resource f ile_io, int64_t length, uint32_t map_protection, uint32_t map_flags, int64_t off set, void** address, struct PP_CompletionCallback* callback) {
420 const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_ 1.real_iface; 420 const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_ 1.real_iface;
421 return iface->Map(instance, file_io, length, map_protection, map_flags, offset , address, *callback); 421 return iface->Map(instance, file_io, length, map_protection, map_flags, offset , address, *callback);
422 } 422 }
423 423
424 static int32_t Pnacl_M34_PPB_FileMapping_Unmap(PP_Instance file_io, const void* address, int64_t length, struct PP_CompletionCallback* callback) { 424 static int32_t Pnacl_M34_PPB_FileMapping_Unmap(PP_Instance instance, const void* address, int64_t length, struct PP_CompletionCallback* callback) {
425 const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_ 1.real_iface; 425 const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_ 1.real_iface;
426 return iface->Unmap(file_io, address, length, *callback); 426 return iface->Unmap(instance, address, length, *callback);
427 } 427 }
428 428
429 static int64_t Pnacl_M34_PPB_FileMapping_GetMapPageSize(PP_Instance file_io) { 429 static int64_t Pnacl_M34_PPB_FileMapping_GetMapPageSize(PP_Instance instance) {
430 const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_ 1.real_iface; 430 const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_ 1.real_iface;
431 return iface->GetMapPageSize(file_io); 431 return iface->GetMapPageSize(instance);
432 } 432 }
433 433
434 /* End wrapper methods for PPB_FileMapping_0_1 */ 434 /* End wrapper methods for PPB_FileMapping_0_1 */
435 435
436 /* Begin wrapper methods for PPB_FileRef_1_0 */ 436 /* Begin wrapper methods for PPB_FileRef_1_0 */
437 437
438 static PP_Resource Pnacl_M14_PPB_FileRef_Create(PP_Resource file_system, const c har* path) { 438 static PP_Resource Pnacl_M14_PPB_FileRef_Create(PP_Resource file_system, const c har* path) {
439 const struct PPB_FileRef_1_0 *iface = Pnacl_WrapperInfo_PPB_FileRef_1_0.real_i face; 439 const struct PPB_FileRef_1_0 *iface = Pnacl_WrapperInfo_PPB_FileRef_1_0.real_i face;
440 return iface->Create(file_system, path); 440 return iface->Create(file_system, path);
441 } 441 }
(...skipping 3743 matching lines...) Expand 10 before | Expand all | Expand 10 after
4185 .Read = (int32_t (*)(PP_Resource file_io, int64_t offset, char* buffer, int3 2_t bytes_to_read, struct PP_CompletionCallback callback))&Pnacl_M25_PPB_FileIO_ Read, 4185 .Read = (int32_t (*)(PP_Resource file_io, int64_t offset, char* buffer, int3 2_t bytes_to_read, struct PP_CompletionCallback callback))&Pnacl_M25_PPB_FileIO_ Read,
4186 .Write = (int32_t (*)(PP_Resource file_io, int64_t offset, const char* buffe r, int32_t bytes_to_write, struct PP_CompletionCallback callback))&Pnacl_M25_PPB _FileIO_Write, 4186 .Write = (int32_t (*)(PP_Resource file_io, int64_t offset, const char* buffe r, int32_t bytes_to_write, struct PP_CompletionCallback callback))&Pnacl_M25_PPB _FileIO_Write,
4187 .SetLength = (int32_t (*)(PP_Resource file_io, int64_t length, struct PP_Com pletionCallback callback))&Pnacl_M25_PPB_FileIO_SetLength, 4187 .SetLength = (int32_t (*)(PP_Resource file_io, int64_t length, struct PP_Com pletionCallback callback))&Pnacl_M25_PPB_FileIO_SetLength,
4188 .Flush = (int32_t (*)(PP_Resource file_io, struct PP_CompletionCallback call back))&Pnacl_M25_PPB_FileIO_Flush, 4188 .Flush = (int32_t (*)(PP_Resource file_io, struct PP_CompletionCallback call back))&Pnacl_M25_PPB_FileIO_Flush,
4189 .Close = (void (*)(PP_Resource file_io))&Pnacl_M25_PPB_FileIO_Close, 4189 .Close = (void (*)(PP_Resource file_io))&Pnacl_M25_PPB_FileIO_Close,
4190 .ReadToArray = (int32_t (*)(PP_Resource file_io, int64_t offset, int32_t max _read_length, struct PP_ArrayOutput* output, struct PP_CompletionCallback callba ck))&Pnacl_M25_PPB_FileIO_ReadToArray 4190 .ReadToArray = (int32_t (*)(PP_Resource file_io, int64_t offset, int32_t max _read_length, struct PP_ArrayOutput* output, struct PP_CompletionCallback callba ck))&Pnacl_M25_PPB_FileIO_ReadToArray
4191 }; 4191 };
4192 4192
4193 static struct PPB_FileMapping_0_1 Pnacl_Wrappers_PPB_FileMapping_0_1 = { 4193 static struct PPB_FileMapping_0_1 Pnacl_Wrappers_PPB_FileMapping_0_1 = {
4194 .Map = (int32_t (*)(PP_Instance instance, PP_Resource file_io, int64_t lengt h, uint32_t map_protection, uint32_t map_flags, int64_t offset, void** address, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_FileMapping_Map, 4194 .Map = (int32_t (*)(PP_Instance instance, PP_Resource file_io, int64_t lengt h, uint32_t map_protection, uint32_t map_flags, int64_t offset, void** address, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_FileMapping_Map,
4195 .Unmap = (int32_t (*)(PP_Instance file_io, const void* address, int64_t leng th, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_FileMapping_Unmap, 4195 .Unmap = (int32_t (*)(PP_Instance instance, const void* address, int64_t len gth, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_FileMapping_Unmap,
4196 .GetMapPageSize = (int64_t (*)(PP_Instance file_io))&Pnacl_M34_PPB_FileMappi ng_GetMapPageSize 4196 .GetMapPageSize = (int64_t (*)(PP_Instance instance))&Pnacl_M34_PPB_FileMapp ing_GetMapPageSize
4197 }; 4197 };
4198 4198
4199 static struct PPB_FileRef_1_0 Pnacl_Wrappers_PPB_FileRef_1_0 = { 4199 static struct PPB_FileRef_1_0 Pnacl_Wrappers_PPB_FileRef_1_0 = {
4200 .Create = (PP_Resource (*)(PP_Resource file_system, const char* path))&Pnacl _M14_PPB_FileRef_Create, 4200 .Create = (PP_Resource (*)(PP_Resource file_system, const char* path))&Pnacl _M14_PPB_FileRef_Create,
4201 .IsFileRef = (PP_Bool (*)(PP_Resource resource))&Pnacl_M14_PPB_FileRef_IsFil eRef, 4201 .IsFileRef = (PP_Bool (*)(PP_Resource resource))&Pnacl_M14_PPB_FileRef_IsFil eRef,
4202 .GetFileSystemType = (PP_FileSystemType (*)(PP_Resource file_ref))&Pnacl_M14 _PPB_FileRef_GetFileSystemType, 4202 .GetFileSystemType = (PP_FileSystemType (*)(PP_Resource file_ref))&Pnacl_M14 _PPB_FileRef_GetFileSystemType,
4203 .GetName = (struct PP_Var (*)(PP_Resource file_ref))&Pnacl_M14_PPB_FileRef_G etName, 4203 .GetName = (struct PP_Var (*)(PP_Resource file_ref))&Pnacl_M14_PPB_FileRef_G etName,
4204 .GetPath = (struct PP_Var (*)(PP_Resource file_ref))&Pnacl_M14_PPB_FileRef_G etPath, 4204 .GetPath = (struct PP_Var (*)(PP_Resource file_ref))&Pnacl_M14_PPB_FileRef_G etPath,
4205 .GetParent = (PP_Resource (*)(PP_Resource file_ref))&Pnacl_M14_PPB_FileRef_G etParent, 4205 .GetParent = (PP_Resource (*)(PP_Resource file_ref))&Pnacl_M14_PPB_FileRef_G etParent,
4206 .MakeDirectory = (int32_t (*)(PP_Resource directory_ref, PP_Bool make_ancest ors, struct PP_CompletionCallback callback))&Pnacl_M14_PPB_FileRef_MakeDirectory , 4206 .MakeDirectory = (int32_t (*)(PP_Resource directory_ref, PP_Bool make_ancest ors, struct PP_CompletionCallback callback))&Pnacl_M14_PPB_FileRef_MakeDirectory ,
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after
6022 if (NULL == iface) return NULL; 6022 if (NULL == iface) return NULL;
6023 wrapper->real_iface = iface; 6023 wrapper->real_iface = iface;
6024 } 6024 }
6025 6025
6026 if (wrapper->wrapped_iface) { 6026 if (wrapper->wrapped_iface) {
6027 return wrapper->wrapped_iface; 6027 return wrapper->wrapped_iface;
6028 } else { 6028 } else {
6029 return wrapper->real_iface; 6029 return wrapper->real_iface;
6030 } 6030 }
6031 } 6031 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698