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

Side by Side Diff: content/renderer/media/mock_media_stream_dependency_factory.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_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 } // namespace webrtc 67 } // namespace webrtc
68 68
69 // A mock factory for creating different objects for 69 // A mock factory for creating different objects for
70 // RTC MediaStreams and PeerConnections. 70 // RTC MediaStreams and PeerConnections.
71 class MockMediaStreamDependencyFactory : public MediaStreamDependencyFactory { 71 class MockMediaStreamDependencyFactory : public MediaStreamDependencyFactory {
72 public: 72 public:
73 MockMediaStreamDependencyFactory(); 73 MockMediaStreamDependencyFactory();
74 virtual ~MockMediaStreamDependencyFactory(); 74 virtual ~MockMediaStreamDependencyFactory();
75 75
76 virtual talk_base::scoped_refptr<webrtc::PeerConnectionInterface> 76 virtual scoped_refptr<webrtc::PeerConnectionInterface>
77 CreatePeerConnection( 77 CreatePeerConnection(const std::string& config,
78 const std::string& config, 78 webrtc::PeerConnectionObserver* observer) OVERRIDE;
79 webrtc::PeerConnectionObserver* observer) OVERRIDE; 79 virtual scoped_refptr<webrtc::PeerConnectionInterface>
80 virtual talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface> 80 CreatePeerConnection(const webrtc::JsepInterface::IceServers& ice_servers,
81 const webrtc::MediaConstraintsInterface* constraints,
82 webrtc::PeerConnectionObserver* observer) OVERRIDE;
83 virtual scoped_refptr<webrtc::LocalMediaStreamInterface>
81 CreateLocalMediaStream(const std::string& label) OVERRIDE; 84 CreateLocalMediaStream(const std::string& label) OVERRIDE;
82 virtual talk_base::scoped_refptr<webrtc::LocalVideoTrackInterface> 85 virtual scoped_refptr<webrtc::LocalVideoTrackInterface>
83 CreateLocalVideoTrack( 86 CreateLocalVideoTrack(const std::string& label,
84 const std::string& label, 87 int video_session_id) OVERRIDE;
85 int video_session_id) OVERRIDE; 88 virtual scoped_refptr<webrtc::LocalAudioTrackInterface>
86 virtual talk_base::scoped_refptr<webrtc::LocalAudioTrackInterface> 89 CreateLocalAudioTrack(const std::string& label,
87 CreateLocalAudioTrack( 90 webrtc::AudioDeviceModule* audio_device) OVERRIDE;
88 const std::string& label,
89 webrtc::AudioDeviceModule* audio_device) OVERRIDE;
90 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription( 91 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription(
91 const std::string& sdp) OVERRIDE; 92 const std::string& sdp) OVERRIDE;
93 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription(
94 const std::string& type,
95 const std::string& sdp) OVERRIDE;
92 virtual webrtc::IceCandidateInterface* CreateIceCandidate( 96 virtual webrtc::IceCandidateInterface* CreateIceCandidate(
93 const std::string& sdp_mid, 97 const std::string& sdp_mid,
94 int sdp_mline_index, 98 int sdp_mline_index,
95 const std::string& sdp) OVERRIDE; 99 const std::string& sdp) OVERRIDE;
96 100
97 virtual bool EnsurePeerConnectionFactory() OVERRIDE; 101 virtual bool EnsurePeerConnectionFactory() OVERRIDE;
98 virtual void SetAudioDeviceSessionId(int session_id) OVERRIDE; 102 virtual void SetAudioDeviceSessionId(int session_id) OVERRIDE;
99 103
100 private: 104 private:
101 bool mock_pc_factory_created_; 105 bool mock_pc_factory_created_;
102 106
103 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); 107 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory);
104 }; 108 };
105 109
106 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 110 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698