Vectorize website settings icons in omnibox
[chromium-blink-merge.git] / components / storage_monitor / image_capture_device_manager.h
blob2a4578f07d39b0473a5be8f7e413b836132dd19b
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_
6 #define COMPONENTS_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_
8 #import <Foundation/Foundation.h>
9 #include <string>
11 #include "base/mac/scoped_nsobject.h"
12 #include "components/storage_monitor/storage_monitor.h"
14 @protocol ICDeviceBrowserDelegate;
15 @class ImageCaptureDevice;
16 @class ImageCaptureDeviceManagerImpl;
18 namespace storage_monitor {
20 // Upon creation, begins monitoring for any attached devices using the
21 // ImageCapture API. Notifies clients of the presence of such devices
22 // (i.e. cameras, USB cards) using the SystemMonitor and makes them
23 // available using |deviceForUUID|.
24 class ImageCaptureDeviceManager {
25 public:
26 ImageCaptureDeviceManager();
27 ~ImageCaptureDeviceManager();
29 // The UUIDs passed here are available in the device attach notifications
30 // given through SystemMonitor. They're gotten by cracking the device ID
31 // and taking the unique ID output.
32 static ImageCaptureDevice* deviceForUUID(const std::string& uuid);
34 // Returns a weak pointer to the internal ImageCapture interface protocol.
35 id<ICDeviceBrowserDelegate> device_browser();
37 // Sets the receiver for device attach/detach notifications.
38 // TODO(gbillock): Move this to be a constructor argument.
39 void SetNotifications(StorageMonitor::Receiver* notifications);
41 // Eject the given device. The ID passed is not the device ID, but the
42 // ImageCapture UUID.
43 void EjectDevice(const std::string& uuid,
44 base::Callback<void(StorageMonitor::EjectStatus)> callback);
46 private:
47 base::scoped_nsobject<ImageCaptureDeviceManagerImpl> device_browser_;
50 } // namespace storage_monitor
52 #endif // COMPONENTS_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_