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> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/containers/scoped_ptr_hash_map.h" | 14 #include "base/containers/scoped_ptr_hash_map.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/location.h" | 16 #include "base/location.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" | 19 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
21 #include "webkit/browser/fileapi/async_file_util.h" | 21 #include "storage/browser/fileapi/async_file_util.h" |
22 | 22 |
23 struct SnapshotRequestInfo; | 23 struct SnapshotRequestInfo; |
24 | 24 |
25 // MTPDeviceDelegateImplLinux communicates with the media transfer protocol | 25 // MTPDeviceDelegateImplLinux communicates with the media transfer protocol |
26 // (MTP) device to complete file system operations. These operations are | 26 // (MTP) device to complete file system operations. These operations are |
27 // performed asynchronously. Instantiate this class per MTP device storage. | 27 // performed asynchronously. Instantiate this class per MTP device storage. |
28 // MTPDeviceDelegateImplLinux lives on the IO thread. | 28 // MTPDeviceDelegateImplLinux lives on the IO thread. |
29 // MTPDeviceDelegateImplLinux does a call-and-reply to the UI thread | 29 // MTPDeviceDelegateImplLinux does a call-and-reply to the UI thread |
30 // to dispatch the requests to MediaTransferProtocolManager. | 30 // to dispatch the requests to MediaTransferProtocolManager. |
31 class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate { | 31 class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate { |
(...skipping 255 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 |