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

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

Issue 10703095: New PeerConnection handler in Chrome to support latest PeerConnection draft (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Readd the UMA histogram for Deprecated PeerConnection to not screw up the stats. Created 8 years, 3 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"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SessionDescriptionInterface* desc) OVERRIDE; 63 SessionDescriptionInterface* desc) OVERRIDE;
64 virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer, 64 virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer,
65 SessionDescriptionInterface* desc) OVERRIDE; 65 SessionDescriptionInterface* desc) OVERRIDE;
66 virtual bool UpdateIce(const IceServers& configuration, 66 virtual bool UpdateIce(const IceServers& configuration,
67 const MediaConstraintsInterface* constraints) OVERRIDE; 67 const MediaConstraintsInterface* constraints) OVERRIDE;
68 virtual bool AddIceCandidate(const IceCandidateInterface* candidate) OVERRIDE; 68 virtual bool AddIceCandidate(const IceCandidateInterface* candidate) OVERRIDE;
69 virtual IceState ice_state() OVERRIDE; 69 virtual IceState ice_state() OVERRIDE;
70 70
71 void AddRemoteStream(MediaStreamInterface* stream); 71 void AddRemoteStream(MediaStreamInterface* stream);
72 void SetReadyState(ReadyState state) { ready_state_ = state; } 72 void SetReadyState(ReadyState state) { ready_state_ = state; }
73 void SetIceState(IceState state) { ice_state_ = state; }
73 74
74 const std::string& stream_label() const { return stream_label_; } 75 const std::string& stream_label() const { return stream_label_; }
75 bool hint_audio() const { return hint_audio_; } 76 bool hint_audio() const { return hint_audio_; }
76 bool hint_video() const { return hint_video_; } 77 bool hint_video() const { return hint_video_; }
77 Action action() const { return action_; } 78 Action action() const { return action_; }
78 const std::string& description_sdp() const { return description_sdp_; } 79 const std::string& description_sdp() const { return description_sdp_; }
79 IceOptions ice_options() const { return ice_options_; } 80 IceOptions ice_options() const { return ice_options_; }
80 const std::string& sdp_mid() const { return sdp_mid_; } 81 const std::string& sdp_mid() const { return sdp_mid_; }
81 int sdp_mline_index() const { return sdp_mline_index_; } 82 int sdp_mline_index() const { return sdp_mline_index_; }
82 const std::string& ice_sdp() const { return ice_sdp_; } 83 const std::string& ice_sdp() const { return ice_sdp_; }
83 84 webrtc::SessionDescriptionInterface* created_session_description() const {
85 return created_sessiondescription_.get();
86 }
84 static const char kDummyOffer[]; 87 static const char kDummyOffer[];
88 static const char kDummyAnswer[];
85 89
86 protected: 90 protected:
87 virtual ~MockPeerConnectionImpl(); 91 virtual ~MockPeerConnectionImpl();
88 92
89 private: 93 private:
90 // Used for creating MockSessionDescription. 94 // Used for creating MockSessionDescription.
91 MockMediaStreamDependencyFactory* dependency_factory_; 95 MockMediaStreamDependencyFactory* dependency_factory_;
92 96
93 std::string stream_label_; 97 std::string stream_label_;
94 talk_base::scoped_refptr<MockStreamCollection> local_streams_; 98 talk_base::scoped_refptr<MockStreamCollection> local_streams_;
95 talk_base::scoped_refptr<MockStreamCollection> remote_streams_; 99 talk_base::scoped_refptr<MockStreamCollection> remote_streams_;
96 scoped_ptr<webrtc::SessionDescriptionInterface> local_desc_; 100 scoped_ptr<webrtc::SessionDescriptionInterface> local_desc_;
97 scoped_ptr<webrtc::SessionDescriptionInterface> remote_desc_; 101 scoped_ptr<webrtc::SessionDescriptionInterface> remote_desc_;
102 scoped_ptr<webrtc::SessionDescriptionInterface> created_sessiondescription_;
98 bool hint_audio_; 103 bool hint_audio_;
99 bool hint_video_; 104 bool hint_video_;
100 Action action_; 105 Action action_;
101 std::string description_sdp_; 106 std::string description_sdp_;
102 IceOptions ice_options_; 107 IceOptions ice_options_;
103 std::string sdp_mid_; 108 std::string sdp_mid_;
104 int sdp_mline_index_; 109 int sdp_mline_index_;
105 std::string ice_sdp_; 110 std::string ice_sdp_;
106 ReadyState ready_state_; 111 ReadyState ready_state_;
112 IceState ice_state_;
107 113
108 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl); 114 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl);
109 }; 115 };
110 116
111 } // namespace webrtc 117 } // namespace webrtc
112 118
113 #endif // CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ 119 #endif // CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_dependency_factory.cc ('k') | content/renderer/media/mock_peer_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698