| OLD | NEW |
| 1 // Copyright (c) 2010 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 #include "ppapi/cpp/dev/file_system_dev.h" | 5 #include "ppapi/cpp/dev/file_system_dev.h" |
| 6 | 6 |
| 7 #include "ppapi/c/dev/ppb_file_system_dev.h" | 7 #include "ppapi/c/dev/ppb_file_system_dev.h" |
| 8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
| 9 #include "ppapi/cpp/completion_callback.h" | 9 #include "ppapi/cpp/completion_callback.h" |
| 10 #include "ppapi/cpp/dev/file_ref_dev.h" | 10 #include "ppapi/cpp/dev/file_ref_dev.h" |
| 11 #include "ppapi/cpp/module.h" | 11 #include "ppapi/cpp/module.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 25 PP_FileSystemType_Dev type) { | 25 PP_FileSystemType_Dev type) { |
| 26 if (!has_interface<PPB_FileSystem_Dev>()) | 26 if (!has_interface<PPB_FileSystem_Dev>()) |
| 27 return; | 27 return; |
| 28 PassRefFromConstructor(get_interface<PPB_FileSystem_Dev>()->Create( | 28 PassRefFromConstructor(get_interface<PPB_FileSystem_Dev>()->Create( |
| 29 instance->pp_instance(), type)); | 29 instance->pp_instance(), type)); |
| 30 } | 30 } |
| 31 | 31 |
| 32 int32_t FileSystem_Dev::Open(int64_t expected_size, | 32 int32_t FileSystem_Dev::Open(int64_t expected_size, |
| 33 const CompletionCallback& cc) { | 33 const CompletionCallback& cc) { |
| 34 if (!has_interface<PPB_FileSystem_Dev>()) | 34 if (!has_interface<PPB_FileSystem_Dev>()) |
| 35 return PP_ERROR_NOINTERFACE; | 35 return cc.MayForce(PP_ERROR_NOINTERFACE); |
| 36 return get_interface<PPB_FileSystem_Dev>()->Open( | 36 return get_interface<PPB_FileSystem_Dev>()->Open( |
| 37 pp_resource(), expected_size, cc.pp_completion_callback()); | 37 pp_resource(), expected_size, cc.pp_completion_callback()); |
| 38 } | 38 } |
| 39 | 39 |
| 40 } // namespace pp | 40 } // namespace pp |
| OLD | NEW |