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
3 // found in the LICENSE file.
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_
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "testing/gmock/include/gmock/gmock.h"
13 #include "third_party/WebKit/public/platform/WebMediaStream.h"
14 #include "third_party/WebKit/public/platform/WebRTCICECandidate.h"
15 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h"
19 class MockWebRTCPeerConnectionHandlerClient
20 : public blink::WebRTCPeerConnectionHandlerClient
{
22 MockWebRTCPeerConnectionHandlerClient();
23 virtual ~MockWebRTCPeerConnectionHandlerClient();
25 // WebRTCPeerConnectionHandlerClient implementation.
26 MOCK_METHOD0(negotiationNeeded
, void());
27 MOCK_METHOD1(didGenerateICECandidate
,
28 void(const blink::WebRTCICECandidate
& candidate
));
29 MOCK_METHOD1(didChangeSignalingState
, void(SignalingState state
));
30 MOCK_METHOD1(didChangeICEGatheringState
, void(ICEGatheringState state
));
31 MOCK_METHOD1(didChangeICEConnectionState
, void(ICEConnectionState state
));
32 MOCK_METHOD1(didAddRemoteStream
,
33 void(const blink::WebMediaStream
& stream_descriptor
));
34 MOCK_METHOD1(didRemoveRemoteStream
,
35 void(const blink::WebMediaStream
& stream_descriptor
));
36 MOCK_METHOD1(didAddRemoteDataChannel
,
37 void(blink::WebRTCDataChannelHandler
*));
38 MOCK_METHOD0(releasePeerConnectionHandler
, void());
40 void didGenerateICECandidateWorker(
41 const blink::WebRTCICECandidate
& candidate
);
42 void didAddRemoteStreamWorker(
43 const blink::WebMediaStream
& stream_descriptor
);
44 void didRemoveRemoteStreamWorker(
45 const blink::WebMediaStream
& stream_descriptor
);
47 const std::string
& candidate_sdp() const { return candidate_sdp_
; }
48 int candidate_mlineindex() const {
49 return candidate_mline_index_
;
51 const std::string
& candidate_mid() const { return candidate_mid_
; }
52 const blink::WebMediaStream
& remote_stream() const { return remote_steam_
;}
55 blink::WebMediaStream remote_steam_
;
56 std::string candidate_sdp_
;
57 int candidate_mline_index_
;
58 std::string candidate_mid_
;
60 DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandlerClient
);
63 } // namespace content
65 #endif // CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_