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

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

Issue 8855001: buildfix: not use type annotation in map literals within htmllib (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
« no previous file with comments | « client/html/release/htmlimpl.dart ('k') | no next file » | 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 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 = <EventListenerList>{}; 12 // TODO(sigmund): uncomment type annotation (bug 221), currently dartc and
13 // frog interpret it differently.
14 _listenerMap = /*<EventListenerList>*/{};
13 } 15 }
14 16
15 EventListenerList operator [](String type) { 17 EventListenerList operator [](String type) {
16 return _get(type.toLowerCase()); 18 return _get(type.toLowerCase());
17 } 19 }
18 20
19 EventListenerList _get(String type) { 21 EventListenerList _get(String type) {
20 return _listenerMap.putIfAbsent(type, 22 return _listenerMap.putIfAbsent(type,
21 () => new EventListenerListImplementation(_ptr, type)); 23 () => new EventListenerListImplementation(_ptr, type));
22 } 24 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 111
110 EventTargetWrappingImplementation._wrap(ptr) : super._wrap(ptr); 112 EventTargetWrappingImplementation._wrap(ptr) : super._wrap(ptr);
111 113
112 Events get on() { 114 Events get on() {
113 if (_on === null) { 115 if (_on === null) {
114 _on = new EventsImplementation._wrap(_ptr); 116 _on = new EventsImplementation._wrap(_ptr);
115 } 117 }
116 return _on; 118 return _on;
117 } 119 }
118 } 120 }
OLDNEW
« no previous file with comments | « client/html/release/htmlimpl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698