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

Side by Side Diff: talk/app/webrtc/objc/RTCMediaConstraints.mm

Issue 1785353003: Replace scoped_ptr with unique_ptr in talk/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 | « talk/app/webrtc/objc/RTCI420Frame.mm ('k') | talk/app/webrtc/objc/RTCMediaStreamTrack.mm » ('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 * libjingle 2 * libjingle
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 15 matching lines...) Expand all
26 */ 26 */
27 27
28 #if !defined(__has_feature) || !__has_feature(objc_arc) 28 #if !defined(__has_feature) || !__has_feature(objc_arc)
29 #error "This file requires ARC support." 29 #error "This file requires ARC support."
30 #endif 30 #endif
31 31
32 #import "RTCMediaConstraints+Internal.h" 32 #import "RTCMediaConstraints+Internal.h"
33 33
34 #import "RTCPair.h" 34 #import "RTCPair.h"
35 35
36 #include "webrtc/base/scoped_ptr.h" 36 #include <memory>
37 37
38 // TODO(hughv): Add accessors for mandatory and optional constraints. 38 // TODO(hughv): Add accessors for mandatory and optional constraints.
39 // TODO(hughv): Add description. 39 // TODO(hughv): Add description.
40 40
41 @implementation RTCMediaConstraints { 41 @implementation RTCMediaConstraints {
42 rtc::scoped_ptr<webrtc::RTCMediaConstraintsNative> _constraints; 42 std::unique_ptr<webrtc::RTCMediaConstraintsNative> _constraints;
43 webrtc::MediaConstraintsInterface::Constraints _mandatory; 43 webrtc::MediaConstraintsInterface::Constraints _mandatory;
44 webrtc::MediaConstraintsInterface::Constraints _optional; 44 webrtc::MediaConstraintsInterface::Constraints _optional;
45 } 45 }
46 46
47 - (id)initWithMandatoryConstraints:(NSArray*)mandatory 47 - (id)initWithMandatoryConstraints:(NSArray*)mandatory
48 optionalConstraints:(NSArray*)optional { 48 optionalConstraints:(NSArray*)optional {
49 if ((self = [super init])) { 49 if ((self = [super init])) {
50 _mandatory = [[self class] constraintsFromArray:mandatory]; 50 _mandatory = [[self class] constraintsFromArray:mandatory];
51 _optional = [[self class] constraintsFromArray:optional]; 51 _optional = [[self class] constraintsFromArray:optional];
52 _constraints.reset( 52 _constraints.reset(
(...skipping 14 matching lines...) Expand all
67 67
68 @end 68 @end
69 69
70 @implementation RTCMediaConstraints (internal) 70 @implementation RTCMediaConstraints (internal)
71 71
72 - (const webrtc::RTCMediaConstraintsNative*)constraints { 72 - (const webrtc::RTCMediaConstraintsNative*)constraints {
73 return _constraints.get(); 73 return _constraints.get();
74 } 74 }
75 75
76 @end 76 @end
OLDNEW
« no previous file with comments | « talk/app/webrtc/objc/RTCI420Frame.mm ('k') | talk/app/webrtc/objc/RTCMediaStreamTrack.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698