Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 [DartPackage="_mojo_for_test_only", | 5 [DartPackage="_mojo_for_test_only", |
| 6 JavaPackage="org.chromium.mojo.bindings.test.mojom.sample", | 6 JavaPackage="org.chromium.mojo.bindings.test.mojom.sample", |
| 7 JavaConstantsClassName="InterfaceConstants", | 7 JavaConstantsClassName="InterfaceConstants", |
| 8 Foo = "hello world"] | 8 Foo="hello world"] |
| 9 module sample; | 9 module sample; |
| 10 | 10 |
| 11 const uint64 kLong = 4405; | 11 const uint64 kLong = 4405; |
| 12 | 12 |
| 13 enum Enum { | 13 enum Enum { |
| 14 VALUE | 14 VALUE, |
| 15 }; | 15 }; |
| 16 | 16 |
| 17 interface Provider { | 17 interface Provider { |
| 18 EchoString(string a) => (string a); | 18 EchoString(string a) => (string a); |
| 19 EchoStrings(string a, string b) => (string a, string b); | 19 EchoStrings(string a, string b) => (string a, string b); |
| 20 EchoMessagePipeHandle(handle<message_pipe> a) => (handle<message_pipe> a); | 20 EchoMessagePipeHandle(handle<message_pipe> a) => (handle<message_pipe> a); |
| 21 EchoEnum(Enum a) => (Enum a); | 21 EchoEnum(Enum a) => (Enum a); |
| 22 EchoInt(int32 a) => (int32 a); | 22 EchoInt(int32 a) => (int32 a); |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 interface IntegerAccessor { | 25 interface IntegerAccessor { |
| 26 GetInteger() => (int64 data, [MinVersion=2] Enum type); | 26 GetInteger() => (int64 data, [MinVersion=2]Enum type); |
|
vtl
2016/02/29 23:41:59
Do we really want to omit the space after the ']'
azani
2016/03/04 01:08:49
Done.
| |
| 27 [MinVersion=1] | 27 [MinVersion=1] |
| 28 SetInteger(int64 data, [MinVersion=3] Enum type); | 28 SetInteger(int64 data, [MinVersion=3]Enum type); |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 // Used for testing that structs are generated for request params and response | 31 // Used for testing that structs are generated for request params and response |
| 32 // params. Also used to test the generated method ordinals. | 32 // params. Also used to test the generated method ordinals. |
| 33 interface SampleInterface { | 33 interface SampleInterface { |
| 34 SampleMethod1@1(int32 in1, string? in2) => (string? out1, Enum out2); | 34 SampleMethod1@1(int32 in1, string? in2) => (string? out1, Enum out2); |
| 35 SampleMethod0@0(); | 35 SampleMethod0@0(); |
| 36 SampleMethod2@2(); | 36 SampleMethod2@2(); |
| 37 }; | 37 }; |
| OLD | NEW |