Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/browser/system_monitor/image_capture_device_manager.h

Issue 12147002: Add a receiver interface to RemovableStorageNotifications. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merging Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_SYSTEM_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_
6 #define CHROME_BROWSER_SYSTEM_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_ 6 #define CHROME_BROWSER_SYSTEM_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/memory/scoped_nsobject.h" 11 #include "base/memory/scoped_nsobject.h"
12 #include "chrome/browser/system_monitor/removable_storage_notifications.h"
12 13
13 @protocol ICDeviceBrowserDelegate; 14 @protocol ICDeviceBrowserDelegate;
14 @class ImageCaptureDevice; 15 @class ImageCaptureDevice;
15 @class ImageCaptureDeviceManagerImpl; 16 @class ImageCaptureDeviceManagerImpl;
16 17
17 namespace chrome { 18 namespace chrome {
18 19
19 // Upon creation, begins monitoring for any attached devices using the 20 // Upon creation, begins monitoring for any attached devices using the
20 // ImageCapture API. Notifies clients of the presence of such devices 21 // ImageCapture API. Notifies clients of the presence of such devices
21 // (i.e. cameras, USB cards) using the SystemMonitor and makes them 22 // (i.e. cameras, USB cards) using the SystemMonitor and makes them
22 // available using |deviceForUUID|. 23 // available using |deviceForUUID|.
23 class ImageCaptureDeviceManager { 24 class ImageCaptureDeviceManager {
24 public: 25 public:
25 ImageCaptureDeviceManager(); 26 ImageCaptureDeviceManager();
26 ~ImageCaptureDeviceManager(); 27 ~ImageCaptureDeviceManager();
27 28
28 // The UUIDs passed here are available in the device attach notifications 29 // The UUIDs passed here are available in the device attach notifications
29 // given through SystemMonitor. They're gotten by cracking the device ID 30 // given through SystemMonitor. They're gotten by cracking the device ID
30 // and taking the unique ID output. 31 // and taking the unique ID output.
31 static ImageCaptureDevice* deviceForUUID(const std::string& uuid); 32 static ImageCaptureDevice* deviceForUUID(const std::string& uuid);
32 33
33 // Returns a weak pointer to the internal ImageCapture interface protocol. 34 // Returns a weak pointer to the internal ImageCapture interface protocol.
34 id<ICDeviceBrowserDelegate> device_browser(); 35 id<ICDeviceBrowserDelegate> device_browser();
35 36
37 // Sets the receiver for device attach/detach notifications.
38 // TODO(gbillock): Move this to be a constructor argument.
39 void SetNotifications(RemovableStorageNotifications::Receiver* notifications);
40
36 private: 41 private:
37 scoped_nsobject<ImageCaptureDeviceManagerImpl> device_browser_; 42 scoped_nsobject<ImageCaptureDeviceManagerImpl> device_browser_;
38 }; 43 };
39 44
40 } // namespace chrome 45 } // namespace chrome
41 46
42 #endif // CHROME_BROWSER_SYSTEM_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_ 47 #endif // CHROME_BROWSER_SYSTEM_MONITOR_IMAGE_CAPTURE_DEVICE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698