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

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

Issue 1937693002: Replace scoped_ptr with unique_ptr everywhere (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@unique5
Patch Set: Created 4 years, 7 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
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
11 #import "RTCPeerConnectionFactory+Private.h" 11 #import "RTCPeerConnectionFactory+Private.h"
12 12
13 #import "NSString+StdString.h" 13 #import "NSString+StdString.h"
14 #if defined(WEBRTC_IOS) 14 #if defined(WEBRTC_IOS)
15 #import "RTCAVFoundationVideoSource+Private.h" 15 #import "RTCAVFoundationVideoSource+Private.h"
16 #endif 16 #endif
17 #import "RTCAudioTrack+Private.h" 17 #import "RTCAudioTrack+Private.h"
18 #import "RTCMediaStream+Private.h" 18 #import "RTCMediaStream+Private.h"
19 #import "RTCPeerConnection+Private.h" 19 #import "RTCPeerConnection+Private.h"
20 #import "RTCVideoSource+Private.h" 20 #import "RTCVideoSource+Private.h"
21 #import "RTCVideoTrack+Private.h" 21 #import "RTCVideoTrack+Private.h"
22 22
23 #include <memory>
24
23 @implementation RTCPeerConnectionFactory { 25 @implementation RTCPeerConnectionFactory {
24 rtc::scoped_ptr<rtc::Thread> _signalingThread; 26 std::unique_ptr<rtc::Thread> _signalingThread;
25 rtc::scoped_ptr<rtc::Thread> _workerThread; 27 std::unique_ptr<rtc::Thread> _workerThread;
26 } 28 }
27 29
28 @synthesize nativeFactory = _nativeFactory; 30 @synthesize nativeFactory = _nativeFactory;
29 31
30 - (instancetype)init { 32 - (instancetype)init {
31 if ((self = [super init])) { 33 if ((self = [super init])) {
32 _signalingThread.reset(new rtc::Thread()); 34 _signalingThread.reset(new rtc::Thread());
33 BOOL result = _signalingThread->Start(); 35 BOOL result = _signalingThread->Start();
34 NSAssert(result, @"Failed to start signaling thread."); 36 NSAssert(result, @"Failed to start signaling thread.");
35 _workerThread.reset(new rtc::Thread()); 37 _workerThread.reset(new rtc::Thread());
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 (RTCMediaConstraints *)constraints 78 (RTCMediaConstraints *)constraints
77 delegate: 79 delegate:
78 (nullable id<RTCPeerConnectionDelegate>)delegate { 80 (nullable id<RTCPeerConnectionDelegate>)delegate {
79 return [[RTCPeerConnection alloc] initWithFactory:self 81 return [[RTCPeerConnection alloc] initWithFactory:self
80 configuration:configuration 82 configuration:configuration
81 constraints:constraints 83 constraints:constraints
82 delegate:delegate]; 84 delegate:delegate];
83 } 85 }
84 86
85 @end 87 @end
OLDNEW
« no previous file with comments | « webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm ('k') | webrtc/sdk/objc/Framework/Classes/RTCVideoFrame.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698