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

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

Issue 8480028: support video device enumeration from renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: simplify interface between MSManager and MSDevieSettings Created 9 years, 1 month 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/media_stream_manager.h
===================================================================
--- content/browser/renderer_host/media/media_stream_manager.h (revision 109718)
+++ content/browser/renderer_host/media/media_stream_manager.h (working copy)
@@ -68,6 +68,25 @@
// Closes generated stream.
void StopGeneratedStream(const std::string& label);
+ // Gets a list of video devices.
+ // The request is identified using |label|, which is pointing to an already
+ // created std::string.
+ void EnumerateVideoDevices(MediaStreamRequester* requester,
+ int render_process_id,
+ int render_view_id,
+ const std::string& security_origin,
+ std::string* label);
+
+ // Open a video device identified by |device_id|.
+ // The request is identified using |label|, which is pointing to an already
+ // created std::string.
+ void OpenVideoDevice(MediaStreamRequester* requester,
+ int render_process_id,
+ int render_view_id,
+ const std::string& device_id,
+ const std::string& security_origin,
+ std::string* label);
+
// Implements MediaStreamProviderListener.
virtual void Opened(MediaStreamType stream_type, int capture_session_id);
virtual void Closed(MediaStreamType stream_type, int capture_session_id);
@@ -77,8 +96,6 @@
MediaStreamProviderError error);
// Implements SettingsRequester.
- virtual void GetDevices(const std::string& label,
- MediaStreamType stream_type);
virtual void DevicesAccepted(const std::string& label,
const StreamDeviceInfoArray& devices);
virtual void SettingsError(const std::string& label);
@@ -94,6 +111,11 @@
// Helpers.
bool RequestDone(const MediaStreamManager::DeviceRequest& request) const;
MediaStreamProvider* GetDeviceManager(MediaStreamType stream_type);
+ void StartEnumeration(DeviceRequest* new_request,
+ int render_process_id,
+ int render_view_id,
+ const std::string& security_origin,
+ std::string* label);
scoped_ptr<MediaStreamDeviceSettings> device_settings_;
scoped_ptr<VideoCaptureManager> video_capture_manager_;

Powered by Google App Engine
This is Rietveld 408576698