Chromium Code Reviews| 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) |