| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 |
| 11 // This file contains mock implementations of observers used in PeerConnection. | 11 // This file contains mock implementations of observers used in PeerConnection. |
| 12 | 12 |
| 13 #ifndef WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ | 13 #ifndef WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ |
| 14 #define WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ | 14 #define WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ |
| 15 | 15 |
| 16 #include <memory> |
| 16 #include <string> | 17 #include <string> |
| 17 | 18 |
| 18 #include "webrtc/api/datachannelinterface.h" | 19 #include "webrtc/api/datachannelinterface.h" |
| 19 | 20 |
| 20 namespace webrtc { | 21 namespace webrtc { |
| 21 | 22 |
| 22 class MockCreateSessionDescriptionObserver | 23 class MockCreateSessionDescriptionObserver |
| 23 : public webrtc::CreateSessionDescriptionObserver { | 24 : public webrtc::CreateSessionDescriptionObserver { |
| 24 public: | 25 public: |
| 25 MockCreateSessionDescriptionObserver() | 26 MockCreateSessionDescriptionObserver() |
| (...skipping 11 matching lines...) Expand all Loading... |
| 37 } | 38 } |
| 38 bool called() const { return called_; } | 39 bool called() const { return called_; } |
| 39 bool result() const { return result_; } | 40 bool result() const { return result_; } |
| 40 SessionDescriptionInterface* release_desc() { | 41 SessionDescriptionInterface* release_desc() { |
| 41 return desc_.release(); | 42 return desc_.release(); |
| 42 } | 43 } |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 bool called_; | 46 bool called_; |
| 46 bool result_; | 47 bool result_; |
| 47 rtc::scoped_ptr<SessionDescriptionInterface> desc_; | 48 std::unique_ptr<SessionDescriptionInterface> desc_; |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 class MockSetSessionDescriptionObserver | 51 class MockSetSessionDescriptionObserver |
| 51 : public webrtc::SetSessionDescriptionObserver { | 52 : public webrtc::SetSessionDescriptionObserver { |
| 52 public: | 53 public: |
| 53 MockSetSessionDescriptionObserver() | 54 MockSetSessionDescriptionObserver() |
| 54 : called_(false), | 55 : called_(false), |
| 55 result_(false) {} | 56 result_(false) {} |
| 56 virtual ~MockSetSessionDescriptionObserver() {} | 57 virtual ~MockSetSessionDescriptionObserver() {} |
| 57 virtual void OnSuccess() { | 58 virtual void OnSuccess() { |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 int bytes_sent; | 218 int bytes_sent; |
| 218 int available_receive_bandwidth; | 219 int available_receive_bandwidth; |
| 219 std::string dtls_cipher; | 220 std::string dtls_cipher; |
| 220 std::string srtp_cipher; | 221 std::string srtp_cipher; |
| 221 } stats_; | 222 } stats_; |
| 222 }; | 223 }; |
| 223 | 224 |
| 224 } // namespace webrtc | 225 } // namespace webrtc |
| 225 | 226 |
| 226 #endif // WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ | 227 #endif // WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ |
| OLD | NEW |