OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 net::IOBuffer* buf, int64 offset, int buf_len, | 141 net::IOBuffer* buf, int64 offset, int buf_len, |
142 const ReadBytesSuccessCallback& success_callback, | 142 const ReadBytesSuccessCallback& success_callback, |
143 const ErrorCallback& error_callback); | 143 const ErrorCallback& error_callback); |
144 virtual void MoveFileLocalInternal( | 144 virtual void MoveFileLocalInternal( |
145 const base::FilePath& source_file_path, | 145 const base::FilePath& source_file_path, |
146 const base::FilePath& device_file_path, | 146 const base::FilePath& device_file_path, |
147 const CreateTemporaryFileCallback& create_temporary_file_callback, | 147 const CreateTemporaryFileCallback& create_temporary_file_callback, |
148 const MoveFileLocalSuccessCallback& success_callback, | 148 const MoveFileLocalSuccessCallback& success_callback, |
149 const ErrorCallback& error_callback, | 149 const ErrorCallback& error_callback, |
150 const base::File::Info& source_file_info); | 150 const base::File::Info& source_file_info); |
151 virtual void CopyFileFromLocalInternal( | 151 virtual void OnDidOpenFDToCopyFileFromLocal( |
152 const base::FilePath& device_file_path, | 152 const base::FilePath& device_file_path, |
153 const CopyFileFromLocalSuccessCallback& success_callback, | 153 const CopyFileFromLocalSuccessCallback& success_callback, |
154 const ErrorCallback& error_callback, | 154 const ErrorCallback& error_callback, |
155 const int source_file_descriptor); | 155 const std::pair<int, int>& open_fd_result); |
156 virtual void DeleteFileInternal( | 156 virtual void DeleteFileInternal( |
157 const base::FilePath& file_path, | 157 const base::FilePath& file_path, |
158 const DeleteFileSuccessCallback& success_callback, | 158 const DeleteFileSuccessCallback& success_callback, |
159 const ErrorCallback& error_callback, | 159 const ErrorCallback& error_callback, |
160 const base::File::Info& file_info); | 160 const base::File::Info& file_info); |
161 virtual void DeleteDirectoryInternal( | 161 virtual void DeleteDirectoryInternal( |
162 const base::FilePath& file_path, | 162 const base::FilePath& file_path, |
163 const DeleteDirectorySuccessCallback& success_callback, | 163 const DeleteDirectorySuccessCallback& success_callback, |
164 const ErrorCallback& error_callback, | 164 const ErrorCallback& error_callback, |
165 const base::File::Info& file_info); | 165 const base::File::Info& file_info); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 // Called when GetFileInfo() succeeds. GetFileInfo() is invoked to | 235 // Called when GetFileInfo() succeeds. GetFileInfo() is invoked to |
236 // create the snapshot file of |snapshot_request_info.device_file_path|. | 236 // create the snapshot file of |snapshot_request_info.device_file_path|. |
237 // |file_info| specifies the device file metadata details. | 237 // |file_info| specifies the device file metadata details. |
238 // | 238 // |
239 // Posts a task on the UI thread to copy the data contents of the device file | 239 // Posts a task on the UI thread to copy the data contents of the device file |
240 // to the snapshot file. | 240 // to the snapshot file. |
241 void OnDidGetFileInfoToCreateSnapshotFile( | 241 void OnDidGetFileInfoToCreateSnapshotFile( |
242 scoped_ptr<SnapshotRequestInfo> snapshot_request_info, | 242 scoped_ptr<SnapshotRequestInfo> snapshot_request_info, |
243 const base::File::Info& file_info); | 243 const base::File::Info& file_info); |
244 | 244 |
245 // Called when GetFileInfo() for destination path succeeded to copy file from | |
Lei Zhang
2015/03/27 00:08:19
... succeeded for a CopyFileFromLocal operation.
yawano
2015/03/27 01:53:00
Done.
| |
246 // local. | |
247 void OnDidGetDestFileInfoToCopyFileFromLocal( | |
248 const ErrorCallback& error_callback, | |
249 const base::File::Info& file_info); | |
250 | |
251 // Called when GetFileInfo() for destination path failed to copy file from | |
252 // local. | |
253 void OnGetDestFileInfoErrorToCopyFileFromLocal( | |
254 const base::FilePath& source_file_path, | |
255 const base::FilePath& device_file_path, | |
256 const CopyFileFromLocalSuccessCallback& success_callback, | |
257 const ErrorCallback& error_callback, | |
258 const base::File::Error error); | |
259 | |
245 // Called when ReadDirectory() succeeds. | 260 // Called when ReadDirectory() succeeds. |
246 // | 261 // |
247 // |dir_id| is the directory read. | 262 // |dir_id| is the directory read. |
248 // |success_callback| is invoked to notify the caller about the directory | 263 // |success_callback| is invoked to notify the caller about the directory |
249 // file entries. | 264 // file entries. |
250 // |file_list| contains the directory file entries with their file ids. | 265 // |file_list| contains the directory file entries with their file ids. |
251 // |has_more| is true if there are more file entries to read. | 266 // |has_more| is true if there are more file entries to read. |
252 void OnDidReadDirectory(uint32 dir_id, | 267 void OnDidReadDirectory(uint32 dir_id, |
253 const ReadDirectorySuccessCallback& success_callback, | 268 const ReadDirectorySuccessCallback& success_callback, |
254 const storage::AsyncFileUtil::EntryList& file_list, | 269 const storage::AsyncFileUtil::EntryList& file_list, |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
408 // the ReadDirectory operation. | 423 // the ReadDirectory operation. |
409 FileInfoCache file_info_cache_; | 424 FileInfoCache file_info_cache_; |
410 | 425 |
411 // For callbacks that may run after destruction. | 426 // For callbacks that may run after destruction. |
412 base::WeakPtrFactory<MTPDeviceDelegateImplLinux> weak_ptr_factory_; | 427 base::WeakPtrFactory<MTPDeviceDelegateImplLinux> weak_ptr_factory_; |
413 | 428 |
414 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplLinux); | 429 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplLinux); |
415 }; | 430 }; |
416 | 431 |
417 #endif // CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H _ | 432 #endif // CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H _ |
OLD | NEW |