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_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 17 matching lines...) Expand all Loading... |
28 public: | 28 public: |
29 MTPDeviceDelegateImplMac(const std::string& device_id, | 29 MTPDeviceDelegateImplMac(const std::string& device_id, |
30 const base::FilePath::StringType& synthetic_path); | 30 const base::FilePath::StringType& synthetic_path); |
31 | 31 |
32 // MTPDeviceAsyncDelegate implementation. These functions are called on the | 32 // MTPDeviceAsyncDelegate implementation. These functions are called on the |
33 // IO thread by the async filesystem file util. They forward to | 33 // IO thread by the async filesystem file util. They forward to |
34 // similarly-named methods on the UI thread. | 34 // similarly-named methods on the UI thread. |
35 virtual void GetFileInfo( | 35 virtual void GetFileInfo( |
36 const base::FilePath& file_path, | 36 const base::FilePath& file_path, |
37 const GetFileInfoSuccessCallback& success_callback, | 37 const GetFileInfoSuccessCallback& success_callback, |
38 const ErrorCallback& error_callback) OVERRIDE; | 38 const ErrorCallback& error_callback) override; |
39 | 39 |
40 // Note: passed absolute paths, but expects relative paths in reply. | 40 // Note: passed absolute paths, but expects relative paths in reply. |
41 virtual void ReadDirectory( | 41 virtual void ReadDirectory( |
42 const base::FilePath& root, | 42 const base::FilePath& root, |
43 const ReadDirectorySuccessCallback& success_callback, | 43 const ReadDirectorySuccessCallback& success_callback, |
44 const ErrorCallback& error_callback) OVERRIDE; | 44 const ErrorCallback& error_callback) override; |
45 | 45 |
46 // Note: passed absolute paths. | 46 // Note: passed absolute paths. |
47 virtual void CreateSnapshotFile( | 47 virtual void CreateSnapshotFile( |
48 const base::FilePath& device_file_path, | 48 const base::FilePath& device_file_path, |
49 const base::FilePath& local_path, | 49 const base::FilePath& local_path, |
50 const CreateSnapshotFileSuccessCallback& success_callback, | 50 const CreateSnapshotFileSuccessCallback& success_callback, |
51 const ErrorCallback& error_callback) OVERRIDE; | 51 const ErrorCallback& error_callback) override; |
52 virtual bool IsStreaming() OVERRIDE; | 52 virtual bool IsStreaming() override; |
53 virtual void ReadBytes(const base::FilePath& device_file_path, | 53 virtual void ReadBytes(const base::FilePath& device_file_path, |
54 const scoped_refptr<net::IOBuffer>& buf, | 54 const scoped_refptr<net::IOBuffer>& buf, |
55 int64 offset, | 55 int64 offset, |
56 int buf_len, | 56 int buf_len, |
57 const ReadBytesSuccessCallback& success_callback, | 57 const ReadBytesSuccessCallback& success_callback, |
58 const ErrorCallback& error_callback) OVERRIDE; | 58 const ErrorCallback& error_callback) override; |
59 virtual void CancelPendingTasksAndDeleteDelegate() OVERRIDE; | 59 virtual void CancelPendingTasksAndDeleteDelegate() override; |
60 | 60 |
61 // Forward delegates for ImageCaptureDeviceListener. These are | 61 // Forward delegates for ImageCaptureDeviceListener. These are |
62 // invoked in callbacks of the ImageCapture library on the UI thread. | 62 // invoked in callbacks of the ImageCapture library on the UI thread. |
63 virtual void ItemAdded(const std::string& name, | 63 virtual void ItemAdded(const std::string& name, |
64 const base::File::Info& info); | 64 const base::File::Info& info); |
65 virtual void NoMoreItems(); | 65 virtual void NoMoreItems(); |
66 virtual void DownloadedFile(const std::string& name, | 66 virtual void DownloadedFile(const std::string& name, |
67 base::File::Error error); | 67 base::File::Error error); |
68 | 68 |
69 // Scheduled when early directory reads are requested. The | 69 // Scheduled when early directory reads are requested. The |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 ReadFileTransactionList read_file_transactions_; | 153 ReadFileTransactionList read_file_transactions_; |
154 ReadDirTransactionList read_dir_transactions_; | 154 ReadDirTransactionList read_dir_transactions_; |
155 | 155 |
156 base::WeakPtrFactory<MTPDeviceDelegateImplMac> weak_factory_; | 156 base::WeakPtrFactory<MTPDeviceDelegateImplMac> weak_factory_; |
157 | 157 |
158 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplMac); | 158 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplMac); |
159 }; | 159 }; |
160 | 160 |
161 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_ | 161 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_ |
OLD | NEW |