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

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

Issue 9284020: Enabling usage of native PeerConnection v2 in libjingle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "third_party/libjingle/source/talk/app/webrtcv1/peerconnection.h" 12 #include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h"
13 13
14 namespace webrtc { 14 namespace webrtc {
15 15
16 class MockPeerConnectionImpl : public PeerConnection { 16 class MockPeerConnectionImpl : public PeerConnectionInterface {
17 public: 17 public:
18 MockPeerConnectionImpl(); 18 MockPeerConnectionImpl();
19 virtual ~MockPeerConnectionImpl();
20 19
21 // PeerConnection implementation. 20 // PeerConnectionInterface implementation.
22 virtual void RegisterObserver(PeerConnectionObserver* observer) OVERRIDE; 21 virtual void ProcessSignalingMessage(const std::string& msg) OVERRIDE;
23 virtual bool SignalingMessage(const std::string& msg) OVERRIDE; 22 virtual bool Send(const std::string& msg) OVERRIDE;
24 virtual bool AddStream(const std::string& stream_id, bool video) OVERRIDE; 23 virtual talk_base::scoped_refptr<StreamCollectionInterface>
25 virtual bool RemoveStream(const std::string& stream_id) OVERRIDE; 24 local_streams() OVERRIDE;
26 virtual bool Connect() OVERRIDE; 25 virtual talk_base::scoped_refptr<StreamCollectionInterface>
27 virtual bool Close() OVERRIDE; 26 remote_streams() OVERRIDE;
28 virtual bool SetAudioDevice( 27 virtual void AddStream(LocalMediaStreamInterface* stream) OVERRIDE;
29 const std::string& wave_in_device, 28 virtual void RemoveStream(LocalMediaStreamInterface* stream) OVERRIDE;
30 const std::string& wave_out_device, int opts) OVERRIDE; 29 virtual void CommitStreamChanges() OVERRIDE;
31 virtual bool SetLocalVideoRenderer(cricket::VideoRenderer* renderer) OVERRIDE; 30 virtual void Close() OVERRIDE;
32 virtual bool SetVideoRenderer( 31 virtual ReadyState ready_state() OVERRIDE;
33 const std::string& stream_id, 32 virtual SdpState sdp_state() OVERRIDE;
34 cricket::VideoRenderer* renderer) OVERRIDE;
35 virtual bool SetVideoCapture(const std::string& cam_device) OVERRIDE;
36 virtual ReadyState GetReadyState() OVERRIDE;
37 33
38 PeerConnectionObserver* observer() const { return observer_; }
39 const std::string& signaling_message() const { return signaling_message_; } 34 const std::string& signaling_message() const { return signaling_message_; }
40 const std::string& stream_id() const { return stream_id_; } 35 const std::string& stream_label() const { return stream_label_; }
41 bool video_stream() const { return video_stream_; } 36 bool stream_changes_committed() const { return stream_changes_committed_; }
42 bool connected() const { return connected_; } 37
43 bool video_capture_set() const { return video_capture_set_; } 38 protected:
44 const std::string& video_renderer_stream_id() const { 39 ~MockPeerConnectionImpl();
45 return video_renderer_stream_id_;
46 }
47 40
48 private: 41 private:
49 PeerConnectionObserver* observer_;
50 std::string signaling_message_; 42 std::string signaling_message_;
51 std::string stream_id_; 43 std::string stream_label_;
52 bool video_stream_; 44 bool stream_changes_committed_;
53 bool connected_;
54 bool video_capture_set_;
55 std::string video_renderer_stream_id_;
56 45
57 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl); 46 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl);
58 }; 47 };
59 48
60 } // namespace webrtc 49 } // namespace webrtc
61 50
62 #endif // CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ 51 #endif // CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698