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

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

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/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 # Copyright (C) 2013 Samsung Electronics. All rights reserved.
9 # 10 #
10 # This library is free software; you can redistribute it and/or 11 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Library General Public 12 # modify it under the terms of the GNU Library General Public
12 # License as published by the Free Software Foundation; either 13 # License as published by the Free Software Foundation; either
13 # version 2 of the License, or (at your option) any later version. 14 # version 2 of the License, or (at your option) any later version.
14 # 15 #
15 # This library is distributed in the hope that it will be useful, 16 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # Library General Public License for more details. 19 # Library General Public License for more details.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 81 }
81 82
82 my $interfaces = $idlDocument->interfaces; 83 my $interfaces = $idlDocument->interfaces;
83 foreach my $interface (@$interfaces) { 84 foreach my $interface (@$interfaces) {
84 print "Generating bindings code for IDL interface \"" . $interface->name . "\"...\n" if $verbose; 85 print "Generating bindings code for IDL interface \"" . $interface->name . "\"...\n" if $verbose;
85 $codeGenerator->GenerateInterface($interface, $defines); 86 $codeGenerator->GenerateInterface($interface, $defines);
86 $codeGenerator->WriteData($interface, $useOutputDir, $useOutputHeadersDi r); 87 $codeGenerator->WriteData($interface, $useOutputDir, $useOutputHeadersDi r);
87 } 88 }
88 } 89 }
89 90
91 sub IsCallbackInterfaceFromFile
92 {
93 my $object = shift;
94 my $interfaceName = shift;
95
96 my $idlFile = $object->IDLFileForInterface($interfaceName)
97 or die("Could NOT find IDL file for interface \"$interfaceName\"!\n");
98
99 open FILE, "<", $idlFile;
100 my @lines = <FILE>;
101 close FILE;
102
103 my $fileContents = join('', @lines);
104 return ($fileContents =~ /callback\s+interface\s+(\w+)/gs);
105 }
106
90 1; 107 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