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

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

Issue 11047021: New cross frame base types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regen dart:html Created 8 years, 2 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
« no previous file with comments | « lib/html/src/dart2js_DOMImplementation.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 5
6 // On Firefox 11, the object obtained from 'window.location' is very strange. 6 // On Firefox 11, the object obtained from 'window.location' is very strange.
7 // It can't be monkey-patched and seems immune to putting methods on 7 // It can't be monkey-patched and seems immune to putting methods on
8 // Object.prototype. We are forced to wrap the object. 8 // Object.prototype. We are forced to wrap the object.
9 9
10 class _LocationWrapper implements Location { 10 class _LocationWrapper implements LocalLocation {
11 11
12 final _ptr; // Opaque reference to real location. 12 final _ptr; // Opaque reference to real location.
13 13
14 _LocationWrapper(this._ptr); 14 _LocationWrapper(this._ptr);
15 15
16 // TODO(sra): Replace all the _set and _get calls with 'JS' forms. 16 // TODO(sra): Replace all the _set and _get calls with 'JS' forms.
17 17
18 // final List<String> ancestorOrigins; 18 // final List<String> ancestorOrigins;
19 List<String> get ancestorOrigins => _get(_ptr, 'ancestorOrigins'); 19 List<String> get ancestorOrigins => _get(_ptr, 'ancestorOrigins');
20 20
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 65
66 static _get(p, m) native 'return p[m];'; 66 static _get(p, m) native 'return p[m];';
67 static _set(p, m, v) native 'p[m] = v;'; 67 static _set(p, m, v) native 'p[m] = v;';
68 68
69 static _assign(p, url) native 'p.assign(url);'; 69 static _assign(p, url) native 'p.assign(url);';
70 static _reload(p) native 'p.reload()'; 70 static _reload(p) native 'p.reload()';
71 static _replace(p, url) native 'p.replace(url);'; 71 static _replace(p, url) native 'p.replace(url);';
72 static _toString(p) native 'return p.toString();'; 72 static _toString(p) native 'return p.toString();';
73 } 73 }
OLDNEW
« no previous file with comments | « lib/html/src/dart2js_DOMImplementation.dart ('k') | lib/html/src/native_DOMImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698