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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Defer the device initializations until the first file operation request. | 67 // Defer the device initializations until the first file operation request. |
68 // Do all the initializations in EnsureInitAndRunTask() function. | 68 // Do all the initializations in EnsureInitAndRunTask() function. |
69 explicit MTPDeviceDelegateImplLinux(const std::string& device_location); | 69 explicit MTPDeviceDelegateImplLinux(const std::string& device_location); |
70 | 70 |
71 // Destructed via CancelPendingTasksAndDeleteDelegate(). | 71 // Destructed via CancelPendingTasksAndDeleteDelegate(). |
72 virtual ~MTPDeviceDelegateImplLinux(); | 72 virtual ~MTPDeviceDelegateImplLinux(); |
73 | 73 |
74 // MTPDeviceAsyncDelegate: | 74 // MTPDeviceAsyncDelegate: |
75 virtual void GetFileInfo(const base::FilePath& file_path, | 75 virtual void GetFileInfo(const base::FilePath& file_path, |
76 const GetFileInfoSuccessCallback& success_callback, | 76 const GetFileInfoSuccessCallback& success_callback, |
77 const ErrorCallback& error_callback) OVERRIDE; | 77 const ErrorCallback& error_callback) override; |
78 virtual void ReadDirectory( | 78 virtual void ReadDirectory( |
79 const base::FilePath& root, | 79 const base::FilePath& root, |
80 const ReadDirectorySuccessCallback& success_callback, | 80 const ReadDirectorySuccessCallback& success_callback, |
81 const ErrorCallback& error_callback) OVERRIDE; | 81 const ErrorCallback& error_callback) override; |
82 virtual void CreateSnapshotFile( | 82 virtual void CreateSnapshotFile( |
83 const base::FilePath& device_file_path, | 83 const base::FilePath& device_file_path, |
84 const base::FilePath& local_path, | 84 const base::FilePath& local_path, |
85 const CreateSnapshotFileSuccessCallback& success_callback, | 85 const CreateSnapshotFileSuccessCallback& success_callback, |
86 const ErrorCallback& error_callback) OVERRIDE; | 86 const ErrorCallback& error_callback) override; |
87 virtual bool IsStreaming() OVERRIDE; | 87 virtual bool IsStreaming() override; |
88 virtual void ReadBytes(const base::FilePath& device_file_path, | 88 virtual void ReadBytes(const base::FilePath& device_file_path, |
89 const scoped_refptr<net::IOBuffer>& buf, | 89 const scoped_refptr<net::IOBuffer>& buf, |
90 int64 offset, | 90 int64 offset, |
91 int buf_len, | 91 int buf_len, |
92 const ReadBytesSuccessCallback& success_callback, | 92 const ReadBytesSuccessCallback& success_callback, |
93 const ErrorCallback& error_callback) OVERRIDE; | 93 const ErrorCallback& error_callback) override; |
94 virtual void CancelPendingTasksAndDeleteDelegate() OVERRIDE; | 94 virtual void CancelPendingTasksAndDeleteDelegate() override; |
95 | 95 |
96 // The internal methods correspond to the similarly named methods above. | 96 // The internal methods correspond to the similarly named methods above. |
97 // The |root_node_| cache should be filled at this point. | 97 // The |root_node_| cache should be filled at this point. |
98 virtual void GetFileInfoInternal( | 98 virtual void GetFileInfoInternal( |
99 const base::FilePath& file_path, | 99 const base::FilePath& file_path, |
100 const GetFileInfoSuccessCallback& success_callback, | 100 const GetFileInfoSuccessCallback& success_callback, |
101 const ErrorCallback& error_callback); | 101 const ErrorCallback& error_callback); |
102 virtual void ReadDirectoryInternal( | 102 virtual void ReadDirectoryInternal( |
103 const base::FilePath& root, | 103 const base::FilePath& root, |
104 const ReadDirectorySuccessCallback& success_callback, | 104 const ReadDirectorySuccessCallback& success_callback, |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 // the ReadDirectory operation. | 287 // the ReadDirectory operation. |
288 FileInfoCache file_info_cache_; | 288 FileInfoCache file_info_cache_; |
289 | 289 |
290 // For callbacks that may run after destruction. | 290 // For callbacks that may run after destruction. |
291 base::WeakPtrFactory<MTPDeviceDelegateImplLinux> weak_ptr_factory_; | 291 base::WeakPtrFactory<MTPDeviceDelegateImplLinux> weak_ptr_factory_; |
292 | 292 |
293 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplLinux); | 293 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplLinux); |
294 }; | 294 }; |
295 | 295 |
296 #endif // CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H
_ | 296 #endif // CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H
_ |
OLD | NEW |