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

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: 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 1e9f74fdb7cbd6001aab5bc9a909c1b50c579a03..aacaa43ef090aef19b68dd50f7391049b748c081 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())
not at google - send to devlin 2012/07/20 02:04:54 types have events? whoa.
chebert 2012/07/21 19:40:31 ChromeSetting is the only type where I have seen t
}
self._RenderTypeInformation(type_, type_dict)
return type_dict
@@ -104,7 +105,7 @@ class HandlebarDictGenerator(object):
def _GenerateCallback(self, callback):
if not callback:
- return {}
+ return None
callback_dict = {
'name': 'callback',
'description': callback.description,
@@ -146,6 +147,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)

Powered by Google App Engine
This is Rietveld 408576698