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

Unified Diff: tools/json_schema_compiler/idl_schema.py

Issue 921793004: <appview> documentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: link Created 5 years, 10 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: 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 45f0609e49bc3878e5df3328a2995d2021b61b87..b079055ef55dcb8ca5c083dc0b5d6a95b7f570d5 100755
--- a/tools/json_schema_compiler/idl_schema.py
+++ b/tools/json_schema_compiler/idl_schema.py
@@ -343,7 +343,8 @@ class Namespace(object):
internal=False,
platforms=None,
compiler_options=None,
- deprecated=None):
+ deprecated=None,
+ documentation_options=None):
self.namespace = namespace_node
self.nodoc = nodoc
self.internal = internal
@@ -355,6 +356,7 @@ class Namespace(object):
self.callbacks = OrderedDict()
self.description = description
self.deprecated = deprecated
+ self.documentation_options = documentation_options
def process(self):
for node in self.namespace.GetChildren():
@@ -375,6 +377,10 @@ class Namespace(object):
compiler_options = self.compiler_options
else:
compiler_options = {}
+ if self.documentation_options is not None:
+ documentation_options = self.documentation_options
+ else:
+ documentation_options = {}
return {'namespace': self.namespace.GetName(),
'description': self.description,
'nodoc': self.nodoc,
@@ -384,7 +390,8 @@ class Namespace(object):
'events': self.events,
'platforms': self.platforms,
'compiler_options': compiler_options,
- 'deprecated': self.deprecated}
+ 'deprecated': self.deprecated,
+ 'documentation_options': documentation_options}
def process_interface(self, node):
members = []
@@ -412,6 +419,7 @@ class IDLSchema(object):
platforms = None
compiler_options = {}
deprecated = None
+ documentation_options = {}
for node in self.idl:
if node.cls == 'Namespace':
if not description:
@@ -422,7 +430,8 @@ class IDLSchema(object):
namespace = Namespace(node, description, nodoc, internal,
platforms=platforms,
compiler_options=compiler_options or None,
- deprecated=deprecated)
+ deprecated=deprecated,
+ documentation_options=documentation_options)
namespaces.append(namespace.process())
nodoc = False
internal = False
@@ -445,6 +454,12 @@ class IDLSchema(object):
compiler_options['camel_case_enum_to_string'] = node.value
elif node.name == 'deprecated':
deprecated = str(node.value)
+ elif node.name == 'documentation_options_title':
+ documentation_options['title'] = node.value
+ elif node.name == 'documentation_options_namespace':
+ documentation_options['namespace'] = node.value
+ elif node.name == 'documentation_options_documented_in':
+ documentation_options['documented_in'] = node.value
not at google - send to devlin 2015/03/03 23:50:59 Let's make this a little less wordy: documentation
lfg 2015/03/04 21:13:02 Done.
else:
continue
else:

Powered by Google App Engine
This is Rietveld 408576698