| OLD | NEW |
| 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 #include "content/renderer/media/mock_web_rtc_peer_connection_handler_client.h" | 4 #include "content/renderer/media/mock_web_rtc_peer_connection_handler_client.h" |
| 5 | 5 |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamDescr
iptor.h" | 8 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStream.h" |
| 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 MockWebRTCPeerConnectionHandlerClient:: | 13 MockWebRTCPeerConnectionHandlerClient:: |
| 14 MockWebRTCPeerConnectionHandlerClient() | 14 MockWebRTCPeerConnectionHandlerClient() |
| 15 : renegotiate_(false), | 15 : renegotiate_(false), |
| 16 signaling_state_(SignalingStateStable), | 16 signaling_state_(SignalingStateStable), |
| 17 ice_state_(ICEStateNew), | 17 ice_state_(ICEStateNew), |
| 18 candidate_mline_index_(-1) { | 18 candidate_mline_index_(-1) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 41 void MockWebRTCPeerConnectionHandlerClient::didChangeSignalingState( | 41 void MockWebRTCPeerConnectionHandlerClient::didChangeSignalingState( |
| 42 SignalingState state) { | 42 SignalingState state) { |
| 43 signaling_state_ = state; | 43 signaling_state_ = state; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void MockWebRTCPeerConnectionHandlerClient::didChangeICEState(ICEState state) { | 46 void MockWebRTCPeerConnectionHandlerClient::didChangeICEState(ICEState state) { |
| 47 ice_state_ = state; | 47 ice_state_ = state; |
| 48 } | 48 } |
| 49 | 49 |
| 50 void MockWebRTCPeerConnectionHandlerClient::didAddRemoteStream( | 50 void MockWebRTCPeerConnectionHandlerClient::didAddRemoteStream( |
| 51 const WebKit::WebMediaStreamDescriptor& stream_descriptor) { | 51 const WebKit::WebMediaStream& stream_descriptor) { |
| 52 stream_label_ = UTF16ToUTF8(stream_descriptor.label()); | 52 stream_label_ = UTF16ToUTF8(stream_descriptor.label()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void MockWebRTCPeerConnectionHandlerClient::didRemoveRemoteStream( | 55 void MockWebRTCPeerConnectionHandlerClient::didRemoveRemoteStream( |
| 56 const WebKit::WebMediaStreamDescriptor& stream_descriptor) { | 56 const WebKit::WebMediaStream& stream_descriptor) { |
| 57 DCHECK(stream_label_ == UTF16ToUTF8(stream_descriptor.label())); | 57 DCHECK(stream_label_ == UTF16ToUTF8(stream_descriptor.label())); |
| 58 stream_label_.clear(); | 58 stream_label_.clear(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace content | 61 } // namespace content |
| OLD | NEW |