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

Side by Side Diff: lib/html/src/dart2js_DOMImplementation.dart

Issue 11235060: Get rid of Dynamic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « lib/html/src/Serialization.dart ('k') | lib/html/src/native_DOMImplementation.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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 // TODO(vsm): Unify with Dartium version. 5 // TODO(vsm): Unify with Dartium version.
6 class _DOMWindowCrossFrameImpl implements Window { 6 class _DOMWindowCrossFrameImpl implements Window {
7 // Private window. Note, this is a window in another frame, so it 7 // Private window. Note, this is a window in another frame, so it
8 // cannot be typed as "Window" as its prototype is not patched 8 // cannot be typed as "Window" as its prototype is not patched
9 // properly. Its fields and methods can only be accessed via JavaScript. 9 // properly. Its fields and methods can only be accessed via JavaScript.
10 var _window; 10 var _window;
(...skipping 14 matching lines...) Expand all
25 25
26 Window get top => _createSafe(JS('Window', '#.top', _window)); 26 Window get top => _createSafe(JS('Window', '#.top', _window));
27 27
28 // Methods. 28 // Methods.
29 void focus() => JS('void', '#.focus()', _window); 29 void focus() => JS('void', '#.focus()', _window);
30 30
31 void blur() => JS('void', '#.blur()', _window); 31 void blur() => JS('void', '#.blur()', _window);
32 32
33 void close() => JS('void', '#.close()', _window); 33 void close() => JS('void', '#.close()', _window);
34 34
35 void postMessage(Dynamic message, 35 void postMessage(var message, String targetOrigin, [List messagePorts = null]) {
36 String targetOrigin,
37 [List messagePorts = null]) {
38 if (messagePorts == null) { 36 if (messagePorts == null) {
39 JS('void', '#.postMessage(#,#)', _window, message, targetOrigin); 37 JS('void', '#.postMessage(#,#)', _window, message, targetOrigin);
40 } else { 38 } else {
41 JS('void', '#.postMessage(#,#,#)', _window, message, targetOrigin, message Ports); 39 JS('void', '#.postMessage(#,#,#)', _window, message, targetOrigin, message Ports);
42 } 40 }
43 } 41 }
44 42
45 // Implementation support. 43 // Implementation support.
46 _DOMWindowCrossFrameImpl(this._window); 44 _DOMWindowCrossFrameImpl(this._window);
47 45
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 94
97 static History _createSafe(h) { 95 static History _createSafe(h) {
98 if (identical(h, window.history)) { 96 if (identical(h, window.history)) {
99 return h; 97 return h;
100 } else { 98 } else {
101 // TODO(vsm): Cache or implement equality. 99 // TODO(vsm): Cache or implement equality.
102 return new _HistoryCrossFrameImpl(h); 100 return new _HistoryCrossFrameImpl(h);
103 } 101 }
104 } 102 }
105 } 103 }
OLDNEW
« no previous file with comments | « lib/html/src/Serialization.dart ('k') | lib/html/src/native_DOMImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698