OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 for (size_t i = 0; i < numberOfServers; ++i) { | 122 for (size_t i = 0; i < numberOfServers; ++i) { |
123 Dictionary iceServer; | 123 Dictionary iceServer; |
124 ok = iceServers.get(i, iceServer); | 124 ok = iceServers.get(i, iceServer); |
125 if (!ok) { | 125 if (!ok) { |
126 exceptionState.throwTypeError("Malformed RTCIceServer"); | 126 exceptionState.throwTypeError("Malformed RTCIceServer"); |
127 return 0; | 127 return 0; |
128 } | 128 } |
129 | 129 |
130 Vector<String> names; | 130 Vector<String> names; |
131 iceServer.getOwnPropertyNames(names); | 131 iceServer.getPropertyNames(names); |
132 | 132 |
133 Vector<String> urlStrings; | 133 Vector<String> urlStrings; |
134 if (names.contains("urls")) { | 134 if (names.contains("urls")) { |
135 if (!DictionaryHelper::get(iceServer, "urls", urlStrings) || !urlStr
ings.size()) { | 135 if (!DictionaryHelper::get(iceServer, "urls", urlStrings) || !urlStr
ings.size()) { |
136 String urlString; | 136 String urlString; |
137 if (DictionaryHelper::get(iceServer, "urls", urlString)) { | 137 if (DictionaryHelper::get(iceServer, "urls", urlString)) { |
138 urlStrings.append(urlString); | 138 urlStrings.append(urlString); |
139 } else { | 139 } else { |
140 exceptionState.throwTypeError("Malformed RTCIceServer"); | 140 exceptionState.throwTypeError("Malformed RTCIceServer"); |
141 return 0; | 141 return 0; |
(...skipping 29 matching lines...) Expand all Loading... |
171 | 171 |
172 return rtcConfiguration; | 172 return rtcConfiguration; |
173 } | 173 } |
174 | 174 |
175 RTCOfferOptions* RTCPeerConnection::parseOfferOptions(const Dictionary& options,
ExceptionState& exceptionState) | 175 RTCOfferOptions* RTCPeerConnection::parseOfferOptions(const Dictionary& options,
ExceptionState& exceptionState) |
176 { | 176 { |
177 if (options.isUndefinedOrNull()) | 177 if (options.isUndefinedOrNull()) |
178 return 0; | 178 return 0; |
179 | 179 |
180 Vector<String> propertyNames; | 180 Vector<String> propertyNames; |
181 options.getOwnPropertyNames(propertyNames); | 181 options.getPropertyNames(propertyNames); |
182 | 182 |
183 // Treat |options| as MediaConstraints if it is empty or has "optional" or "
mandatory" properties for compatibility. | 183 // Treat |options| as MediaConstraints if it is empty or has "optional" or "
mandatory" properties for compatibility. |
184 // TODO(jiayl): remove constraints when RTCOfferOptions reaches Stable and c
lient code is ready. | 184 // TODO(jiayl): remove constraints when RTCOfferOptions reaches Stable and c
lient code is ready. |
185 if (propertyNames.isEmpty() || propertyNames.contains("optional") || propert
yNames.contains("mandatory")) | 185 if (propertyNames.isEmpty() || propertyNames.contains("optional") || propert
yNames.contains("mandatory")) |
186 return 0; | 186 return 0; |
187 | 187 |
188 int32_t offerToReceiveVideo = -1; | 188 int32_t offerToReceiveVideo = -1; |
189 int32_t offerToReceiveAudio = -1; | 189 int32_t offerToReceiveAudio = -1; |
190 bool voiceActivityDetection = true; | 190 bool voiceActivityDetection = true; |
191 bool iceRestart = false; | 191 bool iceRestart = false; |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 visitor->trace(m_localStreams); | 805 visitor->trace(m_localStreams); |
806 visitor->trace(m_remoteStreams); | 806 visitor->trace(m_remoteStreams); |
807 visitor->trace(m_dataChannels); | 807 visitor->trace(m_dataChannels); |
808 #if ENABLE(OILPAN) | 808 #if ENABLE(OILPAN) |
809 visitor->trace(m_scheduledEvents); | 809 visitor->trace(m_scheduledEvents); |
810 #endif | 810 #endif |
811 EventTargetWithInlineData::trace(visitor); | 811 EventTargetWithInlineData::trace(visitor); |
812 } | 812 } |
813 | 813 |
814 } // namespace blink | 814 } // namespace blink |
OLD | NEW |