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

Unified 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: Address zra's feedback 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/dart/packages/mojo/lib/src/application_connection.dart ('k') | mojo/dart/packages/mojo/sources.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/packages/mojo/lib/src/service_describer.dart
diff --git a/mojo/dart/packages/mojo/lib/src/service_describer.dart b/mojo/dart/packages/mojo/lib/src/service_describer.dart
new file mode 100644
index 0000000000000000000000000000000000000000..74be9983e5dc3e14f4ba2e600d5eba331c798d3b
--- /dev/null
+++ b/mojo/dart/packages/mojo/lib/src/service_describer.dart
@@ -0,0 +1,22 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+part of application;
+
+class _ServiceDescriberImpl implements service_describer.ServiceDescriber {
+ final HashMap<String, service_describer.ServiceDescription> _data;
+ service_describer.ServiceDescriberStub _stub;
+
+ _ServiceDescriberImpl(this._data, core.MojoMessagePipeEndpoint endpoint) {
+ _stub =
+ new service_describer.ServiceDescriberStub.fromEndpoint(endpoint, this);
+ }
+
+ void describeService(String interfaceName,
+ service_describer.ServiceDescriptionStub descriptionRequest) {
+ if (_data.containsKey(interfaceName)) {
+ descriptionRequest.impl = _data[interfaceName];
+ }
+ }
+}
« no previous file with comments | « mojo/dart/packages/mojo/lib/src/application_connection.dart ('k') | mojo/dart/packages/mojo/sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698