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

Unified Diff: chrome/common/extensions/docs/server2/handlebar_dict_generator.py

Issue 10800047: Extension Docs Server Version 2: Various fixes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: ok now it should work 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
Index: chrome/common/extensions/docs/server2/handlebar_dict_generator.py
diff --git a/chrome/common/extensions/docs/server2/handlebar_dict_generator.py b/chrome/common/extensions/docs/server2/handlebar_dict_generator.py
index b9a1122d615b7f2ac507466751cd71161e258273..456aa831bf2084e5e55c8ab15c0b292694b26406 100644
--- a/chrome/common/extensions/docs/server2/handlebar_dict_generator.py
+++ b/chrome/common/extensions/docs/server2/handlebar_dict_generator.py
@@ -69,7 +69,8 @@ class HandlebarDictGenerator(object):
'name': type_.name,
'description': type_.description,
'properties': self._GenerateProperties(type_.properties),
- 'functions': self._GenerateFunctions(type_.functions)
+ 'functions': self._GenerateFunctions(type_.functions),
+ 'events': map(self._GenerateEvent, type_.events.values())
}
self._RenderTypeInformation(type_, type_dict)
return type_dict
@@ -107,7 +108,7 @@ class HandlebarDictGenerator(object):
def _GenerateCallback(self, callback):
if not callback:
- return {}
+ return None
callback_dict = {
'name': 'callback',
'description': callback.description,
@@ -149,6 +150,8 @@ class HandlebarDictGenerator(object):
# choices in templates.
if len(dst_dict['choices']) > 0:
dst_dict['choices'][-1]['last'] = True
+ elif property_.type_ == model.PropertyType.ADDITIONAL_PROPERTIES:
+ dst_dict['additional_properties'] = True
elif property_.type_ == model.PropertyType.REF:
dst_dict['link'] = _GetLinkToRefType(self._namespace.name,
property_.ref_type)
« no previous file with comments | « chrome/common/extensions/docs/server2/fake_url_fetcher.py ('k') | chrome/common/extensions/docs/server2/local_file_system.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698