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

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

Issue 8060055: Adding support for MediaStream and PeerConnection functionality (Closed) Base URL: http://git.chromium.org/chromium/chromium.git@trunk
Patch Set: Code review fixes. 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/renderer/media/mock_media_stream_impl.h
diff --git a/content/renderer/media/mock_media_stream_impl.h b/content/renderer/media/mock_media_stream_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..52d7e576d8833dfd3935fbf0f39f5de63059ee8d
--- /dev/null
+++ b/content/renderer/media/mock_media_stream_impl.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_IMPL_H_
+#define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_IMPL_H_
+
+#include <string>
+
+#include "content/renderer/media/media_stream_impl.h"
+
+class MockMediaStreamImpl : public MediaStreamImpl {
+ public:
+ MockMediaStreamImpl();
+ virtual ~MockMediaStreamImpl();
+
+ virtual WebKit::WebPeerConnectionHandler* CreatePeerConnectionHandler(
+ WebKit::WebPeerConnectionHandlerClient* client);
+ virtual void ClosePeerConnection();
+ // Returns true if created successfully or already exists, false otherwise.
+ virtual bool SetVideoCaptureModule(const std::string& label);
+
+ // Implement webkit_glue::MediaStreamClient.
+ virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder(
+ const GURL& url,
+ media::MessageLoopFactory* message_loop_factory) OVERRIDE;
+
+ // Implement MediaStreamDispatcherEventHandler.
+ virtual void OnStreamGenerated(
+ int request_id,
+ const std::string& label,
+ const media_stream::StreamDeviceInfoArray& audio_array,
+ const media_stream::StreamDeviceInfoArray& video_array) OVERRIDE;
+ virtual void OnStreamGenerationFailed(int request_id) OVERRIDE;
+ virtual void OnVideoDeviceFailed(
scherkus (not reviewing) 2011/11/23 22:52:04 80 chars here too if they fit
Henrik Grunell 2011/11/24 11:32:59 Nope. 81.
+ const std::string& label,
+ int index) OVERRIDE;
+ virtual void OnAudioDeviceFailed(
+ const std::string& label,
+ int index) OVERRIDE;
+
+ const std::string& video_label() const { return video_label_; }
+
+ private:
+ std::string video_label_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockMediaStreamImpl);
+};
+
+#endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698