| 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_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_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 "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 #include "base/win/scoped_comptr.h" | 16 #include "base/win/scoped_comptr.h" |
| 17 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" | 17 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" |
| 18 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" | 18 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" |
| 19 #include "webkit/browser/fileapi/async_file_util.h" | 19 #include "webkit/browser/fileapi/async_file_util.h" |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 class FilePath; | 22 class FilePath; |
| 23 class SequencedTaskRunner; | 23 class SequencedTaskRunner; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace chrome { | |
| 27 | |
| 28 class SnapshotFileDetails; | 26 class SnapshotFileDetails; |
| 29 struct SnapshotRequestInfo; | 27 struct SnapshotRequestInfo; |
| 30 | 28 |
| 31 // MTPDeviceDelegateImplWin is used to communicate with the media transfer | 29 // MTPDeviceDelegateImplWin is used to communicate with the media transfer |
| 32 // protocol (MTP) device to complete file system operations. These operations | 30 // protocol (MTP) device to complete file system operations. These operations |
| 33 // are performed asynchronously on a blocking pool thread since the device | 31 // are performed asynchronously on a blocking pool thread since the device |
| 34 // access may be slow and may take a long time to complete. MTP | 32 // access may be slow and may take a long time to complete. MTP |
| 35 // device can have multiple data storage partitions. MTPDeviceDelegateImplWin | 33 // device can have multiple data storage partitions. MTPDeviceDelegateImplWin |
| 36 // is instantiated per MTP device storage partition using | 34 // is instantiated per MTP device storage partition using |
| 37 // CreateMTPDeviceAsyncDelegate(). MTPDeviceDelegateImplWin lives on the IO | 35 // CreateMTPDeviceAsyncDelegate(). MTPDeviceDelegateImplWin lives on the IO |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 207 |
| 210 // Used to make sure only one task is in progress at any time. | 208 // Used to make sure only one task is in progress at any time. |
| 211 bool task_in_progress_; | 209 bool task_in_progress_; |
| 212 | 210 |
| 213 // For callbacks that may run after destruction. | 211 // For callbacks that may run after destruction. |
| 214 base::WeakPtrFactory<MTPDeviceDelegateImplWin> weak_ptr_factory_; | 212 base::WeakPtrFactory<MTPDeviceDelegateImplWin> weak_ptr_factory_; |
| 215 | 213 |
| 216 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplWin); | 214 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplWin); |
| 217 }; | 215 }; |
| 218 | 216 |
| 219 } // namespace chrome | |
| 220 | |
| 221 #endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ | 217 #endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ |
| OLD | NEW |