OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_IMPL_H_ | |
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_IMPL_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "content/renderer/media/media_stream_impl.h" | |
11 | |
12 class MockMediaStreamImpl | |
13 : public MediaStreamImpl { | |
14 public: | |
15 MockMediaStreamImpl(); | |
16 virtual ~MockMediaStreamImpl(); | |
17 | |
18 virtual WebKit::WebPeerConnectionHandler* CreatePeerConnectionHandler( | |
19 WebKit::WebPeerConnectionHandlerClient* client); | |
20 virtual void ClosePeerConnection(); | |
21 // Returns true if created successfully or already exists, false otherwise. | |
22 virtual bool SetVideoCaptureModule(const std::string label); | |
23 | |
24 // Implement webkit_glue::MediaStreamClient. | |
25 virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder( | |
26 const GURL& url, | |
27 media::MessageLoopFactory* message_loop_factory) OVERRIDE; | |
28 | |
29 // Implement MediaStreamDispatcherEventHandler. | |
30 virtual void OnStreamGenerated( | |
31 int request_id, | |
32 const std::string& label, | |
33 const media_stream::StreamDeviceInfoArray& audio_array, | |
34 const media_stream::StreamDeviceInfoArray& video_array) OVERRIDE; | |
35 virtual void OnStreamGenerationFailed(int request_id) OVERRIDE; | |
36 virtual void OnVideoDeviceFailed( | |
37 const std::string& label, | |
38 int index) OVERRIDE; | |
39 virtual void OnAudioDeviceFailed( | |
40 const std::string& label, | |
41 int index) OVERRIDE; | |
42 | |
43 std::string video_label() { return video_label_; } | |
tommi (sloooow) - chröme
2011/11/08 12:27:24
should this be
const std::string& video_label() co
Henrik Grunell
2011/11/08 22:06:41
Indeed, done.
| |
44 | |
45 private: | |
46 std::string video_label_; | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamImpl); | |
49 }; | |
50 | |
51 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_IMPL_H_ | |
OLD | NEW |