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

Side by Side Diff: client/html/generated/html/dartium/XMLHttpRequest.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, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1
2 class _XMLHttpRequestImpl extends _EventTargetImpl implements XMLHttpRequest {
3 _XMLHttpRequestImpl._wrap(ptr) : super._wrap(ptr);
4
5 bool get asBlob() => _wrap(_ptr.asBlob);
6
7 void set asBlob(bool value) { _ptr.asBlob = _unwrap(value); }
8
9 int get readyState() => _wrap(_ptr.readyState);
10
11 Object get response() => _wrap(_ptr.response);
12
13 Blob get responseBlob() => _wrap(_ptr.responseBlob);
14
15 String get responseText() => _wrap(_ptr.responseText);
16
17 String get responseType() => _wrap(_ptr.responseType);
18
19 void set responseType(String value) { _ptr.responseType = _unwrap(value); }
20
21 Document get responseXML() => _FixHtmlDocumentReference(_wrap(_ptr.responseXML ));
22
23 int get status() => _wrap(_ptr.status);
24
25 String get statusText() => _wrap(_ptr.statusText);
26
27 XMLHttpRequestUpload get upload() => _wrap(_ptr.upload);
28
29 bool get withCredentials() => _wrap(_ptr.withCredentials);
30
31 void set withCredentials(bool value) { _ptr.withCredentials = _unwrap(value); }
32
33 _XMLHttpRequestEventsImpl get on() {
34 if (_on == null) _on = new _XMLHttpRequestEventsImpl(this);
35 return _on;
36 }
37
38 void abort() {
39 _ptr.abort();
40 return;
41 }
42
43 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) {
44 if (useCapture === null) {
45 _ptr.addEventListener(_unwrap(type), _unwrap(listener));
46 return;
47 } else {
48 _ptr.addEventListener(_unwrap(type), _unwrap(listener), _unwrap(useCapture ));
49 return;
50 }
51 }
52
53 bool _dispatchEvent(Event evt) {
54 return _wrap(_ptr.dispatchEvent(_unwrap(evt)));
55 }
56
57 String getAllResponseHeaders() {
58 return _wrap(_ptr.getAllResponseHeaders());
59 }
60
61 String getResponseHeader(String header) {
62 return _wrap(_ptr.getResponseHeader(_unwrap(header)));
63 }
64
65 void open(String method, String url, [bool async = null, String user = null, S tring password = null]) {
66 if (async === null) {
67 if (user === null) {
68 if (password === null) {
69 _ptr.open(_unwrap(method), _unwrap(url));
70 return;
71 }
72 }
73 } else {
74 if (user === null) {
75 if (password === null) {
76 _ptr.open(_unwrap(method), _unwrap(url), _unwrap(async));
77 return;
78 }
79 } else {
80 if (password === null) {
81 _ptr.open(_unwrap(method), _unwrap(url), _unwrap(async), _unwrap(user) );
82 return;
83 } else {
84 _ptr.open(_unwrap(method), _unwrap(url), _unwrap(async), _unwrap(user) , _unwrap(password));
85 return;
86 }
87 }
88 }
89 throw "Incorrect number or type of arguments";
90 }
91
92 void overrideMimeType(String override) {
93 _ptr.overrideMimeType(_unwrap(override));
94 return;
95 }
96
97 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) {
98 if (useCapture === null) {
99 _ptr.removeEventListener(_unwrap(type), _unwrap(listener));
100 return;
101 } else {
102 _ptr.removeEventListener(_unwrap(type), _unwrap(listener), _unwrap(useCapt ure));
103 return;
104 }
105 }
106
107 void send([var data = null]) {
108 if (data === null) {
109 _ptr.send();
110 return;
111 } else {
112 if (data is ArrayBuffer) {
113 _ptr.send(_unwrap(data));
114 return;
115 } else {
116 if (data is Blob) {
117 _ptr.send(_unwrap(data));
118 return;
119 } else {
120 if (data is Document) {
121 _ptr.send(_unwrap(data));
122 return;
123 } else {
124 if (data is String) {
125 _ptr.send(_unwrap(data));
126 return;
127 } else {
128 if (data is DOMFormData) {
129 _ptr.send(_unwrap(data));
130 return;
131 }
132 }
133 }
134 }
135 }
136 }
137 throw "Incorrect number or type of arguments";
138 }
139
140 void setRequestHeader(String header, String value) {
141 _ptr.setRequestHeader(_unwrap(header), _unwrap(value));
142 return;
143 }
144 }
145
146 class _XMLHttpRequestEventsImpl extends _EventsImpl implements XMLHttpRequestEve nts {
147 _XMLHttpRequestEventsImpl(_ptr) : super(_ptr);
148
149 EventListenerList get abort() => _get('abort');
150
151 EventListenerList get error() => _get('error');
152
153 EventListenerList get load() => _get('load');
154
155 EventListenerList get loadEnd() => _get('loadend');
156
157 EventListenerList get loadStart() => _get('loadstart');
158
159 EventListenerList get progress() => _get('progress');
160
161 EventListenerList get readyStateChange() => _get('readystatechange');
162 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698