summaryrefslogtreecommitdiffstats
path: root/mojo/public/bindings/tests/sample_factory.mojom
diff options
context:
space:
mode:
Diffstat (limited to 'mojo/public/bindings/tests/sample_factory.mojom')
-rw-r--r--mojo/public/bindings/tests/sample_factory.mojom30
1 files changed, 30 insertions, 0 deletions
diff --git a/mojo/public/bindings/tests/sample_factory.mojom b/mojo/public/bindings/tests/sample_factory.mojom
new file mode 100644
index 0000000..7ae6b34
--- /dev/null
+++ b/mojo/public/bindings/tests/sample_factory.mojom
@@ -0,0 +1,30 @@
+// Copyright 2013 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.
+
+module sample {
+
+// This sample shows how handles to MessagePipes can be sent as both parameters
+// to methods as well as fields on structs.
+
+struct Request {
+ int32 x;
+ handle<message_pipe> pipe;
+};
+
+struct Response {
+ int32 x;
+ handle<message_pipe> pipe;
+};
+
+[Peer=FactoryClient]
+interface Factory {
+ void DoStuff(Request request, handle<message_pipe> pipe);
+};
+
+[Peer=Factory]
+interface FactoryClient {
+ void DidStuff(Response response, string text);
+};
+
+} // module sample