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

Unified Diff: webrtc/api/objc/RTCMediaConstraints.mm

Issue 1726213002: Compile rtc_api_objc on Mac. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Update TODO format Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/objc/RTCMediaConstraints.h ('k') | webrtc/api/objc/RTCMediaConstraints+Private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/objc/RTCMediaConstraints.mm
diff --git a/webrtc/api/objc/RTCMediaConstraints.mm b/webrtc/api/objc/RTCMediaConstraints.mm
index a53a517747f7a2ebcf9fb8f71b36a7ae8f3379bd..9d4e391d101b4af39c8edbd8a77df0d87c5e1005 100644
--- a/webrtc/api/objc/RTCMediaConstraints.mm
+++ b/webrtc/api/objc/RTCMediaConstraints.mm
@@ -13,6 +13,8 @@
#import "webrtc/api/objc/RTCMediaConstraints+Private.h"
#import "webrtc/base/objc/NSString+StdString.h"
+// TODO(hjon): Update nullability types. See http://crbug/webrtc/5592
+
namespace webrtc {
MediaConstraints::~MediaConstraints() {}
@@ -38,14 +40,18 @@ MediaConstraints::GetOptional() const {
@implementation RTCMediaConstraints {
- NSDictionary<NSString *, NSString *> *_mandatory;
- NSDictionary<NSString *, NSString *> *_optional;
+ NSDictionary *_mandatory;
+ // NSDictionary<NSString *, NSString *> *_mandatory;
+ NSDictionary *_optional;
+ // NSDictionary<NSString *, NSString *> *_optional;
}
- (instancetype)initWithMandatoryConstraints:
- (NSDictionary<NSString *, NSString *> *)mandatory
+ (NSDictionary *)mandatory
+ // (NSDictionary<NSString *, NSString *> *)mandatory
optionalConstraints:
- (NSDictionary<NSString *, NSString *> *)optional {
+ (NSDictionary *)optional {
+ // (NSDictionary<NSString *, NSString *> *)optional {
if (self = [super init]) {
_mandatory = [[NSDictionary alloc] initWithDictionary:mandatory
copyItems:YES];
@@ -76,15 +82,17 @@ MediaConstraints::GetOptional() const {
+ (webrtc::MediaConstraintsInterface::Constraints)
nativeConstraintsForConstraints:
- (NSDictionary<NSString *, NSString *> *)constraints {
+ (NSDictionary *)constraints {
+ // (NSDictionary<NSString *, NSString *> *)constraints {
webrtc::MediaConstraintsInterface::Constraints nativeConstraints;
for (NSString *key in constraints) {
NSAssert([key isKindOfClass:[NSString class]],
@"%@ is not an NSString.", key);
- NSAssert([constraints[key] isKindOfClass:[NSString class]],
- @"%@ is not an NSString.", constraints[key]);
+ NSString *value = [constraints objectForKey:key];
+ NSAssert([value isKindOfClass:[NSString class]],
+ @"%@ is not an NSString.", value);
nativeConstraints.push_back(webrtc::MediaConstraintsInterface::Constraint(
- key.stdString, constraints[key].stdString));
+ key.stdString, value.stdString));
}
return nativeConstraints;
}
« no previous file with comments | « webrtc/api/objc/RTCMediaConstraints.h ('k') | webrtc/api/objc/RTCMediaConstraints+Private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698