| Index: content/renderer/media/mock_media_stream_dependency_factory.cc
|
| diff --git a/content/renderer/media/mock_media_stream_dependency_factory.cc b/content/renderer/media/mock_media_stream_dependency_factory.cc
|
| index c58ce86abfeb060d9ec10750667f70a2c3b980ed..28254cca13596c9e5dc773602c53c0964784fa52 100644
|
| --- a/content/renderer/media/mock_media_stream_dependency_factory.cc
|
| +++ b/content/renderer/media/mock_media_stream_dependency_factory.cc
|
| @@ -166,8 +166,10 @@ void MockLocalAudioTrack::UnregisterObserver(ObserverInterface* observer) {
|
|
|
| class MockSessionDescription : public SessionDescriptionInterface {
|
| public:
|
| - MockSessionDescription(const std::string& sdp)
|
| - : sdp_(sdp) {
|
| + MockSessionDescription(const std::string& type,
|
| + const std::string& sdp)
|
| + : type_(type),
|
| + sdp_(sdp) {
|
| }
|
| virtual ~MockSessionDescription() {}
|
| virtual const cricket::SessionDescription* description() const OVERRIDE {
|
| @@ -183,8 +185,7 @@ class MockSessionDescription : public SessionDescriptionInterface {
|
| return "";
|
| }
|
| virtual std::string type() const OVERRIDE {
|
| - NOTIMPLEMENTED();
|
| - return "";
|
| + return type_;
|
| }
|
| virtual bool AddCandidate(const IceCandidateInterface* candidate) OVERRIDE {
|
| NOTIMPLEMENTED();
|
| @@ -206,6 +207,7 @@ class MockSessionDescription : public SessionDescriptionInterface {
|
| }
|
|
|
| private:
|
| + std::string type_;
|
| std::string sdp_;
|
| };
|
|
|
| @@ -279,6 +281,15 @@ MockMediaStreamDependencyFactory::CreatePeerConnection(
|
| return new talk_base::RefCountedObject<webrtc::MockPeerConnectionImpl>(this);
|
| }
|
|
|
| +talk_base::scoped_refptr<webrtc::PeerConnectionInterface>
|
| +MockMediaStreamDependencyFactory::CreatePeerConnection(
|
| + const webrtc::JsepInterface::IceServers& ice_servers,
|
| + const webrtc::MediaConstraintsInterface* constraints,
|
| + webrtc::PeerConnectionObserver* observer) {
|
| + DCHECK(mock_pc_factory_created_);
|
| + return new talk_base::RefCountedObject<webrtc::MockPeerConnectionImpl>(this);
|
| +}
|
| +
|
| talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface>
|
| MockMediaStreamDependencyFactory::CreateLocalMediaStream(
|
| const std::string& label) {
|
| @@ -308,7 +319,14 @@ MockMediaStreamDependencyFactory::CreateLocalAudioTrack(
|
| webrtc::SessionDescriptionInterface*
|
| MockMediaStreamDependencyFactory::CreateSessionDescription(
|
| const std::string& sdp) {
|
| - return new webrtc::MockSessionDescription(sdp);
|
| + return CreateSessionDescription ("unknown", sdp);
|
| +}
|
| +
|
| +webrtc::SessionDescriptionInterface*
|
| +MockMediaStreamDependencyFactory::CreateSessionDescription(
|
| + const std::string& type,
|
| + const std::string& sdp) {
|
| + return new webrtc::MockSessionDescription(type, sdp);
|
| }
|
|
|
| webrtc::IceCandidateInterface*
|
|
|