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 <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/platform_file.h" | 14 #include "base/platform_file.h" |
15 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" | 15 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" |
16 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" | 16 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" |
17 #include "webkit/browser/fileapi/async_file_util.h" | 17 #include "webkit/browser/fileapi/async_file_util.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class FilePath; | 20 class FilePath; |
21 } | 21 } |
22 | 22 |
23 namespace chrome { | |
24 | |
25 struct SnapshotRequestInfo; | 23 struct SnapshotRequestInfo; |
26 | 24 |
27 // MTPDeviceDelegateImplLinux communicates with the media transfer protocol | 25 // MTPDeviceDelegateImplLinux communicates with the media transfer protocol |
28 // (MTP) device to complete file system operations. These operations are | 26 // (MTP) device to complete file system operations. These operations are |
29 // performed asynchronously. Instantiate this class per MTP device storage. | 27 // performed asynchronously. Instantiate this class per MTP device storage. |
30 // MTPDeviceDelegateImplLinux lives on the IO thread. | 28 // MTPDeviceDelegateImplLinux lives on the IO thread. |
31 // MTPDeviceDelegateImplLinux does a call-and-reply to the UI thread | 29 // MTPDeviceDelegateImplLinux does a call-and-reply to the UI thread |
32 // to dispatch the requests to MediaTransferProtocolManager. | 30 // to dispatch the requests to MediaTransferProtocolManager. |
33 class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate { | 31 class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate { |
34 private: | 32 private: |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // snapshot file requests, make sure there is only one active snapshot file | 186 // snapshot file requests, make sure there is only one active snapshot file |
189 // request at any time. | 187 // request at any time. |
190 scoped_ptr<SnapshotRequestInfo> current_snapshot_request_info_; | 188 scoped_ptr<SnapshotRequestInfo> current_snapshot_request_info_; |
191 | 189 |
192 // For callbacks that may run after destruction. | 190 // For callbacks that may run after destruction. |
193 base::WeakPtrFactory<MTPDeviceDelegateImplLinux> weak_ptr_factory_; | 191 base::WeakPtrFactory<MTPDeviceDelegateImplLinux> weak_ptr_factory_; |
194 | 192 |
195 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplLinux); | 193 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplLinux); |
196 }; | 194 }; |
197 | 195 |
198 } // namespace chrome | |
199 | |
200 #endif // CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H
_ | 196 #endif // CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H
_ |
OLD | NEW |