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

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

Issue 287383002: Implement getMediaDevices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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/renderer/media/mock_media_stream_dispatcher.h
diff --git a/content/renderer/media/mock_media_stream_dispatcher.h b/content/renderer/media/mock_media_stream_dispatcher.h
index d16f32d6f3fe08349ef1c724276da44da64c976f..c6242636ac481850d4e08b4059b6f64d6ec89492 100644
--- a/content/renderer/media/mock_media_stream_dispatcher.h
+++ b/content/renderer/media/mock_media_stream_dispatcher.h
@@ -27,12 +27,18 @@ class MockMediaStreamDispatcher : public MediaStreamDispatcher {
int request_id,
const base::WeakPtr<MediaStreamDispatcherEventHandler>&
event_handler) OVERRIDE;
+ virtual void EnumerateDevices(
+ int request_id,
+ const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
+ MediaStreamType type,
+ const GURL& security_origin) OVERRIDE;
virtual void StopStreamDevice(const StreamDeviceInfo& device_info) OVERRIDE;
virtual bool IsStream(const std::string& label) OVERRIDE;
virtual int video_session_id(const std::string& label, int index) OVERRIDE;
virtual int audio_session_id(const std::string& label, int index) OVERRIDE;
- int request_id() const { return request_id_; }
+ int audio_request_id() const { return audio_request_id_; }
+ int video_request_id() const { return video_request_id_; }
int request_stream_counter() const { return request_stream_counter_; }
void IncrementSessionId() { ++session_id_; }
@@ -44,7 +50,11 @@ class MockMediaStreamDispatcher : public MediaStreamDispatcher {
StreamDeviceInfoArray video_array() const { return video_array_; }
private:
- int request_id_;
+ void AddAudioDeviceToArray();
+ void AddVideoDeviceToArray();
+
+ int audio_request_id_;
+ int video_request_id_; // Only used for EnumerateDevices.
base::WeakPtr<MediaStreamDispatcherEventHandler> event_handler_;
int request_stream_counter_;
int stop_audio_device_counter_;
« no previous file with comments | « content/renderer/media/media_stream_impl_unittest.cc ('k') | content/renderer/media/mock_media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698