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

Unified Diff: client/html/generated/html/dartium/WebSocket.dart

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: client/html/generated/html/dartium/WebSocket.dart
diff --git a/client/html/generated/html/dartium/WebSocket.dart b/client/html/generated/html/dartium/WebSocket.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7b7de0ce2ac1eca4ff266ccd36c47ed7be8b41a1
--- /dev/null
+++ b/client/html/generated/html/dartium/WebSocket.dart
@@ -0,0 +1,83 @@
+
+class _WebSocketImpl extends _EventTargetImpl implements WebSocket {
+ _WebSocketImpl._wrap(ptr) : super._wrap(ptr);
+
+ String get URL() => _wrap(_ptr.URL);
+
+ String get binaryType() => _wrap(_ptr.binaryType);
+
+ void set binaryType(String value) { _ptr.binaryType = _unwrap(value); }
+
+ int get bufferedAmount() => _wrap(_ptr.bufferedAmount);
+
+ String get extensions() => _wrap(_ptr.extensions);
+
+ String get protocol() => _wrap(_ptr.protocol);
+
+ int get readyState() => _wrap(_ptr.readyState);
+
+ String get url() => _wrap(_ptr.url);
+
+ _WebSocketEventsImpl get on() {
+ if (_on == null) _on = new _WebSocketEventsImpl(this);
+ return _on;
+ }
+
+ void _addEventListener(String type, EventListener listener, [bool useCapture = null]) {
+ if (useCapture === null) {
+ _ptr.addEventListener(_unwrap(type), _unwrap(listener));
+ return;
+ } else {
+ _ptr.addEventListener(_unwrap(type), _unwrap(listener), _unwrap(useCapture));
+ return;
+ }
+ }
+
+ void close([int code = null, String reason = null]) {
+ if (code === null) {
+ if (reason === null) {
+ _ptr.close();
+ return;
+ }
+ } else {
+ if (reason === null) {
+ _ptr.close(_unwrap(code));
+ return;
+ } else {
+ _ptr.close(_unwrap(code), _unwrap(reason));
+ return;
+ }
+ }
+ throw "Incorrect number or type of arguments";
+ }
+
+ bool _dispatchEvent(Event evt) {
+ return _wrap(_ptr.dispatchEvent(_unwrap(evt)));
+ }
+
+ void _removeEventListener(String type, EventListener listener, [bool useCapture = null]) {
+ if (useCapture === null) {
+ _ptr.removeEventListener(_unwrap(type), _unwrap(listener));
+ return;
+ } else {
+ _ptr.removeEventListener(_unwrap(type), _unwrap(listener), _unwrap(useCapture));
+ return;
+ }
+ }
+
+ bool send(String data) {
+ return _wrap(_ptr.send(_unwrap(data)));
+ }
+}
+
+class _WebSocketEventsImpl extends _EventsImpl implements WebSocketEvents {
+ _WebSocketEventsImpl(_ptr) : super(_ptr);
+
+ EventListenerList get close() => _get('close');
+
+ EventListenerList get error() => _get('error');
+
+ EventListenerList get message() => _get('message');
+
+ EventListenerList get open() => _get('open');
+}

Powered by Google App Engine
This is Rietveld 408576698