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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.h

Issue 17846002: Refactor the VideoCaptureDevice::Name struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_manager.h
diff --git a/content/browser/renderer_host/media/video_capture_manager.h b/content/browser/renderer_host/media/video_capture_manager.h
index f57c10f96d506d6a8c84701ba0e1c45614c46347..34d6e626413d4712f43b3d1dad147c8ceb469a0f 100644
--- a/content/browser/renderer_host/media/video_capture_manager.h
+++ b/content/browser/renderer_host/media/video_capture_manager.h
@@ -144,7 +144,9 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
typedef std::map<int, DeviceEntry> VideoCaptureDevices;
VideoCaptureDevices devices_; // Maps capture_session_id to DeviceEntry.
- // Set to true if using fake devices for testing, false by default.
+ // Set to true if using fake video capture devices for testing,
+ // false by default. This is only used for the MEDIA_DEVICE_VIDEO_CAPTURE
+ // device type.
bool use_fake_device_;
// Only accessed from device thread.
@@ -154,6 +156,12 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
typedef std::map<media::VideoCaptureDevice*, Controller*> Controllers;
Controllers controllers_;
+ // We cache the enumerated video capture devices in GetAvailableDevices
+ // (e.g. called by OnEnumerateDevices) and then look up the requested ID when
+ // a device is opened (see OnOpen).
+ // Used only on the device thread.
+ media::VideoCaptureDevice::Names video_capture_devices_;
+
DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager);
};

Powered by Google App Engine
This is Rietveld 408576698