| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // warnings from -Winconsistent-missing-override. See | 27 // warnings from -Winconsistent-missing-override. See |
| 28 // http://crbug.com/428099. | 28 // http://crbug.com/428099. |
| 29 explicit MockWebRtcSession(MediaControllerInterface* media_controller) | 29 explicit MockWebRtcSession(MediaControllerInterface* media_controller) |
| 30 : WebRtcSession( | 30 : WebRtcSession( |
| 31 media_controller, | 31 media_controller, |
| 32 rtc::Thread::Current(), | 32 rtc::Thread::Current(), |
| 33 rtc::Thread::Current(), | 33 rtc::Thread::Current(), |
| 34 rtc::Thread::Current(), | 34 rtc::Thread::Current(), |
| 35 nullptr, | 35 nullptr, |
| 36 std::unique_ptr<cricket::TransportController>( | 36 std::unique_ptr<cricket::TransportController>( |
| 37 new cricket::TransportController(rtc::Thread::Current(), | 37 new cricket::TransportController( |
| 38 rtc::Thread::Current(), | 38 rtc::Thread::Current(), |
| 39 nullptr)), | 39 rtc::Thread::Current(), |
| 40 nullptr, |
| 41 /*redetermine_role_on_ice_restart=*/true, |
| 42 rtc::CryptoOptions())), |
| 40 std::unique_ptr<cricket::SctpTransportInternalFactory>()) {} | 43 std::unique_ptr<cricket::SctpTransportInternalFactory>()) {} |
| 41 MOCK_METHOD0(voice_channel, cricket::VoiceChannel*()); | 44 MOCK_METHOD0(voice_channel, cricket::VoiceChannel*()); |
| 42 MOCK_METHOD0(video_channel, cricket::VideoChannel*()); | 45 MOCK_METHOD0(video_channel, cricket::VideoChannel*()); |
| 43 // Libjingle uses "local" for a outgoing track, and "remote" for a incoming | 46 // Libjingle uses "local" for a outgoing track, and "remote" for a incoming |
| 44 // track. | 47 // track. |
| 45 MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*)); | 48 MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*)); |
| 46 MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*)); | 49 MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*)); |
| 47 MOCK_METHOD1(GetStats, | 50 MOCK_METHOD1(GetStats, |
| 48 std::unique_ptr<SessionStats>(const ChannelNamePairs&)); | 51 std::unique_ptr<SessionStats>(const ChannelNamePairs&)); |
| 49 MOCK_METHOD2(GetLocalCertificate, | 52 MOCK_METHOD2(GetLocalCertificate, |
| 50 bool(const std::string& transport_name, | 53 bool(const std::string& transport_name, |
| 51 rtc::scoped_refptr<rtc::RTCCertificate>* certificate)); | 54 rtc::scoped_refptr<rtc::RTCCertificate>* certificate)); |
| 52 | 55 |
| 53 // Workaround for gmock's inability to cope with move-only return values. | 56 // Workaround for gmock's inability to cope with move-only return values. |
| 54 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate( | 57 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate( |
| 55 const std::string& transport_name) /* override */ { | 58 const std::string& transport_name) /* override */ { |
| 56 return std::unique_ptr<rtc::SSLCertificate>( | 59 return std::unique_ptr<rtc::SSLCertificate>( |
| 57 GetRemoteSSLCertificate_ReturnsRawPointer(transport_name)); | 60 GetRemoteSSLCertificate_ReturnsRawPointer(transport_name)); |
| 58 } | 61 } |
| 59 MOCK_METHOD1(GetRemoteSSLCertificate_ReturnsRawPointer, | 62 MOCK_METHOD1(GetRemoteSSLCertificate_ReturnsRawPointer, |
| 60 rtc::SSLCertificate*(const std::string& transport_name)); | 63 rtc::SSLCertificate*(const std::string& transport_name)); |
| 61 }; | 64 }; |
| 62 | 65 |
| 63 } // namespace webrtc | 66 } // namespace webrtc |
| 64 | 67 |
| 65 #endif // WEBRTC_PC_TEST_MOCK_WEBRTCSESSION_H_ | 68 #endif // WEBRTC_PC_TEST_MOCK_WEBRTCSESSION_H_ |
| OLD | NEW |