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

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

Issue 8060055: Adding support for MediaStream and PeerConnection functionality (Closed) Base URL: http://git.chromium.org/chromium/chromium.git@trunk
Patch Set: Minor 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 unified diff | Download patch
OLDNEW
(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_PEER_CONNECTION_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h"
13
14 namespace webrtc {
15
16 class MockPeerConnectionImpl : public PeerConnection {
17 public:
18 MockPeerConnectionImpl();
19 virtual ~MockPeerConnectionImpl();
20
21 // PeerConnection implementation.
22 virtual void RegisterObserver(PeerConnectionObserver* observer) OVERRIDE;
23 virtual bool SignalingMessage(const std::string& msg) OVERRIDE;
24 virtual bool AddStream(const std::string& stream_id, bool video) OVERRIDE;
25 virtual bool RemoveStream(const std::string& stream_id) OVERRIDE;
26 virtual bool Connect() OVERRIDE;
27 virtual bool Close() OVERRIDE;
28 virtual bool SetAudioDevice(
29 const std::string& wave_in_device,
30 const std::string& wave_out_device, int opts) OVERRIDE;
31 virtual bool SetLocalVideoRenderer(cricket::VideoRenderer* renderer) OVERRIDE;
32 virtual bool SetVideoRenderer(
33 const std::string& stream_id,
34 cricket::VideoRenderer* renderer) OVERRIDE;
35 virtual bool SetVideoCapture(const std::string& cam_device) OVERRIDE;
36 virtual ReadyState GetReadyState() OVERRIDE;
37
38 PeerConnectionObserver* observer() const { return observer_; }
39 const std::string& signaling_message() const { return signaling_message_; }
40 const std::string& stream_id() const { return stream_id_; }
41 bool video_stream() const { return video_stream_; }
42 bool connected() const { return connected_; }
43 bool video_capture_set() const { return video_capture_set_; }
44 std::string video_renderer_stream_id() const {
tommi (sloooow) - chröme 2011/11/22 16:11:38 do you want to return const std::string& here like
Henrik Grunell 2011/11/23 21:50:49 Yes, fixed.
45 return video_renderer_stream_id_;
46 }
47
48 private:
49 PeerConnectionObserver* observer_;
50 std::string signaling_message_;
51 std::string stream_id_;
52 bool video_stream_;
53 bool connected_;
54 bool video_capture_set_;
55 std::string video_renderer_stream_id_;
56
57 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl);
58 };
59
60 } // namespace webrtc
61
62 #endif // CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698