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

Side by Side Diff: content/renderer/media/mock_media_stream_impl.h

Issue 10383151: Refactor MediaStreamImpl and PeerConnection glue implementation after WebKit changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and added NON_EXPORTED_BASE to the base of MediaStreamExtradata. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 <map>
9 #include <string>
10
11 #include "content/renderer/media/media_stream_impl.h"
12
13 class MockMediaStreamImpl : public MediaStreamImpl {
14 public:
15 MockMediaStreamImpl();
16 virtual ~MockMediaStreamImpl();
17
18 virtual WebKit::WebPeerConnectionHandler* CreatePeerConnectionHandler(
19 WebKit::WebPeerConnectionHandlerClient* client) OVERRIDE;
20 virtual void ClosePeerConnection(
21 PeerConnectionHandlerBase* pc_handler) OVERRIDE;
22
23 virtual webrtc::LocalMediaStreamInterface* GetLocalMediaStream(
24 const WebKit::WebMediaStreamDescriptor& stream) OVERRIDE;
25
26 // Implement webkit_glue::MediaStreamClient.
27 virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder(
28 const GURL& url,
29 media::MessageLoopFactory* message_loop_factory) OVERRIDE;
30
31 // Implement MediaStreamDispatcherEventHandler.
32 virtual void OnStreamGenerated(
33 int request_id,
34 const std::string& label,
35 const media_stream::StreamDeviceInfoArray& audio_array,
36 const media_stream::StreamDeviceInfoArray& video_array) OVERRIDE;
37 virtual void OnStreamGenerationFailed(int request_id) OVERRIDE;
38 virtual void OnVideoDeviceFailed(
39 const std::string& label,
40 int index) OVERRIDE;
41 virtual void OnAudioDeviceFailed(
42 const std::string& label,
43 int index) OVERRIDE;
44
45 void AddLocalStream(webrtc::LocalMediaStreamInterface* stream);
46 private:
47 typedef std::map<std::string,
48 talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface> >
49 MockMediaStreamPtrMap;
50 MockMediaStreamPtrMap mock_local_streams_;
51
52 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamImpl);
53 };
54
55 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_impl_unittest.cc ('k') | content/renderer/media/mock_media_stream_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698