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

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

Issue 272043003: Renamed MediaStreamDependencyFactory to PeerConnectionDependencyFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: media_stream_dependency_factory_unittest.cc Created 6 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
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 "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
14 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h " 15 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h "
15 16
16 namespace content { 17 namespace content {
17 18
18 class MockMediaStreamDependencyFactory; 19 class MockPeerConnectionDependencyFactory;
19 class MockStreamCollection; 20 class MockStreamCollection;
20 21
21 class MockPeerConnectionImpl : public webrtc::PeerConnectionInterface { 22 class MockPeerConnectionImpl : public webrtc::PeerConnectionInterface {
22 public: 23 public:
23 explicit MockPeerConnectionImpl(MockMediaStreamDependencyFactory* factory); 24 explicit MockPeerConnectionImpl(MockPeerConnectionDependencyFactory* factory);
24 25
25 // PeerConnectionInterface implementation. 26 // PeerConnectionInterface implementation.
26 virtual talk_base::scoped_refptr<webrtc::StreamCollectionInterface> 27 virtual talk_base::scoped_refptr<webrtc::StreamCollectionInterface>
27 local_streams() OVERRIDE; 28 local_streams() OVERRIDE;
28 virtual talk_base::scoped_refptr<webrtc::StreamCollectionInterface> 29 virtual talk_base::scoped_refptr<webrtc::StreamCollectionInterface>
29 remote_streams() OVERRIDE; 30 remote_streams() OVERRIDE;
30 virtual bool AddStream( 31 virtual bool AddStream(
31 webrtc::MediaStreamInterface* local_stream, 32 webrtc::MediaStreamInterface* local_stream,
32 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; 33 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
33 virtual void RemoveStream( 34 virtual void RemoveStream(
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 return created_sessiondescription_.get(); 114 return created_sessiondescription_.get();
114 } 115 }
115 static const char kDummyOffer[]; 116 static const char kDummyOffer[];
116 static const char kDummyAnswer[]; 117 static const char kDummyAnswer[];
117 118
118 protected: 119 protected:
119 virtual ~MockPeerConnectionImpl(); 120 virtual ~MockPeerConnectionImpl();
120 121
121 private: 122 private:
122 // Used for creating MockSessionDescription. 123 // Used for creating MockSessionDescription.
123 MockMediaStreamDependencyFactory* dependency_factory_; 124 MockPeerConnectionDependencyFactory* dependency_factory_;
124 125
125 std::string stream_label_; 126 std::string stream_label_;
126 talk_base::scoped_refptr<MockStreamCollection> local_streams_; 127 talk_base::scoped_refptr<MockStreamCollection> local_streams_;
127 talk_base::scoped_refptr<MockStreamCollection> remote_streams_; 128 talk_base::scoped_refptr<MockStreamCollection> remote_streams_;
128 scoped_ptr<webrtc::SessionDescriptionInterface> local_desc_; 129 scoped_ptr<webrtc::SessionDescriptionInterface> local_desc_;
129 scoped_ptr<webrtc::SessionDescriptionInterface> remote_desc_; 130 scoped_ptr<webrtc::SessionDescriptionInterface> remote_desc_;
130 scoped_ptr<webrtc::SessionDescriptionInterface> created_sessiondescription_; 131 scoped_ptr<webrtc::SessionDescriptionInterface> created_sessiondescription_;
131 bool hint_audio_; 132 bool hint_audio_;
132 bool hint_video_; 133 bool hint_video_;
133 bool getstats_result_; 134 bool getstats_result_;
134 std::string description_sdp_; 135 std::string description_sdp_;
135 std::string sdp_mid_; 136 std::string sdp_mid_;
136 int sdp_mline_index_; 137 int sdp_mline_index_;
137 std::string ice_sdp_; 138 std::string ice_sdp_;
138 139
139 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl); 140 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl);
140 }; 141 };
141 142
142 } // namespace content 143 } // namespace content
143 144
144 #endif // CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ 145 #endif // CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698