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

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

Issue 386963003: [WIP][NotForLand] IDL dictionary support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: sequence and array support Created 6 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 enum TestEnum {"", "EnumValue1", "EnumValue2", "EnumValue3"}; 31 enum TestEnum {"", "EnumValue1", "EnumValue2", "EnumValue3"};
32 32
33 callback VoidCallbackFunction = void (); 33 callback VoidCallbackFunction = void ();
34 callback AnyCallbackFunctionOptionalAnyArg = any (optional any optionalAnyArg); 34 callback AnyCallbackFunctionOptionalAnyArg = any (optional any optionalAnyArg);
35 35
36 dictionary TestDict {
37 boolean booleanMember;
38 long longMember1 = 1;
39 };
40
41 dictionary TestDictDerived : TestDict {
42 unsigned short unsignedShortMember;
43 float floatMember4 = 4.0;
44 };
45
46 // No extended attributes on the interface; those go in TestInterface.idl 36 // No extended attributes on the interface; those go in TestInterface.idl
47 interface TestObject { 37 interface TestObject {
48 // Constants 38 // Constants
49 const unsigned short CONST_VALUE_0 = 0; 39 const unsigned short CONST_VALUE_0 = 0;
50 const unsigned short CONST_VALUE_1 = 1; 40 const unsigned short CONST_VALUE_1 = 1;
51 const unsigned short CONST_VALUE_2 = 2; 41 const unsigned short CONST_VALUE_2 = 2;
52 const unsigned short CONST_VALUE_4 = 4; 42 const unsigned short CONST_VALUE_4 = 4;
53 const unsigned short CONST_VALUE_8 = 8; 43 const unsigned short CONST_VALUE_8 = 8;
54 const short CONST_VALUE_9 = -1; 44 const short CONST_VALUE_9 = -1;
55 const DOMString CONST_VALUE_10 = "my constant string"; 45 const DOMString CONST_VALUE_10 = "my constant string";
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 sequence<long>? nullableLongSequenceMethod(); 356 sequence<long>? nullableLongSequenceMethod();
367 // Currently only used on interface type arguments 357 // Currently only used on interface type arguments
368 void voidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? nullableTestI nterfaceEmptyArg); 358 void voidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? nullableTestI nterfaceEmptyArg);
369 // Callback interface types 359 // Callback interface types
370 void voidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackIn terfaceArg); 360 void voidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackIn terfaceArg);
371 void voidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterfa ce optionalTestCallbackInterfaceArg); 361 void voidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterfa ce optionalTestCallbackInterfaceArg);
372 void voidMethodTestCallbackInterfaceOrNullArg(TestCallbackInterface? testCal lbackInterfaceArg); 362 void voidMethodTestCallbackInterfaceOrNullArg(TestCallbackInterface? testCal lbackInterfaceArg);
373 // Enumerations 363 // Enumerations
374 TestEnum testEnumMethod(); 364 TestEnum testEnumMethod();
375 void voidMethodTestEnumArg(TestEnum testEnumTypeArg); 365 void voidMethodTestEnumArg(TestEnum testEnumTypeArg);
366 // Dictionaries
367 TestDictionary testDictionaryMethod();
368 void voidMethodTestDictionaryArg(TestDictionary testDictionaryArg);
369 void voidMethodOptionalTestDictionaryArg(optional TestDictionary optionalTes tDictionaryArg);
376 // Exceptional types 370 // Exceptional types
377 Dictionary dictionaryMethod(); 371 Dictionary dictionaryMethod();
378 NodeFilter nodeFilterMethod(); 372 NodeFilter nodeFilterMethod();
379 Promise promiseMethod(); 373 Promise promiseMethod();
380 SerializedScriptValue serializedScriptValueMethod(); 374 SerializedScriptValue serializedScriptValueMethod();
381 XPathNSResolver xPathNSResolverMethod(); 375 XPathNSResolver xPathNSResolverMethod();
382 void voidMethodDictionaryArg(Dictionary dictionaryArg); 376 void voidMethodDictionaryArg(Dictionary dictionaryArg);
383 void voidMethodNodeFilterArg(NodeFilter nodeFilterArg); 377 void voidMethodNodeFilterArg(NodeFilter nodeFilterArg);
384 void voidMethodPromiseArg(Promise promiseArg); 378 void voidMethodPromiseArg(Promise promiseArg);
385 void voidMethodSerializedScriptValueArg(SerializedScriptValue serializedScri ptValueArg); 379 void voidMethodSerializedScriptValueArg(SerializedScriptValue serializedScri ptValueArg);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 [ImplementedInPrivateScript] short shortMethodWithShortArgumentImplementedIn PrivateScript(short value); 543 [ImplementedInPrivateScript] short shortMethodWithShortArgumentImplementedIn PrivateScript(short value);
550 [ImplementedInPrivateScript] DOMString stringMethodWithStringArgumentImpleme ntedInPrivateScript(DOMString value); 544 [ImplementedInPrivateScript] DOMString stringMethodWithStringArgumentImpleme ntedInPrivateScript(DOMString value);
551 [ImplementedInPrivateScript] Node nodeMethodWithNodeArgumentImplementedInPri vateScript(Node value); 545 [ImplementedInPrivateScript] Node nodeMethodWithNodeArgumentImplementedInPri vateScript(Node value);
552 [ImplementedInPrivateScript] Node nodeMethodWithVariousArgumentsImplementedI nPrivateScript(Document document, Node node, short value1, double value2, DOMStr ing string); 546 [ImplementedInPrivateScript] Node nodeMethodWithVariousArgumentsImplementedI nPrivateScript(Document document, Node node, short value1, double value2, DOMStr ing string);
553 [ImplementedInPrivateScript] readonly attribute short readonlyShortAttribute ; 547 [ImplementedInPrivateScript] readonly attribute short readonlyShortAttribute ;
554 [ImplementedInPrivateScript] attribute short shortAttribute; 548 [ImplementedInPrivateScript] attribute short shortAttribute;
555 [ImplementedInPrivateScript] attribute DOMString stringAttribute; 549 [ImplementedInPrivateScript] attribute DOMString stringAttribute;
556 [ImplementedInPrivateScript] attribute Node nodeAttribute; 550 [ImplementedInPrivateScript] attribute Node nodeAttribute;
557 551
558 }; 552 };
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestDictionary.idl ('k') | Source/bindings/tests/results/TestDictionary.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698