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

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

Issue 312683005: IDL: Support optional argument default value syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address nits Created 6 years, 6 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 DOMString stringMethodOptionalLongArg(optional long optionalLongArg); 372 DOMString stringMethodOptionalLongArg(optional long optionalLongArg);
373 TestInterfaceEmpty testInterfaceEmptyMethodOptionalLongArg(optional long opt ionalLongArg); 373 TestInterfaceEmpty testInterfaceEmptyMethodOptionalLongArg(optional long opt ionalLongArg);
374 long longMethodOptionalLongArg(optional long optionalLongArg); 374 long longMethodOptionalLongArg(optional long optionalLongArg);
375 void voidMethodLongArgOptionalLongArg(long longArg, optional long optionalLo ngArg); 375 void voidMethodLongArgOptionalLongArg(long longArg, optional long optionalLo ngArg);
376 void voidMethodLongArgOptionalLongArgOptionalLongArg(long longArg, optional long optionalLongArg1, optional long optionalLongArg2); 376 void voidMethodLongArgOptionalLongArgOptionalLongArg(long longArg, optional long optionalLongArg1, optional long optionalLongArg2);
377 void voidMethodLongArgOptionalTestInterfaceEmptyArg(long longArg, optional T estInterfaceEmpty optionalTestInterfaceEmpty); 377 void voidMethodLongArgOptionalTestInterfaceEmptyArg(long longArg, optional T estInterfaceEmpty optionalTestInterfaceEmpty);
378 void voidMethodTestInterfaceEmptyArgOptionalLongArg(TestInterfaceEmpty optio nalTestInterfaceEmpty, optional long longArg); 378 void voidMethodTestInterfaceEmptyArgOptionalLongArg(TestInterfaceEmpty optio nalTestInterfaceEmpty, optional long longArg);
379 // Optional arguments: exceptional case 379 // Optional arguments: exceptional case
380 void voidMethodOptionalDictionaryArg(optional Dictionary optionalDictionaryA rg); 380 void voidMethodOptionalDictionaryArg(optional Dictionary optionalDictionaryA rg);
381 381
382 // Optional arguments with defaults
383 void voidMethodDefaultStringArg(optional DOMString defaultStringArg = "foo") ;
384 void voidMethodDefaultNullStringArg(optional DOMString defaultStringArg = nu ll);
385 void voidMethodDefaultLongArg(optional long defaultLongArg = 10);
386 void voidMethodDefaultDoubleArg(optional double defaultDoubleArg = 0.5);
387 void voidMethodDefaultTrueBooleanArg(optional boolean defaultBooleanArg = tr ue);
388 void voidMethodDefaultFalseBooleanArg(optional boolean defaultBooleanArg = f alse);
389 void voidMethodDefaultNullableStringArg(optional DOMString? defaultStringArg = null);
390 void voidMethodDefaultNullableTestInterfaceArg(optional TestInterface? defau ltTestInterfaceArg = null);
391
382 // Variadic operations 392 // Variadic operations
383 void voidMethodVariadicStringArg(DOMString... variadicStringArgs); 393 void voidMethodVariadicStringArg(DOMString... variadicStringArgs);
384 void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString... variadicStringArgs); 394 void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString... variadicStringArgs);
385 void voidMethodVariadicTestInterfaceEmptyArg(TestInterfaceEmpty... variadicT estInterfaceEmptyArgs); 395 void voidMethodVariadicTestInterfaceEmptyArg(TestInterfaceEmpty... variadicT estInterfaceEmptyArgs);
386 void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(TestInterf aceEmpty testInterfaceEmptyArg, TestInterfaceEmpty... variadicTestInterfaceEmpty Args); 396 void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(TestInterf aceEmpty testInterfaceEmptyArg, TestInterfaceEmpty... variadicTestInterfaceEmpty Args);
387 void voidMethodVariadicTestInterfaceGarbageCollectedArg(TestInterfaceGarbage Collected... variadicTestInterfaceGarbageCollectedArg); 397 void voidMethodVariadicTestInterfaceGarbageCollectedArg(TestInterfaceGarbage Collected... variadicTestInterfaceGarbageCollectedArg);
388 void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(TestInterfaceW illBeGarbageCollected... variadicTestInterfaceWillBeGarbageCollectedArg); 398 void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(TestInterfaceW illBeGarbageCollected... variadicTestInterfaceWillBeGarbageCollectedArg);
389 399
390 // Overloaded methods 400 // Overloaded methods
391 void overloadedMethodA(long longArg); 401 void overloadedMethodA(long longArg);
392 void overloadedMethodA(long longArg1, long longArg2); 402 void overloadedMethodA(long longArg1, long longArg2);
393 void overloadedMethodB(long longArg); 403 void overloadedMethodB(long longArg);
394 void overloadedMethodB(DOMString stringArg, optional long longArg); 404 void overloadedMethodB(DOMString stringArg, optional long longArg);
395 void overloadedMethodC(long longArg); 405 void overloadedMethodC(long longArg);
396 void overloadedMethodC(TestInterfaceEmpty testInterfaceEmptyArg); 406 void overloadedMethodC(TestInterfaceEmpty testInterfaceEmptyArg);
397 void overloadedMethodD(long longArg); 407 void overloadedMethodD(long longArg);
398 void overloadedMethodD(long[] longArrayArg); 408 void overloadedMethodD(long[] longArrayArg);
399 void overloadedMethodE(long longArg); 409 void overloadedMethodE(long longArg);
400 void overloadedMethodE(TestInterfaceEmpty? testInterfaceEmptyOrNullArg); 410 void overloadedMethodE(TestInterfaceEmpty? testInterfaceEmptyOrNullArg);
401 void overloadedMethodF(optional DOMString stringArg); 411 void overloadedMethodF(optional DOMString stringArg);
402 void overloadedMethodF(double doubleArg); 412 void overloadedMethodF(double doubleArg);
403 void overloadedMethodG(long longArg); 413 void overloadedMethodG(long longArg);
404 void overloadedMethodG([Default=Null] TestInterfaceEmpty? testInterfaceEmpty OrNullArg); 414 void overloadedMethodG(optional TestInterfaceEmpty? testInterfaceEmptyOrNull Arg = null);
405 void overloadedMethodH(TestInterface testInterfaceArg); 415 void overloadedMethodH(TestInterface testInterfaceArg);
406 void overloadedMethodH(TestInterfaceEmpty testInterfaceEmptyArg); 416 void overloadedMethodH(TestInterfaceEmpty testInterfaceEmptyArg);
407 void overloadedMethodI(DOMString stringArg); 417 void overloadedMethodI(DOMString stringArg);
408 void overloadedMethodI(double doubleArg); 418 void overloadedMethodI(double doubleArg);
409 419
410 420
411 [PerWorldBindings] void overloadedPerWorldBindingsMethod(); 421 [PerWorldBindings] void overloadedPerWorldBindingsMethod();
412 [PerWorldBindings] void overloadedPerWorldBindingsMethod(long longArg); 422 [PerWorldBindings] void overloadedPerWorldBindingsMethod(long longArg);
413 423
414 static void overloadedStaticMethod(long longArg); 424 static void overloadedStaticMethod(long longArg);
415 static void overloadedStaticMethod(long longArg1, long longArg2); 425 static void overloadedStaticMethod(long longArg1, long longArg2);
416 426
417 // Extended attributes for arguments 427 // Extended attributes for arguments
418 // [Clamp] 428 // [Clamp]
419 void voidMethodClampUnsignedShortArg([Clamp] unsigned short clampUnsignedSho rtArg); 429 void voidMethodClampUnsignedShortArg([Clamp] unsigned short clampUnsignedSho rtArg);
420 void voidMethodClampUnsignedLongArg([Clamp] unsigned long clampUnsignedLongA rg); 430 void voidMethodClampUnsignedLongArg([Clamp] unsigned long clampUnsignedLongA rg);
421 // [Default] 431 // [Default]
422 void voidMethodDefaultUndefinedTestInterfaceEmptyArg([Default=Undefined] opt ional TestInterfaceEmpty defaultUndefinedTestInterfaceEmptyArg); 432 void voidMethodDefaultUndefinedTestInterfaceEmptyArg([Default=Undefined] opt ional TestInterfaceEmpty defaultUndefinedTestInterfaceEmptyArg);
423 void voidMethodDefaultUndefinedLongArg([Default=Undefined] optional long def aultUndefinedLongArg); 433 void voidMethodDefaultUndefinedLongArg([Default=Undefined] optional long def aultUndefinedLongArg);
424 void voidMethodDefaultUndefinedStringArg([Default=Undefined] optional DOMStr ing defaultUndefinedStringArg); 434 void voidMethodDefaultUndefinedStringArg([Default=Undefined] optional DOMStr ing defaultUndefinedStringArg);
425 void voidMethodDefaultNullStringStringArg([Default=NullString] optional DOMS tring defaultNullStringStringArg);
426 // [EnforceRange] 435 // [EnforceRange]
427 void voidMethodEnforceRangeLongArg([EnforceRange] long enforceRangeLongArg); 436 void voidMethodEnforceRangeLongArg([EnforceRange] long enforceRangeLongArg);
428 // [TreatNullAs], [TreatUndefinedAs] 437 // [TreatNullAs], [TreatUndefinedAs]
429 void voidMethodTreatNullAsNullStringStringArg([TreatNullAs=NullString] DOMSt ring treatNullAsNullStringStringArg); 438 void voidMethodTreatNullAsNullStringStringArg([TreatNullAs=NullString] DOMSt ring treatNullAsNullStringStringArg);
430 void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg([Tre atNullAs=NullString, TreatUndefinedAs=NullString] DOMString treatNullAsNullStrin gStringArg); 439 void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg([Tre atNullAs=NullString, TreatUndefinedAs=NullString] DOMString treatNullAsNullStrin gStringArg);
431 440
432 // Extended attributes for methods 441 // Extended attributes for methods
433 [LogActivity, LogAllWorlds] void activityLoggingAccessForAllWorldsMethod(); 442 [LogActivity, LogAllWorlds] void activityLoggingAccessForAllWorldsMethod();
434 [CallWith=ExecutionContext] void callWithExecutionContextVoidMethod(); 443 [CallWith=ExecutionContext] void callWithExecutionContextVoidMethod();
435 [CallWith=ScriptState] void callWithScriptStateVoidMethod(); 444 [CallWith=ScriptState] void callWithScriptStateVoidMethod();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 void voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(TestInterfaceWill BeGarbageCollected[] testInterfaceWillBeGarbageCollectedArrayArg); 508 void voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(TestInterfaceWill BeGarbageCollected[] testInterfaceWillBeGarbageCollectedArrayArg);
500 509
501 // Extended attributes on referenced interfaces 510 // Extended attributes on referenced interfaces
502 // (not self; self-reference tests at interface themselves) 511 // (not self; self-reference tests at interface themselves)
503 attribute TestInterface testInterfaceAttribute; // [ImplementedAs] 512 attribute TestInterface testInterfaceAttribute; // [ImplementedAs]
504 attribute TestInterfaceGarbageCollected testInterfaceGarbageCollectedAttribu te; // [GarbageCollected] 513 attribute TestInterfaceGarbageCollected testInterfaceGarbageCollectedAttribu te; // [GarbageCollected]
505 attribute TestInterfaceGarbageCollected? testInterfaceGarbageCollectedOrNull Attribute; // [GarbageCollected] 514 attribute TestInterfaceGarbageCollected? testInterfaceGarbageCollectedOrNull Attribute; // [GarbageCollected]
506 attribute TestInterfaceWillBeGarbageCollected testInterfaceWillBeGarbageColl ectedAttribute; // [WillBeGarbageCollected] 515 attribute TestInterfaceWillBeGarbageCollected testInterfaceWillBeGarbageColl ectedAttribute; // [WillBeGarbageCollected]
507 attribute TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCol lectedOrNullAttribute; // [WillBeGarbageCollected] 516 attribute TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCol lectedOrNullAttribute; // [WillBeGarbageCollected]
508 }; 517 };
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestInterfaceNamedConstructor.idl ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698