Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: content/renderer/media/mock_web_rtc_peer_connection_handler_client.h

Issue 12210111: Hookup new ice state callbacks OnIceConnectionChange and OnIceGatheringChange from PeerConnectionOb… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge with latest code base. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/WebMediaStream.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 state) OVERRIDE;
29 virtual void didChangeICEState(ICEState) OVERRIDE; 29 virtual void didChangeICEGatheringState(ICEGatheringState state) OVERRIDE;
30 virtual void didChangeICEConnectionState(ICEConnectionState state) OVERRIDE;
30 virtual void didAddRemoteStream( 31 virtual void didAddRemoteStream(
31 const WebKit::WebMediaStream& stream_descriptor) OVERRIDE; 32 const WebKit::WebMediaStream& stream_descriptor) OVERRIDE;
32 virtual void didRemoveRemoteStream( 33 virtual void didRemoveRemoteStream(
33 const WebKit::WebMediaStream& stream_descriptor) OVERRIDE; 34 const WebKit::WebMediaStream& stream_descriptor) OVERRIDE;
34 35
35 bool renegotiate() const { return renegotiate_; } 36 bool renegotiate() const { return renegotiate_; }
36 37
37 const std::string& candidate_sdp() const { return candidate_sdp_; } 38 const std::string& candidate_sdp() const { return candidate_sdp_; }
38 int candidate_mlineindex() const { 39 int candidate_mlineindex() const {
39 return candidate_mline_index_; 40 return candidate_mline_index_;
40 } 41 }
41 const std::string& candidate_mid() const { return candidate_mid_ ; } 42 const std::string& candidate_mid() const { return candidate_mid_ ; }
42 SignalingState signaling_state() const { return signaling_state_; } 43 SignalingState signaling_state() const { return signaling_state_; }
43 ICEState ice_state() const { return ice_state_; } 44 ICEConnectionState ice_connection_state() const {
45 return ice_connection_state_;
46 }
47 ICEGatheringState ice_gathering_state() const {
48 return ice_gathering_state_;
49 }
44 const std::string& stream_label() const { return stream_label_; } 50 const std::string& stream_label() const { return stream_label_; }
45 51
46 private: 52 private:
47 bool renegotiate_; 53 bool renegotiate_;
48 std::string stream_label_; 54 std::string stream_label_;
49 SignalingState signaling_state_; 55 SignalingState signaling_state_;
50 ICEState ice_state_; 56 ICEConnectionState ice_connection_state_;
57 ICEGatheringState ice_gathering_state_;
51 std::string candidate_sdp_; 58 std::string candidate_sdp_;
52 int candidate_mline_index_; 59 int candidate_mline_index_;
53 std::string candidate_mid_; 60 std::string candidate_mid_;
54 61
55 DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandlerClient); 62 DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandlerClient);
56 }; 63 };
57 64
58 } // namespace content 65 } // namespace content
59 66
60 #endif // CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_ 67 #endif // CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698