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> |
11 | 11 |
12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
16 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" | 16 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" |
17 | 17 |
18 namespace chrome { | |
19 | |
20 // Delegate for presenting an Image Capture device through the filesystem | 18 // Delegate for presenting an Image Capture device through the filesystem |
21 // API. The synthetic filesystem will be rooted at the constructed location, | 19 // API. The synthetic filesystem will be rooted at the constructed location, |
22 // and names of all files notified through the ItemAdded call will be | 20 // and names of all files notified through the ItemAdded call will be |
23 // all appear as children of that directory. (ItemAdded calls with directories | 21 // all appear as children of that directory. (ItemAdded calls with directories |
24 // will be ignored.) | 22 // will be ignored.) |
25 // Note on thread management: This class is thread-compatible: it can be created | 23 // Note on thread management: This class is thread-compatible: it can be created |
26 // on any thread, but then mutates all state on the UI thread. The async | 24 // on any thread, but then mutates all state on the UI thread. The async |
27 // delegate interface can be invoked on any thread, as it simply forwards calls | 25 // delegate interface can be invoked on any thread, as it simply forwards calls |
28 // to the UI thread. | 26 // to the UI thread. |
29 class MTPDeviceDelegateImplMac : public MTPDeviceAsyncDelegate { | 27 class MTPDeviceDelegateImplMac : public MTPDeviceAsyncDelegate { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 typedef std::list<ReadDirectoryRequest> ReadDirTransactionList; | 144 typedef std::list<ReadDirectoryRequest> ReadDirTransactionList; |
147 | 145 |
148 ReadFileTransactionList read_file_transactions_; | 146 ReadFileTransactionList read_file_transactions_; |
149 ReadDirTransactionList read_dir_transactions_; | 147 ReadDirTransactionList read_dir_transactions_; |
150 | 148 |
151 base::WeakPtrFactory<MTPDeviceDelegateImplMac> weak_factory_; | 149 base::WeakPtrFactory<MTPDeviceDelegateImplMac> weak_factory_; |
152 | 150 |
153 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplMac); | 151 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplMac); |
154 }; | 152 }; |
155 | 153 |
156 } // namespace chrome | |
157 | |
158 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_ | 154 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_ |
OLD | NEW |