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.
5 [JavaPackage="org.chromium.mojo.bindings.test.mojom.sample"]
8 import "sample_import.mojom";
10 // This sample shows how handles to MessagePipes can be sent as both parameters
11 // to methods as well as fields on structs.
15 handle<message_pipe>? pipe;
16 array<handle<message_pipe>>? more_pipes;
18 // Interfaces can be used as members.
19 imported.ImportedInterface? obj;
24 handle<message_pipe>? pipe;
27 interface NamedObject {
29 GetName() => (string name);
32 [Client=FactoryClient]
34 DoStuff(Request request, handle<message_pipe>? pipe);
35 DoStuff2(handle<data_pipe_consumer> pipe);
36 CreateNamedObject(NamedObject& obj);
37 RequestImportedInterface(
38 imported.ImportedInterface& obj) => (imported.ImportedInterface& obj);
39 TakeImportedInterface(
40 imported.ImportedInterface obj) => (imported.ImportedInterface obj);
43 interface FactoryClient {
44 DidStuff(Response response, string text);
45 DidStuff2(string text);