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

Unified Diff: third_party/WebKit/Source/bindings/scripts/idl_types.py

Issue 2312093003: Generated bindings for IDL callback functions (Closed)
Patch Set: Addressed comments Created 4 years, 3 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: third_party/WebKit/Source/bindings/scripts/idl_types.py
diff --git a/third_party/WebKit/Source/bindings/scripts/idl_types.py b/third_party/WebKit/Source/bindings/scripts/idl_types.py
index b5933322a3bb6100db9f885726f10242449d0712..12d1cf22ec5e7b104d8186609a30377cecb4c1a1 100644
--- a/third_party/WebKit/Source/bindings/scripts/idl_types.py
+++ b/third_party/WebKit/Source/bindings/scripts/idl_types.py
@@ -140,6 +140,7 @@ class IdlType(IdlTypeBase):
# to support types like short?[] vs. short[]?, instead of treating these
# as orthogonal properties (via flags).
callback_functions = set(STANDARD_CALLBACK_FUNCTIONS)
+ experimental_callback_functions = {}
callback_interfaces = set()
dictionaries = set()
enums = {} # name -> values
@@ -171,6 +172,10 @@ class IdlType(IdlTypeBase):
return self.base_type in IdlType.callback_functions
@property
+ def is_experimental_callback_function(self): # pylint: disable=C0103
+ return self.base_type in IdlType.experimental_callback_functions
+
+ @property
def is_callback_interface(self):
return self.base_type in IdlType.callback_interfaces
@@ -236,6 +241,10 @@ class IdlType(IdlTypeBase):
cls.callback_functions.update(new_callback_functions)
@classmethod
+ def set_experimental_callback_functions(cls, new_callback_functions):
+ cls.experimental_callback_functions.update(new_callback_functions)
+
+ @classmethod
def set_callback_interfaces(cls, new_callback_interfaces):
cls.callback_interfaces.update(new_callback_interfaces)
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/idl_compiler.py ('k') | third_party/WebKit/Source/bindings/scripts/scripts.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698