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

Side by Side Diff: client/dom/generated/src/frog/Storage.dart

Issue 9312003: Use fields in hidden native DOM classes instead of getters/setters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also fix native Created 8 years, 10 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
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 _StorageJs extends _DOMTypeJs implements Storage native "*Storage" { 5 class _StorageJs extends _DOMTypeJs implements Storage native "*Storage" {
6 6
7 int get length() native "return this.length;"; 7 final int length;
8 8
9 void clear() native; 9 void clear() native;
10 10
11 String getItem(String key) native; 11 String getItem(String key) native;
12 12
13 String key(int index) native; 13 String key(int index) native;
14 14
15 void removeItem(String key) native; 15 void removeItem(String key) native;
16 16
17 void setItem(String key, String data) native; 17 void setItem(String key, String data) native;
(...skipping 14 matching lines...) Expand all
32 32
33 void set dartObjectLocalStorage(var value) native """ 33 void set dartObjectLocalStorage(var value) native """
34 if (this === window.localStorage) 34 if (this === window.localStorage)
35 window._dartLocalStorageLocalStorage = value; 35 window._dartLocalStorageLocalStorage = value;
36 else if (this === window.sessionStorage) 36 else if (this === window.sessionStorage)
37 window._dartSessionStorageLocalStorage = value; 37 window._dartSessionStorageLocalStorage = value;
38 else 38 else
39 throw new UnsupportedOperationException('Cannot dartObjectLocalStorage for unknown Storage object.'); 39 throw new UnsupportedOperationException('Cannot dartObjectLocalStorage for unknown Storage object.');
40 """ { throw new UnsupportedOperationException(''); } 40 """ { throw new UnsupportedOperationException(''); }
41 } 41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698