Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: Source/bindings/tests/idls/TestObj.idl

Issue 14384004: Get rid of [Callback] extended attribute for parameters in IDL files (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix whitespace issue in generated bindings Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/scripts/IDLAttributes.txt ('k') | Source/bindings/tests/idls/TestTypedefs.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary formstrArg, with or without 5 * Redistribution and use in source and binary formstrArg, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 15 matching lines...) Expand all
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 // This IDL file is for testing the bindings code generator and for tracking 30 // This IDL file is for testing the bindings code generator and for tracking
31 // changes in its ouput. 31 // changes in its ouput.
32 32
33 enum TestEnumType { "", "EnumValue1", "EnumValue2", "EnumValue3" }; 33 enum TestEnumType { "", "EnumValue1", "EnumValue2", "EnumValue3" };
34 34
35 [ 35 [
36 Constructor([Callback] TestCallback testCallback), 36 Constructor(TestCallback testCallback),
37 InterfaceName=TestObject 37 InterfaceName=TestObject
38 ] interface TestObj { 38 ] interface TestObj {
39 // Attributes 39 // Attributes
40 readonly attribute long readOnlyLongAttr; 40 readonly attribute long readOnlyLongAttr;
41 readonly attribute DOMString readOnlyStringAttr; 41 readonly attribute DOMString readOnlyStringAttr;
42 readonly attribute TestObj readOnlyTestObjAttr; 42 readonly attribute TestObj readOnlyTestObjAttr;
43 static readonly attribute long staticReadOnlyLongAttr; 43 static readonly attribute long staticReadOnlyLongAttr;
44 static attribute DOMString staticStringAttr; 44 static attribute DOMString staticStringAttr;
45 static readonly attribute TestSubObjConstructor TestSubObj; 45 static readonly attribute TestSubObjConstructor TestSubObj;
46 attribute TestEnumType enumAttr; 46 attribute TestEnumType enumAttr;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 [CallWith= ScriptExecutionContext | ScriptState ] attribute TestObj with ScriptExecutionContextAndScriptStateWithSpacesAttribute; 126 [CallWith= ScriptExecutionContext | ScriptState ] attribute TestObj with ScriptExecutionContextAndScriptStateWithSpacesAttribute;
127 127
128 // optional parameters 128 // optional parameters
129 void methodWithOptionalArg(optional long opt); 129 void methodWithOptionalArg(optional long opt);
130 void methodWithNonOptionalArgAndOptionalArg(long nonOpt, optional long op t); 130 void methodWithNonOptionalArgAndOptionalArg(long nonOpt, optional long op t);
131 void methodWithNonOptionalArgAndTwoOptionalArgs(long nonOpt, optional lon g opt1, optional long opt2); 131 void methodWithNonOptionalArgAndTwoOptionalArgs(long nonOpt, optional lon g opt1, optional long opt2);
132 void methodWithOptionalString(optional DOMString str); 132 void methodWithOptionalString(optional DOMString str);
133 void methodWithOptionalStringIsUndefined([Default=Undefined] optional DOM String str); 133 void methodWithOptionalStringIsUndefined([Default=Undefined] optional DOM String str);
134 void methodWithOptionalStringIsNullString([Default=NullString] optional D OMString str); 134 void methodWithOptionalStringIsNullString([Default=NullString] optional D OMString str);
135 135
136 // 'Callback' extended attribute 136 // Callback parameters
137 void methodWithCallbackArg([Callback] TestCallback callback); 137 void methodWithCallbackArg(TestCallback callback);
138 void methodWithNonCallbackArgAndCallbackArg(long nonCallback, [Callback] TestCallback callback); 138 void methodWithNonCallbackArgAndCallbackArg(long nonCallback, TestCallbac k callback);
139 void methodWithCallbackAndOptionalArg([Callback] optional TestCallback ca llback); 139 void methodWithCallbackAndOptionalArg(optional TestCallback callback);
140 // static methods with 'Callback' extended attribute 140 // static methods with Callback parameter
141 static void staticMethodWithCallbackAndOptionalArg([Callback] optional Te stCallback callback); 141 static void staticMethodWithCallbackAndOptionalArg(optional TestCallback callback);
142 static void staticMethodWithCallbackArg([Callback] TestCallback callback) ; 142 static void staticMethodWithCallbackArg(TestCallback callback);
143 143
144 // 'EnforceRange' extended attribute 144 // 'EnforceRange' extended attribute
145 void methodWithEnforceRangeInt32([EnforceRange] long value); 145 void methodWithEnforceRangeInt32([EnforceRange] long value);
146 void methodWithEnforceRangeUInt32([EnforceRange] unsigned long value); 146 void methodWithEnforceRangeUInt32([EnforceRange] unsigned long value);
147 void methodWithEnforceRangeInt64([EnforceRange] long long value); 147 void methodWithEnforceRangeInt64([EnforceRange] long long value);
148 void methodWithEnforceRangeUInt64([EnforceRange] unsigned long long value ); 148 void methodWithEnforceRangeUInt64([EnforceRange] unsigned long long value );
149 149
150 [EnforceRange] attribute long enforcedRangeLongAttr; 150 [EnforceRange] attribute long enforcedRangeLongAttr;
151 [EnforceRange] attribute unsigned long enforcedRangeUnsignedLongAttr; 151 [EnforceRange] attribute unsigned long enforcedRangeUnsignedLongAttr;
152 [EnforceRange] attribute long long enforcedRangeLongLongAttr; 152 [EnforceRange] attribute long long enforcedRangeLongLongAttr;
(...skipping 18 matching lines...) Expand all
171 [CachedAttribute] readonly attribute any cachedAttribute1; 171 [CachedAttribute] readonly attribute any cachedAttribute1;
172 [CachedAttribute] readonly attribute any cachedAttribute2; 172 [CachedAttribute] readonly attribute any cachedAttribute2;
173 173
174 attribute any anyAttribute; 174 attribute any anyAttribute;
175 175
176 // Overloads 176 // Overloads
177 void overloadedMethod(TestObj? objArg, [StrictTypeChecking] DOMString str Arg); 177 void overloadedMethod(TestObj? objArg, [StrictTypeChecking] DOMString str Arg);
178 void overloadedMethod(TestObj? objArg, optional long longArg); 178 void overloadedMethod(TestObj? objArg, optional long longArg);
179 void overloadedMethod([StrictTypeChecking] DOMString strArg); 179 void overloadedMethod([StrictTypeChecking] DOMString strArg);
180 void overloadedMethod(long longArg); 180 void overloadedMethod(long longArg);
181 void overloadedMethod([Callback] TestCallback callback); 181 void overloadedMethod(TestCallback callback);
182 void overloadedMethod(DOMStringList? listArg); 182 void overloadedMethod(DOMStringList? listArg);
183 void overloadedMethod(DOMString[]? arrayArg); 183 void overloadedMethod(DOMString[]? arrayArg);
184 void overloadedMethod(TestObj objArg); 184 void overloadedMethod(TestObj objArg);
185 void overloadedMethod(DOMString[] arrayArg); 185 void overloadedMethod(DOMString[] arrayArg);
186 void overloadedMethod(sequence<unsigned long> arrayArg); 186 void overloadedMethod(sequence<unsigned long> arrayArg);
187 void overloadedMethod(DOMString strArg); 187 void overloadedMethod(DOMString strArg);
188 188
189 // Class methods within JavaScript (like what's used for IDBKeyRange). 189 // Class methods within JavaScript (like what's used for IDBKeyRange).
190 static void classMethod(); 190 static void classMethod();
191 static long classMethodWithOptional(optional long arg); 191 static long classMethodWithOptional(optional long arg);
(...skipping 19 matching lines...) Expand all
211 attribute float[] floatArray; 211 attribute float[] floatArray;
212 attribute double[] doubleArray; 212 attribute double[] doubleArray;
213 213
214 void methodWithUnsignedLongSequence(sequence<unsigned long> unsignedLongSequ ence); 214 void methodWithUnsignedLongSequence(sequence<unsigned long> unsignedLongSequ ence);
215 [RaisesException] DOMString[] stringArrayFunction(DOMString[] values); 215 [RaisesException] DOMString[] stringArrayFunction(DOMString[] values);
216 [RaisesException] DOMStringList domStringListFunction(DOMStringList values); 216 [RaisesException] DOMStringList domStringListFunction(DOMStringList values);
217 217
218 [CheckSecurityForNode] readonly attribute Document contentDocument; 218 [CheckSecurityForNode] readonly attribute Document contentDocument;
219 [CheckSecurityForNode, RaisesException] SVGDocument getSVGDocument(); 219 [CheckSecurityForNode, RaisesException] SVGDocument getSVGDocument();
220 220
221 void convert1([TreatReturnedNullStringAs=Null] a value); 221 void convert1([TreatReturnedNullStringAs=Null] TestNode value);
222 void convert2([TreatReturnedNullStringAs=Undefined] b value); 222 void convert2([TreatReturnedNullStringAs=Undefined] TestNode value);
223 void convert4([TreatNullAs=NullString] d value); 223 void convert4([TreatNullAs=NullString] TestNode value);
224 void convert5([TreatNullAs=NullString, TreatUndefinedAs=NullString] e value) ; 224 void convert5([TreatNullAs=NullString, TreatUndefinedAs=NullString] TestNode value);
225 225
226 attribute SVGPoint mutablePoint; 226 attribute SVGPoint mutablePoint;
227 [Immutable] attribute SVGPoint immutablePoint; 227 [Immutable] attribute SVGPoint immutablePoint;
228 SVGPoint mutablePointFunction(); 228 SVGPoint mutablePointFunction();
229 [Immutable] SVGPoint immutablePointFunction(); 229 [Immutable] SVGPoint immutablePointFunction();
230 230
231 [ImplementedAs=banana] void orange(); 231 [ImplementedAs=banana] void orange();
232 [ImplementedAs=blueberry] attribute long strawberry; 232 [ImplementedAs=blueberry] attribute long strawberry;
233 233
234 [StrictTypeChecking] attribute float strictFloat; 234 [StrictTypeChecking] attribute float strictFloat;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 [DeprecateAs=StaticReadonlyAttribute] static readonly attribute long depreca tedStaticReadOnlyAttr; 294 [DeprecateAs=StaticReadonlyAttribute] static readonly attribute long depreca tedStaticReadOnlyAttr;
295 [DeprecateAs=StaticAttribute] static attribute long deprecatedStaticAttr; 295 [DeprecateAs=StaticAttribute] static attribute long deprecatedStaticAttr;
296 [DeprecateAs=ReadonlyAttribute] readonly attribute long deprecatedReadonlyAt tr; 296 [DeprecateAs=ReadonlyAttribute] readonly attribute long deprecatedReadonlyAt tr;
297 [DeprecateAs=Attribute] attribute long deprecatedAttr; 297 [DeprecateAs=Attribute] attribute long deprecatedAttr;
298 298
299 [DeprecateAs=Method] void deprecatedMethod(); 299 [DeprecateAs=Method] void deprecatedMethod();
300 [DeprecateAs=StaticMethod] static void deprecatedStaticMethod(); 300 [DeprecateAs=StaticMethod] static void deprecatedStaticMethod();
301 301
302 [DeprecateAs=Constant] const unsigned short DEPRECATED_CONSTANT = 1; 302 [DeprecateAs=Constant] const unsigned short DEPRECATED_CONSTANT = 1;
303 }; 303 };
OLDNEW
« no previous file with comments | « Source/bindings/scripts/IDLAttributes.txt ('k') | Source/bindings/tests/idls/TestTypedefs.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698