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

Side by Side Diff: client/html/generated/html/dartium/Window.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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
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.
4
5 class _WindowImpl extends _EventTargetImpl implements Window {
6
7 _DocumentImpl get document() => _wrap(_ptr.document.documentElement);
8
9 void requestLayoutFrame(TimeoutHandler callback) {
10 _addMeasurementFrameCallback(callback);
11 }
12
13 _WindowImpl._wrap(ptr) : super._wrap(ptr);
14
15 DOMApplicationCache get applicationCache() => _wrap(_ptr.applicationCache);
16
17 Navigator get clientInformation() => _wrap(_ptr.clientInformation);
18
19 bool get closed() => _wrap(_ptr.closed);
20
21 Console get console() => _wrap(_ptr.console);
22
23 Crypto get crypto() => _wrap(_ptr.crypto);
24
25 String get defaultStatus() => _wrap(_ptr.defaultStatus);
26
27 void set defaultStatus(String value) { _ptr.defaultStatus = _unwrap(value); }
28
29 String get defaultstatus() => _wrap(_ptr.defaultstatus);
30
31 void set defaultstatus(String value) { _ptr.defaultstatus = _unwrap(value); }
32
33 num get devicePixelRatio() => _wrap(_ptr.devicePixelRatio);
34
35 Event get event() => _wrap(_ptr.event);
36
37 Element get frameElement() => _wrap(_ptr.frameElement);
38
39 Window get frames() => _wrap(_ptr.frames);
40
41 History get history() => _wrap(_ptr.history);
42
43 int get innerHeight() => _wrap(_ptr.innerHeight);
44
45 int get innerWidth() => _wrap(_ptr.innerWidth);
46
47 int get length() => _wrap(_ptr.length);
48
49 Storage get localStorage() => _wrap(_ptr.localStorage);
50
51 Location get location() => _wrap(_ptr.location);
52
53 void set location(Location value) { _ptr.location = _unwrap(value); }
54
55 BarInfo get locationbar() => _wrap(_ptr.locationbar);
56
57 BarInfo get menubar() => _wrap(_ptr.menubar);
58
59 String get name() => _wrap(_ptr.name);
60
61 void set name(String value) { _ptr.name = _unwrap(value); }
62
63 Navigator get navigator() => _wrap(_ptr.navigator);
64
65 bool get offscreenBuffering() => _wrap(_ptr.offscreenBuffering);
66
67 Window get opener() => _wrap(_ptr.opener);
68
69 int get outerHeight() => _wrap(_ptr.outerHeight);
70
71 int get outerWidth() => _wrap(_ptr.outerWidth);
72
73 int get pageXOffset() => _wrap(_ptr.pageXOffset);
74
75 int get pageYOffset() => _wrap(_ptr.pageYOffset);
76
77 Window get parent() => _wrap(_ptr.parent);
78
79 Performance get performance() => _wrap(_ptr.performance);
80
81 BarInfo get personalbar() => _wrap(_ptr.personalbar);
82
83 Screen get screen() => _wrap(_ptr.screen);
84
85 int get screenLeft() => _wrap(_ptr.screenLeft);
86
87 int get screenTop() => _wrap(_ptr.screenTop);
88
89 int get screenX() => _wrap(_ptr.screenX);
90
91 int get screenY() => _wrap(_ptr.screenY);
92
93 int get scrollX() => _wrap(_ptr.scrollX);
94
95 int get scrollY() => _wrap(_ptr.scrollY);
96
97 BarInfo get scrollbars() => _wrap(_ptr.scrollbars);
98
99 Window get self() => _wrap(_ptr.self);
100
101 Storage get sessionStorage() => _wrap(_ptr.sessionStorage);
102
103 String get status() => _wrap(_ptr.status);
104
105 void set status(String value) { _ptr.status = _unwrap(value); }
106
107 BarInfo get statusbar() => _wrap(_ptr.statusbar);
108
109 StyleMedia get styleMedia() => _wrap(_ptr.styleMedia);
110
111 BarInfo get toolbar() => _wrap(_ptr.toolbar);
112
113 Window get top() => _wrap(_ptr.top);
114
115 IDBFactory get webkitIndexedDB() => _wrap(_ptr.webkitIndexedDB);
116
117 NotificationCenter get webkitNotifications() => _wrap(_ptr.webkitNotifications );
118
119 StorageInfo get webkitStorageInfo() => _wrap(_ptr.webkitStorageInfo);
120
121 Window get window() => _wrap(_ptr.window);
122
123 _WindowEventsImpl get on() {
124 if (_on == null) _on = new _WindowEventsImpl(this);
125 return _on;
126 }
127
128 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) {
129 if (useCapture === null) {
130 _ptr.addEventListener(_unwrap(type), _unwrap(listener));
131 return;
132 } else {
133 _ptr.addEventListener(_unwrap(type), _unwrap(listener), _unwrap(useCapture ));
134 return;
135 }
136 }
137
138 void alert(String message) {
139 _ptr.alert(_unwrap(message));
140 return;
141 }
142
143 String atob(String string) {
144 return _wrap(_ptr.atob(_unwrap(string)));
145 }
146
147 void blur() {
148 _ptr.blur();
149 return;
150 }
151
152 String btoa(String string) {
153 return _wrap(_ptr.btoa(_unwrap(string)));
154 }
155
156 void captureEvents() {
157 _ptr.captureEvents();
158 return;
159 }
160
161 void clearInterval(int handle) {
162 _ptr.clearInterval(_unwrap(handle));
163 return;
164 }
165
166 void clearTimeout(int handle) {
167 _ptr.clearTimeout(_unwrap(handle));
168 return;
169 }
170
171 void close() {
172 _ptr.close();
173 return;
174 }
175
176 bool confirm(String message) {
177 return _wrap(_ptr.confirm(_unwrap(message)));
178 }
179
180 bool _dispatchEvent(Event evt) {
181 return _wrap(_ptr.dispatchEvent(_unwrap(evt)));
182 }
183
184 bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool w holeWord, bool searchInFrames, bool showDialog) {
185 return _wrap(_ptr.find(_unwrap(string), _unwrap(caseSensitive), _unwrap(back wards), _unwrap(wrap), _unwrap(wholeWord), _unwrap(searchInFrames), _unwrap(show Dialog)));
186 }
187
188 void focus() {
189 _ptr.focus();
190 return;
191 }
192
193 CSSStyleDeclaration _getComputedStyle(Element element, String pseudoElement) {
194 return _wrap(_ptr.getComputedStyle(_unwrap(element), _unwrap(pseudoElement)) );
195 }
196
197 CSSRuleList getMatchedCSSRules(Element element, String pseudoElement) {
198 return _wrap(_ptr.getMatchedCSSRules(_unwrap(element), _unwrap(pseudoElement )));
199 }
200
201 DOMSelection getSelection() {
202 return _wrap(_ptr.getSelection());
203 }
204
205 MediaQueryList matchMedia(String query) {
206 return _wrap(_ptr.matchMedia(_unwrap(query)));
207 }
208
209 void moveBy(num x, num y) {
210 _ptr.moveBy(_unwrap(x), _unwrap(y));
211 return;
212 }
213
214 void moveTo(num x, num y) {
215 _ptr.moveTo(_unwrap(x), _unwrap(y));
216 return;
217 }
218
219 Window open(String url, String name, [String options = null]) {
220 if (options === null) {
221 return _wrap(_ptr.open(_unwrap(url), _unwrap(name)));
222 } else {
223 return _wrap(_ptr.open(_unwrap(url), _unwrap(name), _unwrap(options)));
224 }
225 }
226
227 Database openDatabase(String name, String version, String displayName, int est imatedSize, [DatabaseCallback creationCallback = null]) {
228 if (creationCallback === null) {
229 return _wrap(_ptr.openDatabase(_unwrap(name), _unwrap(version), _unwrap(di splayName), _unwrap(estimatedSize)));
230 } else {
231 return _wrap(_ptr.openDatabase(_unwrap(name), _unwrap(version), _unwrap(di splayName), _unwrap(estimatedSize), _unwrap(creationCallback)));
232 }
233 }
234
235 void postMessage(Dynamic message, String targetOrigin, [List messagePorts = nu ll]) {
236 if (messagePorts === null) {
237 _ptr.postMessage(_unwrap(message), _unwrap(targetOrigin));
238 return;
239 } else {
240 _ptr.postMessage(_unwrap(message), _unwrap(targetOrigin), _unwrap(messageP orts));
241 return;
242 }
243 }
244
245 void print() {
246 _ptr.print();
247 return;
248 }
249
250 String prompt(String message, String defaultValue) {
251 return _wrap(_ptr.prompt(_unwrap(message), _unwrap(defaultValue)));
252 }
253
254 void releaseEvents() {
255 _ptr.releaseEvents();
256 return;
257 }
258
259 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) {
260 if (useCapture === null) {
261 _ptr.removeEventListener(_unwrap(type), _unwrap(listener));
262 return;
263 } else {
264 _ptr.removeEventListener(_unwrap(type), _unwrap(listener), _unwrap(useCapt ure));
265 return;
266 }
267 }
268
269 void resizeBy(num x, num y) {
270 _ptr.resizeBy(_unwrap(x), _unwrap(y));
271 return;
272 }
273
274 void resizeTo(num width, num height) {
275 _ptr.resizeTo(_unwrap(width), _unwrap(height));
276 return;
277 }
278
279 void scroll(int x, int y) {
280 _ptr.scroll(_unwrap(x), _unwrap(y));
281 return;
282 }
283
284 void scrollBy(int x, int y) {
285 _ptr.scrollBy(_unwrap(x), _unwrap(y));
286 return;
287 }
288
289 void scrollTo(int x, int y) {
290 _ptr.scrollTo(_unwrap(x), _unwrap(y));
291 return;
292 }
293
294 int setInterval(TimeoutHandler handler, int timeout) {
295 return _wrap(_ptr.setInterval(_unwrap(handler), _unwrap(timeout)));
296 }
297
298 int setTimeout(TimeoutHandler handler, int timeout) {
299 return _wrap(_ptr.setTimeout(_unwrap(handler), _unwrap(timeout)));
300 }
301
302 Object showModalDialog(String url, [Object dialogArgs = null, String featureAr gs = null]) {
303 if (dialogArgs === null) {
304 if (featureArgs === null) {
305 return _wrap(_ptr.showModalDialog(_unwrap(url)));
306 }
307 } else {
308 if (featureArgs === null) {
309 return _wrap(_ptr.showModalDialog(_unwrap(url), _unwrap(dialogArgs)));
310 } else {
311 return _wrap(_ptr.showModalDialog(_unwrap(url), _unwrap(dialogArgs), _un wrap(featureArgs)));
312 }
313 }
314 throw "Incorrect number or type of arguments";
315 }
316
317 void stop() {
318 _ptr.stop();
319 return;
320 }
321
322 void webkitCancelAnimationFrame(int id) {
323 _ptr.webkitCancelAnimationFrame(_unwrap(id));
324 return;
325 }
326
327 void webkitCancelRequestAnimationFrame(int id) {
328 _ptr.webkitCancelRequestAnimationFrame(_unwrap(id));
329 return;
330 }
331
332 Point webkitConvertPointFromNodeToPage(Node node, Point p) {
333 return _wrap(_ptr.webkitConvertPointFromNodeToPage(_unwrap(node), _unwrap(p) ));
334 }
335
336 Point webkitConvertPointFromPageToNode(Node node, Point p) {
337 return _wrap(_ptr.webkitConvertPointFromPageToNode(_unwrap(node), _unwrap(p) ));
338 }
339
340 void webkitPostMessage(Dynamic message, String targetOrigin, [List transferLis t = null]) {
341 if (transferList === null) {
342 _ptr.webkitPostMessage(_unwrap(message), _unwrap(targetOrigin));
343 return;
344 } else {
345 _ptr.webkitPostMessage(_unwrap(message), _unwrap(targetOrigin), _unwrap(tr ansferList));
346 return;
347 }
348 }
349
350 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, Elemen t element) {
351 return _wrap(_ptr.webkitRequestAnimationFrame(_unwrap(callback), _unwrap(ele ment)));
352 }
353
354 void webkitRequestFileSystem(int type, int size, FileSystemCallback successCal lback, [ErrorCallback errorCallback = null]) {
355 if (errorCallback === null) {
356 _ptr.webkitRequestFileSystem(_unwrap(type), _unwrap(size), _unwrap(success Callback));
357 return;
358 } else {
359 _ptr.webkitRequestFileSystem(_unwrap(type), _unwrap(size), _unwrap(success Callback), _unwrap(errorCallback));
360 return;
361 }
362 }
363
364 void webkitResolveLocalFileSystemURL(String url, [EntryCallback successCallbac k = null, ErrorCallback errorCallback = null]) {
365 if (successCallback === null) {
366 if (errorCallback === null) {
367 _ptr.webkitResolveLocalFileSystemURL(_unwrap(url));
368 return;
369 }
370 } else {
371 if (errorCallback === null) {
372 _ptr.webkitResolveLocalFileSystemURL(_unwrap(url), _unwrap(successCallba ck));
373 return;
374 } else {
375 _ptr.webkitResolveLocalFileSystemURL(_unwrap(url), _unwrap(successCallba ck), _unwrap(errorCallback));
376 return;
377 }
378 }
379 throw "Incorrect number or type of arguments";
380 }
381
382 }
383
384 class _WindowEventsImpl extends _EventsImpl implements WindowEvents {
385 _WindowEventsImpl(_ptr) : super(_ptr);
386
387 EventListenerList get abort() => _get('abort');
388
389 EventListenerList get animationEnd() => _get('webkitAnimationEnd');
390
391 EventListenerList get animationIteration() => _get('webkitAnimationIteration') ;
392
393 EventListenerList get animationStart() => _get('webkitAnimationStart');
394
395 EventListenerList get beforeUnload() => _get('beforeunload');
396
397 EventListenerList get blur() => _get('blur');
398
399 EventListenerList get canPlay() => _get('canplay');
400
401 EventListenerList get canPlayThrough() => _get('canplaythrough');
402
403 EventListenerList get change() => _get('change');
404
405 EventListenerList get click() => _get('click');
406
407 EventListenerList get contentLoaded() => _get('DOMContentLoaded');
408
409 EventListenerList get contextMenu() => _get('contextmenu');
410
411 EventListenerList get deviceMotion() => _get('devicemotion');
412
413 EventListenerList get deviceOrientation() => _get('deviceorientation');
414
415 EventListenerList get doubleClick() => _get('dblclick');
416
417 EventListenerList get drag() => _get('drag');
418
419 EventListenerList get dragEnd() => _get('dragend');
420
421 EventListenerList get dragEnter() => _get('dragenter');
422
423 EventListenerList get dragLeave() => _get('dragleave');
424
425 EventListenerList get dragOver() => _get('dragover');
426
427 EventListenerList get dragStart() => _get('dragstart');
428
429 EventListenerList get drop() => _get('drop');
430
431 EventListenerList get durationChange() => _get('durationchange');
432
433 EventListenerList get emptied() => _get('emptied');
434
435 EventListenerList get ended() => _get('ended');
436
437 EventListenerList get error() => _get('error');
438
439 EventListenerList get focus() => _get('focus');
440
441 EventListenerList get hashChange() => _get('hashchange');
442
443 EventListenerList get input() => _get('input');
444
445 EventListenerList get invalid() => _get('invalid');
446
447 EventListenerList get keyDown() => _get('keydown');
448
449 EventListenerList get keyPress() => _get('keypress');
450
451 EventListenerList get keyUp() => _get('keyup');
452
453 EventListenerList get load() => _get('load');
454
455 EventListenerList get loadStart() => _get('loadstart');
456
457 EventListenerList get loadedData() => _get('loadeddata');
458
459 EventListenerList get loadedMetadata() => _get('loadedmetadata');
460
461 EventListenerList get message() => _get('message');
462
463 EventListenerList get mouseDown() => _get('mousedown');
464
465 EventListenerList get mouseMove() => _get('mousemove');
466
467 EventListenerList get mouseOut() => _get('mouseout');
468
469 EventListenerList get mouseOver() => _get('mouseover');
470
471 EventListenerList get mouseUp() => _get('mouseup');
472
473 EventListenerList get mouseWheel() => _get('mousewheel');
474
475 EventListenerList get offline() => _get('offline');
476
477 EventListenerList get online() => _get('online');
478
479 EventListenerList get pageHide() => _get('pagehide');
480
481 EventListenerList get pageShow() => _get('pageshow');
482
483 EventListenerList get pause() => _get('pause');
484
485 EventListenerList get play() => _get('play');
486
487 EventListenerList get playing() => _get('playing');
488
489 EventListenerList get popState() => _get('popstate');
490
491 EventListenerList get progress() => _get('progress');
492
493 EventListenerList get rateChange() => _get('ratechange');
494
495 EventListenerList get reset() => _get('reset');
496
497 EventListenerList get resize() => _get('resize');
498
499 EventListenerList get scroll() => _get('scroll');
500
501 EventListenerList get search() => _get('search');
502
503 EventListenerList get seeked() => _get('seeked');
504
505 EventListenerList get seeking() => _get('seeking');
506
507 EventListenerList get select() => _get('select');
508
509 EventListenerList get stalled() => _get('stalled');
510
511 EventListenerList get storage() => _get('storage');
512
513 EventListenerList get submit() => _get('submit');
514
515 EventListenerList get suspend() => _get('suspend');
516
517 EventListenerList get timeUpdate() => _get('timeupdate');
518
519 EventListenerList get touchCancel() => _get('touchcancel');
520
521 EventListenerList get touchEnd() => _get('touchend');
522
523 EventListenerList get touchMove() => _get('touchmove');
524
525 EventListenerList get touchStart() => _get('touchstart');
526
527 EventListenerList get transitionEnd() => _get('webkitTransitionEnd');
528
529 EventListenerList get unload() => _get('unload');
530
531 EventListenerList get volumeChange() => _get('volumechange');
532
533 EventListenerList get waiting() => _get('waiting');
534 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698