OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 const std::string& sdp, | 138 const std::string& sdp, |
139 webrtc::SdpParseError* error) override; | 139 webrtc::SdpParseError* error) override; |
140 webrtc::IceCandidateInterface* CreateIceCandidate( | 140 webrtc::IceCandidateInterface* CreateIceCandidate( |
141 const std::string& sdp_mid, | 141 const std::string& sdp_mid, |
142 int sdp_mline_index, | 142 int sdp_mline_index, |
143 const std::string& sdp) override; | 143 const std::string& sdp) override; |
144 | 144 |
145 scoped_refptr<base::SingleThreadTaskRunner> GetWebRtcSignalingThread() | 145 scoped_refptr<base::SingleThreadTaskRunner> GetWebRtcSignalingThread() |
146 const override; | 146 const override; |
147 | 147 |
| 148 // If |fail| is true, subsequent calls to CreateSessionDescription will |
| 149 // return nullptr. This can be used to fake a blob of SDP that fails to be |
| 150 // parsed. |
| 151 void SetFailToCreateSessionDescription(bool fail); |
| 152 |
148 private: | 153 private: |
149 base::Thread signaling_thread_; | 154 base::Thread signaling_thread_; |
| 155 bool fail_to_create_session_description_ = false; |
150 | 156 |
151 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); | 157 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); |
152 }; | 158 }; |
153 | 159 |
154 } // namespace content | 160 } // namespace content |
155 | 161 |
156 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY
_H_ | 162 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY
_H_ |
OLD | NEW |