Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 application; | |
| 6 | |
| 7 class _ServiceDescriberImpl implements service_describer.ServiceDescriber { | |
| 8 final Map<String, service_describer.ServiceDescription> _data; | |
|
zra
2016/02/10 22:48:24
If iteration order isn't important, use HashMap
alexfandrianto
2016/02/11 01:04:55
Done.
| |
| 9 service_describer.ServiceDescriberStub _stub; | |
| 10 | |
| 11 _ServiceDescriberImpl(this._data, core.MojoMessagePipeEndpoint endpoint) { | |
| 12 _stub = | |
| 13 new service_describer.ServiceDescriberStub.fromEndpoint(endpoint, this); | |
| 14 } | |
| 15 | |
| 16 void describeService(String interfaceName, | |
| 17 service_describer.ServiceDescriptionStub descriptionRequest) { | |
| 18 if (_data.containsKey(interfaceName)) { | |
| 19 descriptionRequest.impl = _data[interfaceName]; | |
| 20 } | |
| 21 } | |
| 22 } | |
| OLD | NEW |