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

Unified 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: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698