| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "ppapi/c/dev/ppb_file_system_dev.h" | 9 #include "ppapi/c/dev/ppb_file_system_dev.h" |
| 10 #include "ppapi/c/dev/pp_file_info_dev.h" | 10 #include "ppapi/c/dev/pp_file_info_dev.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 info_->system_type = file_system_->type(); | 57 info_->system_type = file_system_->type(); |
| 58 if (file_info.is_directory) | 58 if (file_info.is_directory) |
| 59 info_->type = PP_FILETYPE_DIRECTORY; | 59 info_->type = PP_FILETYPE_DIRECTORY; |
| 60 else | 60 else |
| 61 info_->type = PP_FILETYPE_REGULAR; | 61 info_->type = PP_FILETYPE_REGULAR; |
| 62 | 62 |
| 63 callback_->Run(PP_OK); | 63 callback_->Run(PP_OK); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void FileCallbacks::DidReadDirectory( | 66 void FileCallbacks::DidReadDirectory( |
| 67 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { | 67 const std::vector<base::FileUtilProxyBase::Entry>& entries, bool has_more) { |
| 68 if (callback_->completed()) | 68 if (callback_->completed()) |
| 69 return; | 69 return; |
| 70 | 70 |
| 71 DCHECK(directory_reader_); | 71 DCHECK(directory_reader_); |
| 72 directory_reader_->AddNewEntries(entries, has_more); | 72 directory_reader_->AddNewEntries(entries, has_more); |
| 73 | 73 |
| 74 callback_->Run(PP_OK); | 74 callback_->Run(PP_OK); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void FileCallbacks::DidOpenFileSystem(const std::string&, | 77 void FileCallbacks::DidOpenFileSystem(const std::string&, |
| (...skipping 18 matching lines...) Expand all 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 |