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

Unified Diff: tools/json_schema_compiler/idl_schema.py

Issue 10677015: Add INTERNAL annotation to namespaces in IDL (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 8 years, 5 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 | « no previous file | tools/json_schema_compiler/idl_schema_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/idl_schema.py
diff --git a/tools/json_schema_compiler/idl_schema.py b/tools/json_schema_compiler/idl_schema.py
index d59103b051629bae193db0186d3267a6227d74f5..393887be925c8b3026c456f0395990791268a65e 100644
--- a/tools/json_schema_compiler/idl_schema.py
+++ b/tools/json_schema_compiler/idl_schema.py
@@ -262,9 +262,11 @@ class Namespace(object):
dictionary that the JSON schema compiler expects to see.
'''
- def __init__(self, namespace_node, nodoc=False, permissions=None):
+ def __init__(self, namespace_node, nodoc=False, permissions=None,
+ internal=False):
self.namespace = namespace_node
self.nodoc = nodoc
+ self.internal = internal
self.events = []
self.functions = []
self.types = []
@@ -291,6 +293,7 @@ class Namespace(object):
'documentation_permissions_required': self.permissions,
'types': self.types,
'functions': self.functions,
+ 'internal': self.internal,
'events': self.events}
def process_interface(self, node):
@@ -313,11 +316,14 @@ class IDLSchema(object):
def process(self):
namespaces = []
nodoc = False
+ internal = False
permissions = None
for node in self.idl:
if node.cls == 'Namespace':
- namespace = Namespace(node, nodoc, permissions)
+ namespace = Namespace(node, nodoc, permissions, internal)
namespaces.append(namespace.process())
+ nodoc = False
+ internal = False
elif node.cls == 'Copyright':
continue
elif node.cls == 'Comment':
@@ -327,6 +333,8 @@ class IDLSchema(object):
nodoc = bool(node.value)
elif node.name == 'permissions':
permission = node.value.split(',')
+ elif node.name == 'internal':
+ internal = bool(node.value)
else:
continue
else:
« no previous file with comments | « no previous file | tools/json_schema_compiler/idl_schema_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698