| 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 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { | 5 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { |
| 6 | 6 |
| 7 _DocumentImpl get document() native "return this.document;"; | 7 _DocumentImpl get document() native "return this.document;"; |
| 8 | 8 |
| 9 Window get _top() native "return this.top;"; | 9 Window get _top() native "return this.top;"; |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void set _location(Location value) native 'this.location = value'; | 62 void set _location(Location value) native 'this.location = value'; |
| 63 // Prevent compiled from thinking 'location' property is available for a Dart | 63 // Prevent compiled from thinking 'location' property is available for a Dart |
| 64 // member. | 64 // member. |
| 65 _protect_location() native 'location'; | 65 _protect_location() native 'location'; |
| 66 | 66 |
| 67 static _isDartLocation(thing) { | 67 static _isDartLocation(thing) { |
| 68 // On Firefox the code that implements 'is Location' fails to find the patch | 68 // On Firefox the code that implements 'is Location' fails to find the patch |
| 69 // stub on Object.prototype and throws an exception. | 69 // stub on Object.prototype and throws an exception. |
| 70 try { | 70 try { |
| 71 return thing is Location; | 71 return thing is Location; |
| 72 } catch (var e) { | 72 } catch (e) { |
| 73 return false; | 73 return false; |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 | 77 |
| 78 void requestLayoutFrame(TimeoutHandler callback) { | 78 void requestLayoutFrame(TimeoutHandler callback) { |
| 79 _addMeasurementFrameCallback(callback); | 79 _addMeasurementFrameCallback(callback); |
| 80 } | 80 } |
| 81 | 81 |
| 82 /** @domName DOMWindow.requestAnimationFrame */ | 82 /** @domName DOMWindow.requestAnimationFrame */ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 return _deserialize(port); | 124 return _deserialize(port); |
| 125 } | 125 } |
| 126 | 126 |
| 127 registerPort(String name, var port) { | 127 registerPort(String name, var port) { |
| 128 var serialized = _serialize(port); | 128 var serialized = _serialize(port); |
| 129 localStorage['dart-port:$name'] = JSON.stringify(serialized); | 129 localStorage['dart-port:$name'] = JSON.stringify(serialized); |
| 130 } | 130 } |
| 131 | 131 |
| 132 $!MEMBERS | 132 $!MEMBERS |
| 133 } | 133 } |
| OLD | NEW |