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

Side by Side Diff: mojo/dart/packages/mojo/lib/src/service_describer.dart

Issue 1648803006: Expose Service Describer in Dart mojo package (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase Retest and Update Mojoms Created 4 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
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698