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

Unified Diff: mojo/dart/packages/mojo/lib/src/interfaces.dart

Issue 1998433002: Dart: Adds Interface and InterfaceRequest interfaces. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 4 years, 7 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/codec.dart ('k') | mojo/dart/packages/mojo/lib/src/proxy.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/packages/mojo/lib/src/interfaces.dart
diff --git a/mojo/dart/packages/mojo/lib/src/interfaces.dart b/mojo/dart/packages/mojo/lib/src/interfaces.dart
new file mode 100644
index 0000000000000000000000000000000000000000..1c90a5feb1c6986f6db11e0ef7419ef82c016949
--- /dev/null
+++ b/mojo/dart/packages/mojo/lib/src/interfaces.dart
@@ -0,0 +1,23 @@
+// 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 bindings;
+
+/// [MojoInterface] is the interface implemented by the generated
+/// Interface and InterfaceRequest classes. The [MojoInterfaceControl] field
+/// [ctrl] gives access to the underlying implementation of the interface, which
+/// is either a [ProxyControl] or [StubControl] depending on the situation.
+abstract class MojoInterface<T> {
+ MojoInterfaceControl get ctrl;
+ T impl;
+ Future close({bool immediate: false});
+}
+
+/// This interface is implemented by [ProxyMessageHandler] and
+/// [StubMessageHandler]. Most of the interface is inherited from, and
+/// ultimately implemented by [core.MojoEventHandler].
+abstract class MojoInterfaceControl implements core.MojoEventHandler {
+ String get serviceName;
+ int get version;
+}
« no previous file with comments | « mojo/dart/packages/mojo/lib/src/codec.dart ('k') | mojo/dart/packages/mojo/lib/src/proxy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698