| 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 | 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_ | 6 #define CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamDescr
iptor.h" | 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStream.h" |
| 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebRTCICECandidate.
h" | 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebRTCICECandidate.
h" |
| 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebRTCPeerConnectio
nHandlerClient.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebRTCPeerConnectio
nHandlerClient.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class MockWebRTCPeerConnectionHandlerClient | 18 class MockWebRTCPeerConnectionHandlerClient |
| 19 : public WebKit::WebRTCPeerConnectionHandlerClient { | 19 : public WebKit::WebRTCPeerConnectionHandlerClient { |
| 20 public: | 20 public: |
| 21 MockWebRTCPeerConnectionHandlerClient(); | 21 MockWebRTCPeerConnectionHandlerClient(); |
| 22 virtual ~MockWebRTCPeerConnectionHandlerClient(); | 22 virtual ~MockWebRTCPeerConnectionHandlerClient(); |
| 23 | 23 |
| 24 // WebRTCPeerConnectionHandlerClient implementation. | 24 // WebRTCPeerConnectionHandlerClient implementation. |
| 25 virtual void negotiationNeeded() OVERRIDE; | 25 virtual void negotiationNeeded() OVERRIDE; |
| 26 virtual void didGenerateICECandidate( | 26 virtual void didGenerateICECandidate( |
| 27 const WebKit::WebRTCICECandidate& candidate) OVERRIDE; | 27 const WebKit::WebRTCICECandidate& candidate) OVERRIDE; |
| 28 virtual void didChangeSignalingState(SignalingState) OVERRIDE; | 28 virtual void didChangeSignalingState(SignalingState) OVERRIDE; |
| 29 virtual void didChangeICEState(ICEState) OVERRIDE; | 29 virtual void didChangeICEState(ICEState) OVERRIDE; |
| 30 virtual void didAddRemoteStream( | 30 virtual void didAddRemoteStream( |
| 31 const WebKit::WebMediaStreamDescriptor& stream_descriptor) OVERRIDE; | 31 const WebKit::WebMediaStream& stream_descriptor) OVERRIDE; |
| 32 virtual void didRemoveRemoteStream( | 32 virtual void didRemoveRemoteStream( |
| 33 const WebKit::WebMediaStreamDescriptor& stream_descriptor) OVERRIDE; | 33 const WebKit::WebMediaStream& stream_descriptor) OVERRIDE; |
| 34 | 34 |
| 35 bool renegotiate() const { return renegotiate_; } | 35 bool renegotiate() const { return renegotiate_; } |
| 36 | 36 |
| 37 const std::string& candidate_sdp() const { return candidate_sdp_; } | 37 const std::string& candidate_sdp() const { return candidate_sdp_; } |
| 38 int candidate_mlineindex() const { | 38 int candidate_mlineindex() const { |
| 39 return candidate_mline_index_; | 39 return candidate_mline_index_; |
| 40 } | 40 } |
| 41 const std::string& candidate_mid() const { return candidate_mid_ ; } | 41 const std::string& candidate_mid() const { return candidate_mid_ ; } |
| 42 SignalingState signaling_state() const { return signaling_state_; } | 42 SignalingState signaling_state() const { return signaling_state_; } |
| 43 ICEState ice_state() const { return ice_state_; } | 43 ICEState ice_state() const { return ice_state_; } |
| 44 const std::string& stream_label() const { return stream_label_; } | 44 const std::string& stream_label() const { return stream_label_; } |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 bool renegotiate_; | 47 bool renegotiate_; |
| 48 std::string stream_label_; | 48 std::string stream_label_; |
| 49 SignalingState signaling_state_; | 49 SignalingState signaling_state_; |
| 50 ICEState ice_state_; | 50 ICEState ice_state_; |
| 51 std::string candidate_sdp_; | 51 std::string candidate_sdp_; |
| 52 int candidate_mline_index_; | 52 int candidate_mline_index_; |
| 53 std::string candidate_mid_; | 53 std::string candidate_mid_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandlerClient); | 55 DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandlerClient); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace content | 58 } // namespace content |
| 59 | 59 |
| 60 #endif // CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_ | 60 #endif // CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_ |
| OLD | NEW |