Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 part of html; | 5 part of html; |
| 6 | 6 |
| 7 // TODO(vsm): Unify with Dartium version. | 7 // TODO(vsm): Unify with Dartium version. |
| 8 class _DOMWindowCrossFrame implements WindowBase { | 8 class _DOMWindowCrossFrame implements WindowBase { |
| 9 // Private window. Note, this is a window in another frame, so it | 9 // Private window. Note, this is a window in another frame, so it |
| 10 // cannot be typed as "Window" as its prototype is not patched | 10 // cannot be typed as "Window" as its prototype is not patched |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 _DOMWindowCrossFrame(this._window); | 42 _DOMWindowCrossFrame(this._window); |
| 43 | 43 |
| 44 static WindowBase _createSafe(w) { | 44 static WindowBase _createSafe(w) { |
| 45 if (identical(w, window)) { | 45 if (identical(w, window)) { |
| 46 return w; | 46 return w; |
| 47 } else { | 47 } else { |
| 48 // TODO(vsm): Cache or implement equality. | 48 // TODO(vsm): Cache or implement equality. |
| 49 return new _DOMWindowCrossFrame(w); | 49 return new _DOMWindowCrossFrame(w); |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 | |
| 53 // TODO(efortuna): Remove this method. dartbug.com/16814 | |
|
Emily Fortuna
2014/02/13 22:12:06
these lines are the one thing that's different fro
| |
| 54 Events get on => throw new UnimplementedError(); | |
| 55 // TODO(efortuna): Remove this method. dartbug.com/16814 | |
| 56 void addEventListener(String type, EventListener listener, [bool useCapture]) | |
| 57 => throw new UnimplementedError(); | |
| 58 // TODO(efortuna): Remove this method. dartbug.com/16814 | |
| 59 bool dispatchEvent(Event event) => throw new UnimplementedError(); | |
| 60 // TODO(efortuna): Remove this method. dartbug.com/16814 | |
| 61 void removeEventListener(String type, EventListener listener, | |
| 62 [bool useCapture]) => throw new UnimplementedError(); | |
| 52 } | 63 } |
| 53 | 64 |
| 54 class _LocationCrossFrame implements LocationBase { | 65 class _LocationCrossFrame implements LocationBase { |
| 55 // Private location. Note, this is a location object in another frame, so it | 66 // Private location. Note, this is a location object in another frame, so it |
| 56 // cannot be typed as "Location" as its prototype is not patched | 67 // cannot be typed as "Location" as its prototype is not patched |
| 57 // properly. Its fields and methods can only be accessed via JavaScript. | 68 // properly. Its fields and methods can only be accessed via JavaScript. |
| 58 var _location; | 69 var _location; |
| 59 | 70 |
| 60 void set href(String val) => _setHref(_location, val); | 71 void set href(String val) => _setHref(_location, val); |
| 61 static void _setHref(location, val) { | 72 static void _setHref(location, val) { |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 92 | 103 |
| 93 static HistoryBase _createSafe(h) { | 104 static HistoryBase _createSafe(h) { |
| 94 if (identical(h, window.history)) { | 105 if (identical(h, window.history)) { |
| 95 return h; | 106 return h; |
| 96 } else { | 107 } else { |
| 97 // TODO(vsm): Cache or implement equality. | 108 // TODO(vsm): Cache or implement equality. |
| 98 return new _HistoryCrossFrame(h); | 109 return new _HistoryCrossFrame(h); |
| 99 } | 110 } |
| 100 } | 111 } |
| 101 } | 112 } |
| OLD | NEW |