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

Side by Side Diff: Source/bindings/scripts/CodeGenerator.pm

Issue 13877023: Start putting absolute paths in generated files. Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/derived_sources.gyp ('k') | Source/bindings/scripts/CodeGeneratorV8.pm » ('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 # WebKit IDL parser 2 # WebKit IDL parser
3 # 3 #
4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> 4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org>
5 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 5 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
6 # Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 6 # Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved.
9 # 9 #
10 # This library is free software; you can redistribute it and/or 10 # This library is free software; you can redistribute it and/or
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 my $wanted = sub { 257 my $wanted = sub {
258 $idlFiles->{$1} = $File::Find::name if /^([A-Z].*)\.idl$/; 258 $idlFiles->{$1} = $File::Find::name if /^([A-Z].*)\.idl$/;
259 $File::Find::prune = 1 if /^\../; 259 $File::Find::prune = 1 if /^\../;
260 }; 260 };
261 find($wanted, @directories); 261 find($wanted, @directories);
262 } 262 }
263 263
264 return $idlFiles->{$interfaceName}; 264 return $idlFiles->{$interfaceName};
265 } 265 }
266 266
267 sub HFileForInterface
268 {
269 my $object = shift;
270 my $interfaceName = shift;
271
272 my $idlFilename = $object->IDLFileForInterface($interfaceName)
273 or die("Could NOT find IDL file for interface \"$interfaceName\"!\n");
274
275 my $sourceRoot = $ENV{SOURCE_ROOT};
276 if ($idlFilename =~ /^$sourceRoot/) {
277 $idlFilename = substr($idlFilename, length($sourceRoot) + 1);
278 }
279 $idlFilename = "bindings/" . $idlFilename;
280 #print "${interfaceName}, ${idlFilename}, ${sourceRoot}\n";
281 $idlFilename =~ s/idl$/h/;
282 return $idlFilename;
283 }
284
267 sub ParseInterface 285 sub ParseInterface
268 { 286 {
269 my $object = shift; 287 my $object = shift;
270 my $interfaceName = shift; 288 my $interfaceName = shift;
271 289
272 return undef if $interfaceName eq 'Object'; 290 return undef if $interfaceName eq 'Object';
273 291
274 if (exists $cachedInterfaces->{$interfaceName}) { 292 if (exists $cachedInterfaces->{$interfaceName}) {
275 return $cachedInterfaces->{$interfaceName}; 293 return $cachedInterfaces->{$interfaceName};
276 } 294 }
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { 780 if ($currentInterface->extendedAttributes->{$extendedAttribute}) {
763 $found = 1; 781 $found = 1;
764 } 782 }
765 return 1 if $found; 783 return 1 if $found;
766 }, 0); 784 }, 0);
767 785
768 return $found; 786 return $found;
769 } 787 }
770 788
771 1; 789 1;
OLDNEW
« no previous file with comments | « Source/bindings/derived_sources.gyp ('k') | Source/bindings/scripts/CodeGeneratorV8.pm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698