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

Unified Diff: tools/dom/templates/html/dart2js/impl_RTCIceCandidate.darttemplate

Issue 16023011: Make RTC work on Firefox (mostly). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/rtc_test.dart ('k') | tools/dom/templates/html/dart2js/impl_RTCSessionDescription.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/dart2js/impl_RTCIceCandidate.darttemplate
diff --git a/tools/dom/templates/html/dart2js/impl_RTCIceCandidate.darttemplate b/tools/dom/templates/html/dart2js/impl_RTCIceCandidate.darttemplate
index ce3ebd7b2a99febc428232dc2dd4ad202d1f6783..6090f900702b66235e70ecfa0eca6c84807c4798 100644
--- a/tools/dom/templates/html/dart2js/impl_RTCIceCandidate.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_RTCIceCandidate.darttemplate
@@ -6,7 +6,13 @@ part of $LIBRARYNAME;
$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME(Map dictionary) {
- return JS('RtcIceCandidate', 'new RTCIceCandidate(#)',
+ // TODO(efortuna): Remove this check if when you can actually construct with
+ // the unprefixed RTCIceCandidate in Firefox (currently both are defined,
+ // but one can't be used as a constructor).
+ var constructorName = JS('', 'window[#]',
+ Device.isFirefox ? '${Device.propertyPrefix}RTCIceCandidate' :
+ 'RTCIceCandidate');
+ return JS('RtcIceCandidate', 'new #(#)', constructorName,
convertDartToNative_SerializedScriptValue(dictionary));
}
$!MEMBERS
« no previous file with comments | « tests/html/rtc_test.dart ('k') | tools/dom/templates/html/dart2js/impl_RTCSessionDescription.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698