| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "webkit/browser/fileapi/async_file_util.h" | 11 #include "webkit/browser/fileapi/async_file_util.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class FilePath; | 14 class FilePath; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 class IOBuffer; | 18 class IOBuffer; |
| 19 } | 19 } |
| 20 | 20 |
| 21 // Asynchronous delegate for media transfer protocol (MTP) device to perform | 21 // Asynchronous delegate for media transfer protocol (MTP) device to perform |
| 22 // media device isolated file system operations. Class that implements this | 22 // media device file system operations. Class that implements this |
| 23 // delegate does the actual communication with the MTP device. | 23 // delegate does the actual communication with the MTP device. |
| 24 // The lifetime of the delegate is managed by the MTPDeviceMapService class. | 24 // The lifetime of the delegate is managed by the MTPDeviceMapService class. |
| 25 // Member functions and callbacks run on the IO thread. | 25 // Member functions and callbacks run on the IO thread. |
| 26 class MTPDeviceAsyncDelegate { | 26 class MTPDeviceAsyncDelegate { |
| 27 public: | 27 public: |
| 28 // A callback to be called when GetFileInfo method call succeeds. | 28 // A callback to be called when GetFileInfo method call succeeds. |
| 29 typedef base::Callback< | 29 typedef base::Callback< |
| 30 void(const base::File::Info& file_info)> GetFileInfoSuccessCallback; | 30 void(const base::File::Info& file_info)> GetFileInfoSuccessCallback; |
| 31 | 31 |
| 32 // A callback to be called when ReadDirectory method call succeeds. | 32 // A callback to be called when ReadDirectory method call succeeds. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 typedef base::Callback<void(MTPDeviceAsyncDelegate*)> | 116 typedef base::Callback<void(MTPDeviceAsyncDelegate*)> |
| 117 CreateMTPDeviceAsyncDelegateCallback; | 117 CreateMTPDeviceAsyncDelegateCallback; |
| 118 | 118 |
| 119 void CreateMTPDeviceAsyncDelegate( | 119 void CreateMTPDeviceAsyncDelegate( |
| 120 const base::FilePath::StringType& device_location, | 120 const base::FilePath::StringType& device_location, |
| 121 const CreateMTPDeviceAsyncDelegateCallback& callback); | 121 const CreateMTPDeviceAsyncDelegateCallback& callback); |
| 122 | 122 |
| 123 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ | 123 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ |
| OLD | NEW |