Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / storage_monitor / image_capture_device_manager.h
blobcfb1acacadadea23db7794ed44ac441e7566e485
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_
6 #define CHROME_BROWSER_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_
8 #import <Foundation/Foundation.h>
9 #include <string>
11 #include "base/mac/scoped_nsobject.h"
12 #include "chrome/browser/storage_monitor/storage_monitor.h"
14 @protocol ICDeviceBrowserDelegate;
15 @class ImageCaptureDevice;
16 @class ImageCaptureDeviceManagerImpl;
18 // Upon creation, begins monitoring for any attached devices using the
19 // ImageCapture API. Notifies clients of the presence of such devices
20 // (i.e. cameras, USB cards) using the SystemMonitor and makes them
21 // available using |deviceForUUID|.
22 class ImageCaptureDeviceManager {
23 public:
24 ImageCaptureDeviceManager();
25 ~ImageCaptureDeviceManager();
27 // The UUIDs passed here are available in the device attach notifications
28 // given through SystemMonitor. They're gotten by cracking the device ID
29 // and taking the unique ID output.
30 static ImageCaptureDevice* deviceForUUID(const std::string& uuid);
32 // Returns a weak pointer to the internal ImageCapture interface protocol.
33 id<ICDeviceBrowserDelegate> device_browser();
35 // Sets the receiver for device attach/detach notifications.
36 // TODO(gbillock): Move this to be a constructor argument.
37 void SetNotifications(StorageMonitor::Receiver* notifications);
39 // Eject the given device. The ID passed is not the device ID, but the
40 // ImageCapture UUID.
41 void EjectDevice(const std::string& uuid,
42 base::Callback<void(StorageMonitor::EjectStatus)> callback);
44 private:
45 base::scoped_nsobject<ImageCaptureDeviceManagerImpl> device_browser_;
48 #endif // CHROME_BROWSER_STORAGE_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_