Chromium Code Reviews| Index: Source/bindings/scripts/CodeGenerator.pm |
| diff --git a/Source/bindings/scripts/CodeGenerator.pm b/Source/bindings/scripts/CodeGenerator.pm |
| index 094b08125197c7c94570ffda2154e34257a27c83..fa9b8da3d0b0657a21e00ca7ff30c7d163308e1f 100644 |
| --- a/Source/bindings/scripts/CodeGenerator.pm |
| +++ b/Source/bindings/scripts/CodeGenerator.pm |
| @@ -6,6 +6,7 @@ |
| # Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| +# Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| # |
| # This library is free software; you can redistribute it and/or |
| # modify it under the terms of the GNU Library General Public |
| @@ -646,6 +647,21 @@ sub SetterExpression |
| return ($functionName, $contentAttributeName); |
| } |
| +sub IsCallbackInterfaceFromFile |
| +{ |
| + my $object = shift; |
| + my $interfaceName = shift; |
| + |
| + my $idlFile = $object->IDLFileForInterface($interfaceName) |
| + or die("Could NOT find IDL file for interface \"$interfaceName\"!\n"); |
| + |
| + open my $fh, "<", $idlFile; |
| + while (<$fh>) { |
| + return 1 if /callback\s+interface\s+\w+/s; |
| + } |
|
haraken
2013/04/26 18:03:36
This is a bit weak for whitespaces. Let's use the
do-not-use
2013/04/26 18:15:57
Meaning add the 'g' modifier, right?
|
| + return 0; |
| +} |
| + |
| sub GenerateConditionalString |
| { |
| my $generator = shift; |