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

Side by Side Diff: content/renderer/media/rtc_peer_connection_handler.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_RTC_PEER_CONNECTION_HANDLER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ 6 #define CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 virtual void getStats( 127 virtual void getStats(
128 const WebKit::WebRTCStatsRequest& request) OVERRIDE; 128 const WebKit::WebRTCStatsRequest& request) OVERRIDE;
129 virtual WebKit::WebRTCDataChannelHandler* createDataChannel( 129 virtual WebKit::WebRTCDataChannelHandler* createDataChannel(
130 const WebKit::WebString& label, bool reliable) OVERRIDE; 130 const WebKit::WebString& label, bool reliable) OVERRIDE;
131 virtual WebKit::WebRTCDTMFSenderHandler* createDTMFSender( 131 virtual WebKit::WebRTCDTMFSenderHandler* createDTMFSender(
132 const WebKit::WebMediaStreamTrack& track) OVERRIDE; 132 const WebKit::WebMediaStreamTrack& track) OVERRIDE;
133 virtual void stop() OVERRIDE; 133 virtual void stop() OVERRIDE;
134 134
135 // webrtc::PeerConnectionObserver implementation 135 // webrtc::PeerConnectionObserver implementation
136 virtual void OnError() OVERRIDE; 136 virtual void OnError() OVERRIDE;
137 virtual void OnStateChange(StateType state_changed) OVERRIDE; 137 // Triggered when the SignalingState changed.
138 virtual void OnSignalingChange(
139 webrtc::PeerConnectionInterface::SignalingState new_state) OVERRIDE;
138 virtual void OnAddStream(webrtc::MediaStreamInterface* stream) OVERRIDE; 140 virtual void OnAddStream(webrtc::MediaStreamInterface* stream) OVERRIDE;
139 virtual void OnRemoveStream(webrtc::MediaStreamInterface* stream) OVERRIDE; 141 virtual void OnRemoveStream(webrtc::MediaStreamInterface* stream) OVERRIDE;
140 virtual void OnIceCandidate( 142 virtual void OnIceCandidate(
141 const webrtc::IceCandidateInterface* candidate) OVERRIDE; 143 const webrtc::IceCandidateInterface* candidate) OVERRIDE;
142 virtual void OnIceComplete() OVERRIDE; 144 virtual void OnIceConnectionChange(
145 webrtc::PeerConnectionInterface::IceConnectionState new_state) OVERRIDE;
146 virtual void OnIceGatheringChange(
147 webrtc::PeerConnectionInterface::IceGatheringState new_state) OVERRIDE;
148
143 virtual void OnDataChannel( 149 virtual void OnDataChannel(
144 webrtc::DataChannelInterface* data_channel) OVERRIDE; 150 webrtc::DataChannelInterface* data_channel) OVERRIDE;
145 virtual void OnRenegotiationNeeded() OVERRIDE; 151 virtual void OnRenegotiationNeeded() OVERRIDE;
146 152
147 // Delegate functions to allow for mocking of WebKit interfaces. 153 // Delegate functions to allow for mocking of WebKit interfaces.
148 // getStats takes ownership of request parameter. 154 // getStats takes ownership of request parameter.
149 virtual void getStats(LocalRTCStatsRequest* request); 155 virtual void getStats(LocalRTCStatsRequest* request);
150 156
151 // Calls GetStats on |native_peer_connection_|. 157 // Calls GetStats on |native_peer_connection_|.
152 void GetStats(webrtc::StatsObserver* observer, 158 void GetStats(webrtc::StatsObserver* observer,
153 webrtc::MediaStreamTrackInterface* track); 159 webrtc::MediaStreamTrackInterface* track);
154 160
155 PeerConnectionTracker* peer_connection_tracker(); 161 PeerConnectionTracker* peer_connection_tracker();
162
156 private: 163 private:
157 webrtc::SessionDescriptionInterface* CreateNativeSessionDescription( 164 webrtc::SessionDescriptionInterface* CreateNativeSessionDescription(
158 const WebKit::WebRTCSessionDescription& description, 165 const WebKit::WebRTCSessionDescription& description,
159 webrtc::SdpParseError* error); 166 webrtc::SdpParseError* error);
160 167
161 // |client_| is a weak pointer, and is valid until stop() has returned. 168 // |client_| is a weak pointer, and is valid until stop() has returned.
162 WebKit::WebRTCPeerConnectionHandlerClient* client_; 169 WebKit::WebRTCPeerConnectionHandlerClient* client_;
163 170
164 WebKit::WebFrame* frame_; 171 WebKit::WebFrame* frame_;
165 172
166 PeerConnectionTracker* peer_connection_tracker_; 173 PeerConnectionTracker* peer_connection_tracker_;
167 174
168 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); 175 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler);
169 }; 176 };
170 177
171 } // namespace content 178 } // namespace content
172 179
173 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ 180 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698