| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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 JavaConstantsClassName="InterfaceConstants", | |
| 8 Foo="hello world"] | |
| 9 module sample; | |
| 10 | |
| 11 const uint64 kLong = 4405; | |
| 12 | |
| 13 enum Enum { | |
| 14 VALUE, | |
| 15 }; | |
| 16 | |
| 17 interface Provider { | |
| 18 EchoString(string a) => (string a); | |
| 19 EchoStrings(string a, string b) => (string a, string b); | |
| 20 EchoMessagePipeHandle(handle<message_pipe> a) => (handle<message_pipe> a); | |
| 21 EchoEnum(Enum a) => (Enum a); | |
| 22 EchoInt(int32 a) => (int32 a); | |
| 23 }; | |
| 24 | |
| 25 interface IntegerAccessor { | |
| 26 GetInteger() => (int64 data, [MinVersion=2] Enum type); | |
| 27 [MinVersion=1] | |
| 28 SetInteger(int64 data, [MinVersion=3] Enum type); | |
| 29 }; | |
| 30 | |
| 31 // Used for testing that structs are generated for request params and response | |
| 32 // params. Also used to test the generated method ordinals. | |
| 33 interface SampleInterface { | |
| 34 SampleMethod1@1(int32 in1, string? in2) => (string? out1, Enum out2); | |
| 35 SampleMethod0@0(); | |
| 36 SampleMethod2@2(); | |
| 37 }; | |
| OLD | NEW |