Chromium Code Reviews| Index: chrome/browser/storage_monitor/image_capture_device_manager.mm |
| diff --git a/chrome/browser/storage_monitor/image_capture_device_manager.mm b/chrome/browser/storage_monitor/image_capture_device_manager.mm |
| index b51d32c38a3d09924ee18a69addbf880338e1d11..28e251884884b642d5020ced8f4a89f7c10af187 100644 |
| --- a/chrome/browser/storage_monitor/image_capture_device_manager.mm |
| +++ b/chrome/browser/storage_monitor/image_capture_device_manager.mm |
| @@ -146,6 +146,16 @@ void ImageCaptureDeviceManager::SetNotifications( |
| [device_browser_ setNotifications:notifications]; |
| } |
| +void ImageCaptureDeviceManager::EjectDevice( |
| + const std::string& uuid, |
| + base::Callback<void(StorageMonitor::EjectStatus)> callback) { |
| + base::scoped_nsobject<ImageCaptureDevice> camera_device( |
|
sail
2013/09/09 21:26:13
Is there a reason you need to keep a strong refere
Greg Billock
2013/09/12 17:43:59
No, not really. This is how we did it elsewhere, s
|
| + [[device_browser_ deviceForUUID:uuid] retain]); |
| + [camera_device eject]; |
| + [camera_device close]; |
| + callback.Run(StorageMonitor::EJECT_OK); |
| +} |
| + |
| // static |
| ImageCaptureDevice* ImageCaptureDeviceManager::deviceForUUID( |
| const std::string& uuid) { |