OLD | NEW |
1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -w |
2 | 2 |
3 # Copyright (C) 2012 Tony Chang <tony@chromium.org> | 3 # Copyright (C) 2012 Tony Chang <tony@chromium.org> |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, 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 # 1. Redistributions of source code must retain the above copyright | 8 # 1. 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 # 2. Redistributions in binary form must reproduce the above copyright | 10 # 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 } | 344 } |
345 | 345 |
346 sub generateInternalSettingsIdlFile($) | 346 sub generateInternalSettingsIdlFile($) |
347 { | 347 { |
348 my $parsedItemsRef = shift; | 348 my $parsedItemsRef = shift; |
349 | 349 |
350 my $filename = "$outputDir/InternalSettingsGenerated.idl"; | 350 my $filename = "$outputDir/InternalSettingsGenerated.idl"; |
351 open my $file, ">$filename" or die "Failed to open file: $!"; | 351 open my $file, ">$filename" or die "Failed to open file: $!"; |
352 print $file $InCompiler->license(); | 352 print $file $InCompiler->license(); |
353 | 353 |
354 print $file "interface InternalSettingsGenerated {\n"; | 354 print $file "[ NoInterfaceObject ] interface InternalSettingsGenerated {\n"; |
355 | 355 |
356 sub writeIdlSetter($$$) { | 356 sub writeIdlSetter($$$) { |
357 my ($file, $parsedItemsRef, $settingName) = @_; | 357 my ($file, $parsedItemsRef, $settingName) = @_; |
358 my %parsedItems = %{ $parsedItemsRef }; | 358 my %parsedItems = %{ $parsedItemsRef }; |
359 my $type = $parsedItems{$settingName}{"type"}; | 359 my $type = $parsedItems{$settingName}{"type"}; |
360 my $idlType = $webcoreTypeToIdlType{$type}; | 360 my $idlType = $webcoreTypeToIdlType{$type}; |
361 my $setterFunctionName = setterFunctionName($settingName); | 361 my $setterFunctionName = setterFunctionName($settingName); |
362 print $file " void $setterFunctionName($idlType $settingName);\n"; | 362 print $file " void $setterFunctionName($idlType $settingName);\n"; |
363 }; | 363 }; |
364 | 364 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 print $file "#endif\n"; | 522 print $file "#endif\n"; |
523 } | 523 } |
524 print $file "}\n\n"; | 524 print $file "}\n\n"; |
525 }; | 525 }; |
526 enumerateParsedItems($file, $parsedItemsRef, \&writeSetterFunctions); | 526 enumerateParsedItems($file, $parsedItemsRef, \&writeSetterFunctions); |
527 | 527 |
528 print $file "} // namespace WebCore\n"; | 528 print $file "} // namespace WebCore\n"; |
529 | 529 |
530 close $file; | 530 close $file; |
531 } | 531 } |
OLD | NEW |