| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 The Native Client Authors. All rights reserved. | 2 * Copyright 2010 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include "native_client/tests/fake_browser_ppapi/fake_file_io_trusted.h" | 7 #include "native_client/tests/fake_browser_ppapi/fake_file_io_trusted.h" |
| 8 | 8 |
| 9 #include "native_client/src/include/nacl_macros.h" | 9 #include "native_client/src/include/nacl_macros.h" |
| 10 #include "native_client/src/include/portability.h" | 10 #include "native_client/src/include/portability.h" |
| 11 #include "native_client/src/shared/ppapi_proxy/utility.h" | |
| 12 | 11 |
| 13 #include "native_client/tests/fake_browser_ppapi/fake_file_io.h" | 12 #include "native_client/tests/fake_browser_ppapi/fake_file_io.h" |
| 14 #include "native_client/tests/fake_browser_ppapi/fake_resource.h" | 13 #include "native_client/tests/fake_browser_ppapi/fake_resource.h" |
| 14 #include "native_client/tests/fake_browser_ppapi/utility.h" |
| 15 | 15 |
| 16 #include "ppapi/c/pp_errors.h" | 16 #include "ppapi/c/pp_errors.h" |
| 17 #include "ppapi/c/pp_completion_callback.h" | 17 #include "ppapi/c/pp_completion_callback.h" |
| 18 #include "ppapi/c/pp_resource.h" | 18 #include "ppapi/c/pp_resource.h" |
| 19 | 19 |
| 20 using ppapi_proxy::DebugPrintf; | 20 using fake_browser_ppapi::DebugPrintf; |
| 21 | 21 |
| 22 namespace fake_browser_ppapi { | 22 namespace fake_browser_ppapi { |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 int32_t GetOSFileDescriptor(PP_Resource file_io_id) { | 26 int32_t GetOSFileDescriptor(PP_Resource file_io_id) { |
| 27 DebugPrintf("FileIOTrusted::GetOSFileDescriptor: file_io_id=%"NACL_PRId64"\n", | 27 DebugPrintf("FileIOTrusted::GetOSFileDescriptor: file_io_id=%"NACL_PRId64"\n", |
| 28 file_io_id); | 28 file_io_id); |
| 29 FileIO* file_io = GetResource(file_io_id)->AsFileIO(); | 29 FileIO* file_io = GetResource(file_io_id)->AsFileIO(); |
| 30 if (file_io == NULL) | 30 if (file_io == NULL) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 const PPB_FileIOTrusted_Dev* FileIOTrusted::GetInterface() { | 62 const PPB_FileIOTrusted_Dev* FileIOTrusted::GetInterface() { |
| 63 static const PPB_FileIOTrusted_Dev file_io_trusted_interface = { | 63 static const PPB_FileIOTrusted_Dev file_io_trusted_interface = { |
| 64 GetOSFileDescriptor, | 64 GetOSFileDescriptor, |
| 65 WillWrite, | 65 WillWrite, |
| 66 WillSetLength | 66 WillSetLength |
| 67 }; | 67 }; |
| 68 return &file_io_trusted_interface; | 68 return &file_io_trusted_interface; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace fake_browser_ppapi | 71 } // namespace fake_browser_ppapi |
| OLD | NEW |