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

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm

Issue 2249173002: iOS: add type to peer connection local streams (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix codestyle Created 4 years, 4 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
« no previous file with comments | « AUTHORS ('k') | webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 RTCPeerConnection* peer_connection = peer_connection_; 198 RTCPeerConnection* peer_connection = peer_connection_;
199 [peer_connection.delegate peerConnection:peer_connection 199 [peer_connection.delegate peerConnection:peer_connection
200 didRemoveIceCandidates:ice_candidates]; 200 didRemoveIceCandidates:ice_candidates];
201 } 201 }
202 202
203 } // namespace webrtc 203 } // namespace webrtc
204 204
205 205
206 @implementation RTCPeerConnection { 206 @implementation RTCPeerConnection {
207 NSMutableArray *_localStreams; 207 NSMutableArray<RTCMediaStream *> *_localStreams;
208 std::unique_ptr<webrtc::PeerConnectionDelegateAdapter> _observer; 208 std::unique_ptr<webrtc::PeerConnectionDelegateAdapter> _observer;
209 rtc::scoped_refptr<webrtc::PeerConnectionInterface> _peerConnection; 209 rtc::scoped_refptr<webrtc::PeerConnectionInterface> _peerConnection;
210 BOOL _hasStartedRtcEventLog; 210 BOOL _hasStartedRtcEventLog;
211 } 211 }
212 212
213 @synthesize delegate = _delegate; 213 @synthesize delegate = _delegate;
214 214
215 - (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory 215 - (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
216 configuration:(RTCConfiguration *)configuration 216 configuration:(RTCConfiguration *)configuration
217 constraints:(RTCMediaConstraints *)constraints 217 constraints:(RTCMediaConstraints *)constraints
(...skipping 16 matching lines...) Expand all
234 _observer.get()); 234 _observer.get());
235 if (!_peerConnection) { 235 if (!_peerConnection) {
236 return nil; 236 return nil;
237 } 237 }
238 _localStreams = [[NSMutableArray alloc] init]; 238 _localStreams = [[NSMutableArray alloc] init];
239 _delegate = delegate; 239 _delegate = delegate;
240 } 240 }
241 return self; 241 return self;
242 } 242 }
243 243
244 - (NSArray *)localStreams { 244 - (NSArray<RTCMediaStream *> *)localStreams {
245 return [_localStreams copy]; 245 return [_localStreams copy];
246 } 246 }
247 247
248 - (RTCSessionDescription *)localDescription { 248 - (RTCSessionDescription *)localDescription {
249 const webrtc::SessionDescriptionInterface *description = 249 const webrtc::SessionDescriptionInterface *description =
250 _peerConnection->local_description(); 250 _peerConnection->local_description();
251 return description ? 251 return description ?
252 [[RTCSessionDescription alloc] initWithNativeDescription:description] 252 [[RTCSessionDescription alloc] initWithNativeDescription:description]
253 : nil; 253 : nil;
254 } 254 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 case RTCStatsOutputLevelDebug: 583 case RTCStatsOutputLevelDebug:
584 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; 584 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug;
585 } 585 }
586 } 586 }
587 587
588 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { 588 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection {
589 return _peerConnection; 589 return _peerConnection;
590 } 590 }
591 591
592 @end 592 @end
OLDNEW
« no previous file with comments | « AUTHORS ('k') | webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698