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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 18577002: Reapply expanding overloaded functions into separate functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index f62de230676f5905898350902ad3f0c4aa803cc0..20a57082b43f1cbace3fb1c426058a4d68d834f9 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -1207,7 +1207,12 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
@DomName('CanvasRenderingContext2D.createPattern')
@DocsEditable()
- CanvasPattern createPattern(canvas_OR_image, String repetitionType) native;
+ CanvasPattern createPattern(CanvasElement canvas, String repetitionType) native;
+
+ @JSName('createPattern')
+ @DomName('CanvasRenderingContext2D.createPattern')
+ @DocsEditable()
+ CanvasPattern createPatternFromImage(ImageElement image, String repetitionType) native;
@DomName('CanvasRenderingContext2D.createRadialGradient')
@DocsEditable()
@@ -1961,7 +1966,12 @@ class Css extends Interceptor native "CSS" {
@DomName('CSS.supports')
@DocsEditable()
- bool supports(String conditionText_OR_property, [String value]) native;
+ bool supports(String property, String value) native;
+
+ @JSName('supports')
+ @DomName('CSS.supports')
+ @DocsEditable()
+ bool supportsCondition(String conditionText) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -6223,6 +6233,16 @@ class DataTransferItemList extends Interceptor native "DataTransferItemList" {
@DocsEditable()
void add(data_OR_file, [String type]) native;
+ @JSName('add')
+ @DomName('DataTransferItemList.add')
+ @DocsEditable()
+ void addData(String data, String type) native;
+
+ @JSName('add')
+ @DomName('DataTransferItemList.add')
+ @DocsEditable()
+ void addFile(File file) native;
+
@DomName('DataTransferItemList.clear')
@DocsEditable()
void clear() native;
@@ -6471,38 +6491,38 @@ class DirectoryEntry extends Entry native "DirectoryEntry" {
void __getDirectory(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
if (errorCallback != null) {
var options_1 = convertDartToNative_Dictionary(options);
- ___getDirectory_1(path, options_1, successCallback, errorCallback);
+ __getDirectory_1(path, options_1, successCallback, errorCallback);
return;
}
if (successCallback != null) {
var options_2 = convertDartToNative_Dictionary(options);
- ___getDirectory_2(path, options_2, successCallback);
+ __getDirectory_2(path, options_2, successCallback);
return;
}
if (options != null) {
var options_3 = convertDartToNative_Dictionary(options);
- ___getDirectory_3(path, options_3);
+ __getDirectory_3(path, options_3);
return;
}
- ___getDirectory_4(path);
+ __getDirectory_4(path);
return;
}
@JSName('getDirectory')
@DomName('DirectoryEntry.getDirectory')
@DocsEditable()
- void ___getDirectory_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
+ void __getDirectory_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
@JSName('getDirectory')
@DomName('DirectoryEntry.getDirectory')
@DocsEditable()
- void ___getDirectory_2(path, options, _EntryCallback successCallback) native;
+ void __getDirectory_2(path, options, _EntryCallback successCallback) native;
@JSName('getDirectory')
@DomName('DirectoryEntry.getDirectory')
@DocsEditable()
- void ___getDirectory_3(path, options) native;
+ void __getDirectory_3(path, options) native;
@JSName('getDirectory')
@DomName('DirectoryEntry.getDirectory')
@DocsEditable()
- void ___getDirectory_4(path) native;
+ void __getDirectory_4(path) native;
@JSName('getDirectory')
@DomName('DirectoryEntry.getDirectory')
@@ -6520,38 +6540,38 @@ class DirectoryEntry extends Entry native "DirectoryEntry" {
void __getFile(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
if (errorCallback != null) {
var options_1 = convertDartToNative_Dictionary(options);
- ___getFile_1(path, options_1, successCallback, errorCallback);
+ __getFile_1(path, options_1, successCallback, errorCallback);
return;
}
if (successCallback != null) {
var options_2 = convertDartToNative_Dictionary(options);
- ___getFile_2(path, options_2, successCallback);
+ __getFile_2(path, options_2, successCallback);
return;
}
if (options != null) {
var options_3 = convertDartToNative_Dictionary(options);
- ___getFile_3(path, options_3);
+ __getFile_3(path, options_3);
return;
}
- ___getFile_4(path);
+ __getFile_4(path);
return;
}
@JSName('getFile')
@DomName('DirectoryEntry.getFile')
@DocsEditable()
- void ___getFile_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
+ void __getFile_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
@JSName('getFile')
@DomName('DirectoryEntry.getFile')
@DocsEditable()
- void ___getFile_2(path, options, _EntryCallback successCallback) native;
+ void __getFile_2(path, options, _EntryCallback successCallback) native;
@JSName('getFile')
@DomName('DirectoryEntry.getFile')
@DocsEditable()
- void ___getFile_3(path, options) native;
+ void __getFile_3(path, options) native;
@JSName('getFile')
@DomName('DirectoryEntry.getFile')
@DocsEditable()
- void ___getFile_4(path) native;
+ void __getFile_4(path) native;
@JSName('getFile')
@DomName('DirectoryEntry.getFile')
@@ -16050,13 +16070,13 @@ class MutationObserver extends Interceptor native "MutationObserver,WebKitMutati
@DocsEditable()
void _observe(Node target, Map options) {
var options_1 = convertDartToNative_Dictionary(options);
- __observe_1(target, options_1);
+ _observe_1(target, options_1);
return;
}
@JSName('observe')
@DomName('MutationObserver.observe')
@DocsEditable()
- void __observe_1(Node target, options) native;
+ void _observe_1(Node target, options) native;
@DomName('MutationObserver.takeRecords')
@DocsEditable()
@@ -16290,7 +16310,7 @@ class Navigator extends Interceptor native "Navigator" {
* window.navigator.getUserMedia(audio: true, video: true).then((stream) {
* var video = new VideoElement()
* ..autoplay = true
- * ..src = Url.createObjectUrl(stream);
+ * ..src = Url.createObjectUrlFromStream(stream);
* document.body.append(video);
* });
*
@@ -18771,6 +18791,26 @@ class RtcDataChannel extends EventTarget native "RTCDataChannel,DataChannel" {
@DocsEditable()
void send(data) native;
+ @JSName('send')
+ @DomName('RTCDataChannel.send')
+ @DocsEditable()
+ void sendBlob(Blob data) native;
+
+ @JSName('send')
+ @DomName('RTCDataChannel.send')
+ @DocsEditable()
+ void sendByteBuffer(ByteBuffer data) native;
+
+ @JSName('send')
+ @DomName('RTCDataChannel.send')
+ @DocsEditable()
+ void sendString(String data) native;
+
+ @JSName('send')
+ @DomName('RTCDataChannel.send')
+ @DocsEditable()
+ void sendTypedData(TypedData data) native;
+
@DomName('RTCDataChannel.onclose')
@DocsEditable()
Stream<Event> get onClose => closeEvent.forTarget(this);
@@ -19076,20 +19116,20 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection,mozRTCPeer
void _createAnswer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) {
if (mediaConstraints != null) {
var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
- __createAnswer_1(successCallback, failureCallback, mediaConstraints_1);
+ _createAnswer_1(successCallback, failureCallback, mediaConstraints_1);
return;
}
- __createAnswer_2(successCallback, failureCallback);
+ _createAnswer_2(successCallback, failureCallback);
return;
}
@JSName('createAnswer')
@DomName('RTCPeerConnection.createAnswer')
@DocsEditable()
- void __createAnswer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
+ void _createAnswer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
@JSName('createAnswer')
@DomName('RTCPeerConnection.createAnswer')
@DocsEditable()
- void __createAnswer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
+ void _createAnswer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
@JSName('createDTMFSender')
@DomName('RTCPeerConnection.createDTMFSender')
@@ -19119,20 +19159,20 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection,mozRTCPeer
void _createOffer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) {
if (mediaConstraints != null) {
var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
- __createOffer_1(successCallback, failureCallback, mediaConstraints_1);
+ _createOffer_1(successCallback, failureCallback, mediaConstraints_1);
return;
}
- __createOffer_2(successCallback, failureCallback);
+ _createOffer_2(successCallback, failureCallback);
return;
}
@JSName('createOffer')
@DomName('RTCPeerConnection.createOffer')
@DocsEditable()
- void __createOffer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
+ void _createOffer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
@JSName('createOffer')
@DomName('RTCPeerConnection.createOffer')
@DocsEditable()
- void __createOffer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
+ void _createOffer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
@DomName('RTCPeerConnection.dispatchEvent')
@DocsEditable()
@@ -21794,7 +21834,7 @@ class TextAreaElement extends _HTMLElement native "HTMLTextAreaElement" {
@DocsEditable()
// http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-textarea/input-setrangetext
@Experimental()
- void setRangeText(String replacement, [int start, int end, String selectionMode]) native;
+ void setRangeText(String replacement, {int start, int end, String selectionMode}) native;
@DomName('HTMLTextAreaElement.setSelectionRange')
@DocsEditable()
@@ -22784,7 +22824,16 @@ class Url extends Interceptor native "URL" {
static String createObjectUrl(blob_OR_source_OR_stream) =>
JS('String',
'(self.URL || self.webkitURL).createObjectURL(#)',
- blob_OR_source_OR_stream);
+ blob_OR_source_OR_stream);
+
+ static String createObjectUrlFromSource(MediaSource source) =>
+ JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', source);
+
+ static String createObjectUrlFromStream(MediaStream stream) =>
+ JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', stream);
+
+ static String createObjectUrlFromBlob(Blob blob) =>
+ JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', blob);
static void revokeObjectUrl(String url) =>
JS('void',
@@ -23950,10 +23999,10 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
@Returns('Window|=Object')
WindowBase __getter__(index_OR_name) {
if ((index_OR_name is int || index_OR_name == null)) {
- return _convertNativeToDart_Window(___getter___1(index_OR_name));
+ return _convertNativeToDart_Window(__getter___1(index_OR_name));
}
if ((index_OR_name is String || index_OR_name == null)) {
- return _convertNativeToDart_Window(___getter___2(index_OR_name));
+ return _convertNativeToDart_Window(__getter___2(index_OR_name));
}
throw new ArgumentError("Incorrect number or type of arguments");
}
@@ -23962,13 +24011,13 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
@DocsEditable()
@Creates('Window|=Object')
@Returns('Window|=Object')
- ___getter___1(int index) native;
+ __getter___1(int index) native;
@JSName('__getter__')
@DomName('Window.__getter__')
@DocsEditable()
@Creates('Window|=Object')
@Returns('Window|=Object')
- ___getter___2(String name) native;
+ __getter___2(String name) native;
@JSName('addEventListener')
@DomName('Window.addEventListener')
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698