1 // Copyright 2015 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 module mojo.test; 6 7 interface FooInterface {}; 8 9 struct StructContainsAssociated { 10 associated FooInterface? foo_interface; 11 associated FooInterface& foo_request; 12 array<associated FooInterface> foo_interfaces; 13 array<associated FooInterface&> foo_requests; 14 }; 15 16 union UnionContainsAssociated { 17 associated FooInterface foo_interface; 18 associated FooInterface& foo_request; 19 array<associated FooInterface> foo_interfaces; 20 array<associated FooInterface&> foo_requests; 21 }; 22 23 interface InterfacePassesAssociated { 24 PassFoo(associated FooInterface foo_interface, 25 associated FooInterface& foo_request) => 26 (associated FooInterface foo_interface, 27 associated FooInterface& foo_request); 28 29 PassStruct(StructContainsAssociated foo_struct) => 30 (StructContainsAssociated foo_struct); 31 32 PassUnion(UnionContainsAssociated foo_union) => 33 (UnionContainsAssociated foo_union); 34 }; 35 36 interface IntegerSender { 37 Echo(int32 value) => (int32 value); 38 Send(int32 value); 39 }; 40 41 interface IntegerSenderConnection { 42 GetSender(associated IntegerSender& sender); 43 AsyncGetSender() => (associated IntegerSender sender); 44 }; 45