| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
| 6 | 6 |
| 7 class _WebSocketWrappingImplementation extends DOMWrapperBase implements WebSock
et { | 7 class _WebSocketWrappingImplementation extends DOMWrapperBase implements WebSock
et { |
| 8 _WebSocketWrappingImplementation() : super() {} | 8 _WebSocketWrappingImplementation() : super() {} |
| 9 | 9 |
| 10 static create__WebSocketWrappingImplementation() native { | 10 static create__WebSocketWrappingImplementation() native { |
| 11 return new _WebSocketWrappingImplementation(); | 11 return new _WebSocketWrappingImplementation(); |
| 12 } | 12 } |
| 13 | 13 |
| 14 String get URL() { return _get__WebSocket_URL(this); } | 14 String get URL() { return _get_URL(this); } |
| 15 static String _get__WebSocket_URL(var _this) native; | 15 static String _get_URL(var _this) native; |
| 16 | 16 |
| 17 String get binaryType() { return _get__WebSocket_binaryType(this); } | 17 String get binaryType() { return _get_binaryType(this); } |
| 18 static String _get__WebSocket_binaryType(var _this) native; | 18 static String _get_binaryType(var _this) native; |
| 19 | 19 |
| 20 void set binaryType(String value) { _set__WebSocket_binaryType(this, value); } | 20 void set binaryType(String value) { _set_binaryType(this, value); } |
| 21 static void _set__WebSocket_binaryType(var _this, String value) native; | 21 static void _set_binaryType(var _this, String value) native; |
| 22 | 22 |
| 23 int get bufferedAmount() { return _get__WebSocket_bufferedAmount(this); } | 23 int get bufferedAmount() { return _get_bufferedAmount(this); } |
| 24 static int _get__WebSocket_bufferedAmount(var _this) native; | 24 static int _get_bufferedAmount(var _this) native; |
| 25 | 25 |
| 26 String get extensions() { return _get__WebSocket_extensions(this); } | 26 String get extensions() { return _get_extensions(this); } |
| 27 static String _get__WebSocket_extensions(var _this) native; | 27 static String _get_extensions(var _this) native; |
| 28 | 28 |
| 29 EventListener get onclose() { return _get__WebSocket_onclose(this); } | 29 EventListener get onclose() { return _get_onclose(this); } |
| 30 static EventListener _get__WebSocket_onclose(var _this) native; | 30 static EventListener _get_onclose(var _this) native; |
| 31 | 31 |
| 32 void set onclose(EventListener value) { _set__WebSocket_onclose(this, value);
} | 32 void set onclose(EventListener value) { _set_onclose(this, value); } |
| 33 static void _set__WebSocket_onclose(var _this, EventListener value) native; | 33 static void _set_onclose(var _this, EventListener value) native; |
| 34 | 34 |
| 35 EventListener get onerror() { return _get__WebSocket_onerror(this); } | 35 EventListener get onerror() { return _get_onerror(this); } |
| 36 static EventListener _get__WebSocket_onerror(var _this) native; | 36 static EventListener _get_onerror(var _this) native; |
| 37 | 37 |
| 38 void set onerror(EventListener value) { _set__WebSocket_onerror(this, value);
} | 38 void set onerror(EventListener value) { _set_onerror(this, value); } |
| 39 static void _set__WebSocket_onerror(var _this, EventListener value) native; | 39 static void _set_onerror(var _this, EventListener value) native; |
| 40 | 40 |
| 41 EventListener get onmessage() { return _get__WebSocket_onmessage(this); } | 41 EventListener get onmessage() { return _get_onmessage(this); } |
| 42 static EventListener _get__WebSocket_onmessage(var _this) native; | 42 static EventListener _get_onmessage(var _this) native; |
| 43 | 43 |
| 44 void set onmessage(EventListener value) { _set__WebSocket_onmessage(this, valu
e); } | 44 void set onmessage(EventListener value) { _set_onmessage(this, value); } |
| 45 static void _set__WebSocket_onmessage(var _this, EventListener value) native; | 45 static void _set_onmessage(var _this, EventListener value) native; |
| 46 | 46 |
| 47 EventListener get onopen() { return _get__WebSocket_onopen(this); } | 47 EventListener get onopen() { return _get_onopen(this); } |
| 48 static EventListener _get__WebSocket_onopen(var _this) native; | 48 static EventListener _get_onopen(var _this) native; |
| 49 | 49 |
| 50 void set onopen(EventListener value) { _set__WebSocket_onopen(this, value); } | 50 void set onopen(EventListener value) { _set_onopen(this, value); } |
| 51 static void _set__WebSocket_onopen(var _this, EventListener value) native; | 51 static void _set_onopen(var _this, EventListener value) native; |
| 52 | 52 |
| 53 String get protocol() { return _get__WebSocket_protocol(this); } | 53 String get protocol() { return _get_protocol(this); } |
| 54 static String _get__WebSocket_protocol(var _this) native; | 54 static String _get_protocol(var _this) native; |
| 55 | 55 |
| 56 int get readyState() { return _get__WebSocket_readyState(this); } | 56 int get readyState() { return _get_readyState(this); } |
| 57 static int _get__WebSocket_readyState(var _this) native; | 57 static int _get_readyState(var _this) native; |
| 58 | 58 |
| 59 void addEventListener(String type, EventListener listener, [bool useCapture =
null]) { | 59 void addEventListener(String type, EventListener listener, [bool useCapture =
null]) { |
| 60 if (useCapture === null) { | 60 if (useCapture === null) { |
| 61 _addEventListener(this, type, listener); | 61 _addEventListener_WebSocket(this, type, listener); |
| 62 return; | 62 return; |
| 63 } else { | 63 } else { |
| 64 _addEventListener_2(this, type, listener, useCapture); | 64 _addEventListener_WebSocket_2(this, type, listener, useCapture); |
| 65 return; | 65 return; |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 static void _addEventListener(receiver, type, listener) native; | 68 static void _addEventListener_WebSocket(receiver, type, listener) native; |
| 69 static void _addEventListener_2(receiver, type, listener, useCapture) native; | 69 static void _addEventListener_WebSocket_2(receiver, type, listener, useCapture
) native; |
| 70 | 70 |
| 71 void close([int code = null, String reason = null]) { | 71 void close([int code = null, String reason = null]) { |
| 72 if (code === null) { | 72 if (code === null) { |
| 73 if (reason === null) { | 73 if (reason === null) { |
| 74 _close(this); | 74 _close(this); |
| 75 return; | 75 return; |
| 76 } | 76 } |
| 77 } else { | 77 } else { |
| 78 if (reason === null) { | 78 if (reason === null) { |
| 79 _close_2(this, code); | 79 _close_2(this, code); |
| 80 return; | 80 return; |
| 81 } else { | 81 } else { |
| 82 _close_3(this, code, reason); | 82 _close_3(this, code, reason); |
| 83 return; | 83 return; |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 throw "Incorrect number or type of arguments"; | 86 throw "Incorrect number or type of arguments"; |
| 87 } | 87 } |
| 88 static void _close(receiver) native; | 88 static void _close(receiver) native; |
| 89 static void _close_2(receiver, code) native; | 89 static void _close_2(receiver, code) native; |
| 90 static void _close_3(receiver, code, reason) native; | 90 static void _close_3(receiver, code, reason) native; |
| 91 | 91 |
| 92 bool dispatchEvent(Event evt) { | 92 bool dispatchEvent(Event evt) { |
| 93 return _dispatchEvent(this, evt); | 93 return _dispatchEvent_WebSocket(this, evt); |
| 94 } | 94 } |
| 95 static bool _dispatchEvent(receiver, evt) native; | 95 static bool _dispatchEvent_WebSocket(receiver, evt) native; |
| 96 | 96 |
| 97 void removeEventListener(String type, EventListener listener, [bool useCapture
= null]) { | 97 void removeEventListener(String type, EventListener listener, [bool useCapture
= null]) { |
| 98 if (useCapture === null) { | 98 if (useCapture === null) { |
| 99 _removeEventListener(this, type, listener); | 99 _removeEventListener_WebSocket(this, type, listener); |
| 100 return; | 100 return; |
| 101 } else { | 101 } else { |
| 102 _removeEventListener_2(this, type, listener, useCapture); | 102 _removeEventListener_WebSocket_2(this, type, listener, useCapture); |
| 103 return; | 103 return; |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 static void _removeEventListener(receiver, type, listener) native; | 106 static void _removeEventListener_WebSocket(receiver, type, listener) native; |
| 107 static void _removeEventListener_2(receiver, type, listener, useCapture) nativ
e; | 107 static void _removeEventListener_WebSocket_2(receiver, type, listener, useCapt
ure) native; |
| 108 | 108 |
| 109 bool send(String data) { | 109 bool send(String data) { |
| 110 return _send(this, data); | 110 return _send(this, data); |
| 111 } | 111 } |
| 112 static bool _send(receiver, data) native; | 112 static bool _send(receiver, data) native; |
| 113 | 113 |
| 114 String get typeName() { return "WebSocket"; } | 114 String get typeName() { return "WebSocket"; } |
| 115 } | 115 } |
| OLD | NEW |