| OLD | NEW |
| 1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/file_callbacks.h" | 5 #include "webkit/plugins/ppapi/file_callbacks.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ppapi/c/dev/ppb_file_system_dev.h" | 8 #include "ppapi/c/pp_file_info.h" |
| 9 #include "ppapi/c/dev/pp_file_info_dev.h" | |
| 10 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/c/ppb_file_system.h" |
| 11 #include "webkit/fileapi/file_system_types.h" |
| 11 #include "webkit/plugins/ppapi/callbacks.h" | 12 #include "webkit/plugins/ppapi/callbacks.h" |
| 12 #include "webkit/plugins/ppapi/file_type_conversions.h" | 13 #include "webkit/plugins/ppapi/file_type_conversions.h" |
| 13 #include "webkit/plugins/ppapi/plugin_module.h" | 14 #include "webkit/plugins/ppapi/plugin_module.h" |
| 14 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 15 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
| 15 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" | 16 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" |
| 16 #include "webkit/fileapi/file_system_types.h" | |
| 17 | 17 |
| 18 namespace webkit { | 18 namespace webkit { |
| 19 namespace ppapi { | 19 namespace ppapi { |
| 20 | 20 |
| 21 FileCallbacks::FileCallbacks( | 21 FileCallbacks::FileCallbacks( |
| 22 const base::WeakPtr<PluginModule>& module, | 22 const base::WeakPtr<PluginModule>& module, |
| 23 PP_Resource resource_id, | 23 PP_Resource resource_id, |
| 24 PP_CompletionCallback callback, | 24 PP_CompletionCallback callback, |
| 25 PP_FileInfo_Dev* info, | 25 PP_FileInfo* info, |
| 26 scoped_refptr<PPB_FileSystem_Impl> file_system, | 26 scoped_refptr<PPB_FileSystem_Impl> file_system, |
| 27 scoped_refptr<PPB_DirectoryReader_Impl> directory_reader) | 27 scoped_refptr<PPB_DirectoryReader_Impl> directory_reader) |
| 28 : callback_(new TrackedCompletionCallback(module->GetCallbackTracker(), | 28 : callback_(new TrackedCompletionCallback(module->GetCallbackTracker(), |
| 29 resource_id, | 29 resource_id, |
| 30 callback)), | 30 callback)), |
| 31 info_(info), | 31 info_(info), |
| 32 file_system_(file_system), | 32 file_system_(file_system), |
| 33 directory_reader_(directory_reader) { | 33 directory_reader_(directory_reader) { |
| 34 } | 34 } |
| 35 | 35 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 void FileCallbacks::RunCallback(base::PlatformFileError error_code) { | 97 void FileCallbacks::RunCallback(base::PlatformFileError error_code) { |
| 98 if (callback_->completed()) | 98 if (callback_->completed()) |
| 99 return; | 99 return; |
| 100 | 100 |
| 101 callback_->Run(PlatformFileErrorToPepperError(error_code)); | 101 callback_->Run(PlatformFileErrorToPepperError(error_code)); |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace ppapi | 104 } // namespace ppapi |
| 105 } // namespace webkit | 105 } // namespace webkit |
| OLD | NEW |