Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 // Tests Pepper API generation. | |
| 6 | |
| 7 [internal] namespace idl_pepper { | |
| 8 enum EnumType { | |
| 9 name1, | |
| 10 name2 | |
| 11 }; | |
| 12 | |
| 13 enum AnotherEnumType { | |
| 14 name1, | |
| 15 name2 | |
| 16 }; | |
| 17 | |
| 18 dictionary MyType3 { | |
| 19 MyType1 a; | |
| 20 }; | |
| 21 | |
| 22 dictionary MyType2 { | |
| 23 MyType1 a; | |
| 24 }; | |
| 25 | |
| 26 dictionary MyType1 { | |
| 27 }; | |
| 28 | |
| 29 dictionary MyType4 { | |
| 30 MyType1 a; | |
| 31 }; | |
| 32 | |
| 33 dictionary MyType5 { | |
| 34 MyType3[] a; | |
| 35 MyType4? b; | |
| 36 }; | |
| 37 | |
| 38 dictionary MyType6 { | |
| 39 MyType5 a; | |
| 40 }; | |
| 41 | |
| 42 dictionary MyType0 { | |
| 43 }; | |
| 44 | |
| 45 dictionary MyType { | |
| 46 long int_single; | |
| 47 long[] int_array; | |
| 48 long? optional_int; | |
| 49 long[]? optional_int_array; | |
| 50 double double_single; | |
| 51 double[] double_array; | |
| 52 double? optional_double; | |
| 53 double[]? optional_double_array; | |
| 54 DOMString string; | |
| 55 DOMString[] string_array; | |
| 56 DOMString? optional_string; | |
| 57 DOMString[]? optional_string_array; | |
| 58 EnumType enum_single; | |
| 59 EnumType[] enum_array; | |
| 60 EnumType? optional_enum; | |
| 61 EnumType[]? optional_enum_array; | |
| 62 MyType0 struct_single; | |
| 63 MyType0[] struct_array; | |
| 64 MyType0? optional_struct; | |
| 65 MyType0[]? optional_struct_array; | |
| 66 }; | |
| 67 | |
| 68 callback Callback1 = void(MyType5 arg); | |
| 69 callback Callback2 = void(double arg); | |
| 70 callback Callback3 = void(double[] arg); | |
| 71 callback Callback4 = void(MyType0[] arg); | |
| 72 callback Callback5 = void(MyType0 arg); | |
| 73 | |
| 74 interface Functions { | |
| 75 static void function1(optional MyType2[] arg); | |
| 76 static void function2(optional MyType3 arg); | |
| 77 static void function3(Callback1 cb); | |
| 78 static void function4(Callback2 cb); | |
| 79 static double function5(); | |
| 80 static MyType5 function6(); | |
| 81 static void function7(Callback3 cb); | |
| 82 static void function8(Callback4 cb); | |
| 83 static void function9(Callback5 cb); | |
| 84 static double[] function10(); | |
| 85 static MyType0[] function11(); | |
| 86 static MyType0 function12(); | |
| 87 static void function12(MyType arg); | |
|
yzshen1
2013/12/10 21:43:02
is it intentional to have the same func name as th
Sam McNally
2013/12/11 08:02:38
Done.
| |
| 88 }; | |
| 89 | |
| 90 interface Events { | |
| 91 static void onFoo1(MyType6 arg); | |
| 92 }; | |
| 93 }; | |
| OLD | NEW |