OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 part of fn; | |
6 | |
7 class EventHandler { | |
8 final String type; | |
9 final sky.EventListener listener; | |
10 | |
11 EventHandler(this.type, this.listener); | |
12 } | |
13 | |
14 class EventMap { | |
15 final List<EventHandler> _handlers = new List<EventHandler>(); | |
16 | |
17 void listen(String type, sky.EventListener listener) { | |
18 assert(listener != null); | |
19 _handlers.add(new EventHandler(type, listener)); | |
20 } | |
21 | |
22 void addAll(EventMap events) { | |
23 _handlers.addAll(events._handlers); | |
24 } | |
25 } | |
OLD | NEW |