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

Side by Side Diff: content/renderer/media/mock_media_stream_dependency_factory.cc

Issue 8060055: Adding support for MediaStream and PeerConnection functionality (Closed) Base URL: http://git.chromium.org/chromium/chromium.git@trunk
Patch Set: Code revies 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 #include "base/logging.h"
6 #include "content/renderer/media/mock_media_stream_dependency_factory.h"
7 #include "content/renderer/media/mock_peer_connection_impl.h"
8 #include "third_party/libjingle/source/talk/session/phone/webrtcmediaengine.h"
9
10 MockMediaStreamDependencyFactory::MockMediaStreamDependencyFactory()
11 : mock_pc_factory_created_(false) {
12 }
13
14 MockMediaStreamDependencyFactory::~MockMediaStreamDependencyFactory() {}
15
16 cricket::WebRtcMediaEngine*
17 MockMediaStreamDependencyFactory::CreateWebRtcMediaEngine() {
18 return new cricket::WebRtcMediaEngine(NULL, NULL, NULL);
19 }
20
21 bool MockMediaStreamDependencyFactory::CreatePeerConnectionFactory(
22 cricket::PortAllocator* port_allocator,
23 cricket::MediaEngineInterface* media_engine,
24 talk_base::Thread* worker_thread) {
25 mock_pc_factory_created_ = true;
26 return true;
27 }
28
29 void MockMediaStreamDependencyFactory::DeletePeerConnectionFactory() {
30 mock_pc_factory_created_ = false;
31 }
32
33 bool MockMediaStreamDependencyFactory::PeerConnectionFactoryCreated() {
34 return mock_pc_factory_created_;
35 }
36
37 webrtc::PeerConnection* MockMediaStreamDependencyFactory::CreatePeerConnection(
38 talk_base::Thread* signaling_thread) {
39 DCHECK(mock_pc_factory_created_);
40 return new webrtc::MockPeerConnectionImpl();
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698