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_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_ |
6 #define CHROME_BROWSER_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_ | 6 #define CHROME_BROWSER_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/mac/scoped_nsobject.h" | 11 #include "base/mac/scoped_nsobject.h" |
12 #include "chrome/browser/storage_monitor/storage_monitor.h" | 12 #include "chrome/browser/storage_monitor/storage_monitor.h" |
13 | 13 |
14 @protocol ICDeviceBrowserDelegate; | 14 @protocol ICDeviceBrowserDelegate; |
15 @class ImageCaptureDevice; | 15 @class ImageCaptureDevice; |
16 @class ImageCaptureDeviceManagerImpl; | 16 @class ImageCaptureDeviceManagerImpl; |
17 | 17 |
18 namespace chrome { | |
19 | |
20 // Upon creation, begins monitoring for any attached devices using the | 18 // Upon creation, begins monitoring for any attached devices using the |
21 // ImageCapture API. Notifies clients of the presence of such devices | 19 // ImageCapture API. Notifies clients of the presence of such devices |
22 // (i.e. cameras, USB cards) using the SystemMonitor and makes them | 20 // (i.e. cameras, USB cards) using the SystemMonitor and makes them |
23 // available using |deviceForUUID|. | 21 // available using |deviceForUUID|. |
24 class ImageCaptureDeviceManager { | 22 class ImageCaptureDeviceManager { |
25 public: | 23 public: |
26 ImageCaptureDeviceManager(); | 24 ImageCaptureDeviceManager(); |
27 ~ImageCaptureDeviceManager(); | 25 ~ImageCaptureDeviceManager(); |
28 | 26 |
29 // The UUIDs passed here are available in the device attach notifications | 27 // The UUIDs passed here are available in the device attach notifications |
(...skipping 10 matching lines...) Expand all Loading... |
40 | 38 |
41 // Eject the given device. The ID passed is not the device ID, but the | 39 // Eject the given device. The ID passed is not the device ID, but the |
42 // ImageCapture UUID. | 40 // ImageCapture UUID. |
43 void EjectDevice(const std::string& uuid, | 41 void EjectDevice(const std::string& uuid, |
44 base::Callback<void(StorageMonitor::EjectStatus)> callback); | 42 base::Callback<void(StorageMonitor::EjectStatus)> callback); |
45 | 43 |
46 private: | 44 private: |
47 base::scoped_nsobject<ImageCaptureDeviceManagerImpl> device_browser_; | 45 base::scoped_nsobject<ImageCaptureDeviceManagerImpl> device_browser_; |
48 }; | 46 }; |
49 | 47 |
50 } // namespace chrome | |
51 | |
52 #endif // CHROME_BROWSER_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_ | 48 #endif // CHROME_BROWSER_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_ |
OLD | NEW |