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

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: Fix whitespace issue in generated bindings 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
« no previous file with comments | « Source/bindings/derived_sources.gyp ('k') | Source/bindings/scripts/CodeGeneratorV8.pm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/CodeGenerator.pm
diff --git a/Source/bindings/scripts/CodeGenerator.pm b/Source/bindings/scripts/CodeGenerator.pm
index afbeb7d410cd4aa0c2c0145f774a7b7a49049855..4bb49b6612a90f59fa372a7f1d059898c85de251 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
@@ -87,4 +88,20 @@ sub ProcessDocument
}
}
+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 FILE, "<", $idlFile;
+ my @lines = <FILE>;
+ close FILE;
+
+ my $fileContents = join('', @lines);
+ return ($fileContents =~ /callback\s+interface\s+(\w+)/gs);
+}
+
1;
« 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