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

Side by Side Diff: client/html/src/EventTargetWrappingImplementation.dart

Issue 8849001: frog: use type annotation in map and list literals (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 9 years 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) 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 class EventsImplementation implements Events { 5 class EventsImplementation implements Events {
6 /* Raw event target. */ 6 /* Raw event target. */
7 var _ptr; 7 var _ptr;
8 8
9 Map<String, EventListenerList> _listenerMap; 9 Map<String, EventListenerList> _listenerMap;
10 10
11 EventsImplementation._wrap(this._ptr) { 11 EventsImplementation._wrap(this._ptr) {
12 _listenerMap = <String, EventListenerList>{}; 12 _listenerMap = <EventListenerList>{};
13 } 13 }
14 14
15 EventListenerList operator [](String type) { 15 EventListenerList operator [](String type) {
16 return _get(type.toLowerCase()); 16 return _get(type.toLowerCase());
17 } 17 }
18 18
19 EventListenerList _get(String type) { 19 EventListenerList _get(String type) {
20 return _listenerMap.putIfAbsent(type, 20 return _listenerMap.putIfAbsent(type,
21 () => new EventListenerListImplementation(_ptr, type)); 21 () => new EventListenerListImplementation(_ptr, type));
22 } 22 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 EventTargetWrappingImplementation._wrap(ptr) : super._wrap(ptr); 110 EventTargetWrappingImplementation._wrap(ptr) : super._wrap(ptr);
111 111
112 Events get on() { 112 Events get on() {
113 if (_on === null) { 113 if (_on === null) {
114 _on = new EventsImplementation._wrap(_ptr); 114 _on = new EventsImplementation._wrap(_ptr);
115 } 115 }
116 return _on; 116 return _on;
117 } 117 }
118 } 118 }
OLDNEW
« no previous file with comments | « client/html/release/htmlimpl.dart ('k') | frog/gen.dart » ('j') | frog/gen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698