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

Unified Diff: content/renderer/media/media_stream_dispatcher.h

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 8 years, 3 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
« no previous file with comments | « content/public/common/media_stream_request.cc ('k') | content/renderer/media/media_stream_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_dispatcher.h
diff --git a/content/renderer/media/media_stream_dispatcher.h b/content/renderer/media/media_stream_dispatcher.h
index 549807eb6f9704645807f5030d4b3294e2d31970..28dc12d6b1d2246b77912af2126a906f39878742 100644
--- a/content/renderer/media/media_stream_dispatcher.h
+++ b/content/renderer/media/media_stream_dispatcher.h
@@ -37,7 +37,7 @@ class CONTENT_EXPORT MediaStreamDispatcher
virtual ~MediaStreamDispatcher();
// Request a new media stream to be created.
- // This can be used either of WebKit or a plugin.
+ // This can be used either by WebKit or a plugin.
// Note: The event_handler must be valid for as long as the stream exists.
virtual void GenerateStream(
int request_id,
@@ -45,6 +45,15 @@ class CONTENT_EXPORT MediaStreamDispatcher
media_stream::StreamOptions components,
const GURL& security_origin);
+ // Like GenerateStream above, except use the device specified by |device_id|
+ // rather than allow the user to choose one.
+ virtual void GenerateStreamForDevice(
+ int request_id,
+ const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
+ media_stream::StreamOptions components,
+ const std::string& device_id,
+ const GURL& security_origin);
+
// Cancel the request for a new media stream to be created.
virtual void CancelGenerateStream(int request_id);
@@ -84,6 +93,7 @@ class CONTENT_EXPORT MediaStreamDispatcher
private:
FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, BasicStream);
+ FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, BasicStreamForDevice);
FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, BasicVideoDevice);
FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, TestFailure);
FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, CancelGenerateStream);
@@ -155,7 +165,8 @@ class CONTENT_EXPORT MediaStreamDispatcher
EnumerationState audio_enumeration_state_;
EnumerationState video_enumeration_state_;
- // List of calls made to GenerateStream that has not yet completed.
+ // List of calls made to GenerateStream/GenerateStreamForDevice that has not
+ // yet completed.
typedef std::list<Request> RequestList;
RequestList requests_;
« no previous file with comments | « content/public/common/media_stream_request.cc ('k') | content/renderer/media/media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698