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

Side by Side Diff: mojo/public/interfaces/bindings/tests/sample_factory.mojom

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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 2013 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 [DartPackage="_mojo_for_test_only",
6 JavaPackage="org.chromium.mojo.bindings.test.mojom.sample"]
7 module sample;
8
9 import "sample_import.mojom";
10
11 // This sample shows how handles to MessagePipes can be sent as both parameters
12 // to methods as well as fields on structs.
13
14 struct Request {
15 int32 x;
16 handle<message_pipe>? pipe;
17 array<handle<message_pipe>>? more_pipes;
18
19 // Interfaces can be used as members.
20 imported.ImportedInterface? obj;
21 };
22
23 struct Response {
24 int32 x;
25 handle<message_pipe>? pipe;
26 };
27
28 [ServiceName="sample::NamedObject"]
29 interface NamedObject {
30 SetName(string name);
31 GetName() => (string name);
32 };
33
34 interface Factory {
35 DoStuff(Request request, handle<message_pipe>? pipe)
36 => (Response response, string text);
37 DoStuff2(handle<data_pipe_consumer> pipe) => (string text);
38 CreateNamedObject(NamedObject& obj);
39 RequestImportedInterface(imported.ImportedInterface& obj)
40 => (imported.ImportedInterface& obj);
41 TakeImportedInterface(imported.ImportedInterface obj)
42 => (imported.ImportedInterface obj);
43 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698