Commit b815f59e authored by DHNishi@gmail.com's avatar DHNishi@gmail.com

Add deprecated annotation for events in API documentation.

Example Image: http://i.imgur.com/u6f6Ewh.png

NOTRY=true
BUG=239196

Review URL: https://codereview.chromium.org/53403004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233032 0039d316-1c4b-4281-b951-d872f2087c98
parent fc7ddae2
...@@ -179,7 +179,7 @@ class _JSCModel(object): ...@@ -179,7 +179,7 @@ class _JSCModel(object):
'returns': None, 'returns': None,
'id': _CreateId(function, 'method') 'id': _CreateId(function, 'method')
} }
if (function.deprecated is not None): if function.deprecated is not None:
function_dict['deprecated'] = self._FormatDescription( function_dict['deprecated'] = self._FormatDescription(
function.deprecated) function.deprecated)
if (function.parent is not None and if (function.parent is not None and
...@@ -219,6 +219,9 @@ class _JSCModel(object): ...@@ -219,6 +219,9 @@ class _JSCModel(object):
'id': _CreateId(event, 'event'), 'id': _CreateId(event, 'event'),
'byName': {}, 'byName': {},
} }
if event.deprecated is not None:
event_dict['deprecated'] = self._FormatDescription(
event.deprecated)
if (event.parent is not None and if (event.parent is not None and
not isinstance(event.parent, model.Namespace)): not isinstance(event.parent, model.Namespace)):
event_dict['parentName'] = event.parent.simple_name event_dict['parentName'] = event.parent.simple_name
......
application: chrome-apps-doc application: chrome-apps-doc
version: 2-35-1 version: 2-36-0
runtime: python27 runtime: python27
api_version: 1 api_version: 1
threadsafe: false threadsafe: false
......
...@@ -2,4 +2,4 @@ cron: ...@@ -2,4 +2,4 @@ cron:
- description: Repopulates all cached data. - description: Repopulates all cached data.
url: /_cron url: /_cron
schedule: every 5 minutes schedule: every 5 minutes
target: 2-35-1 target: 2-36-0
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
{{?api.events}} {{?api.events}}
<h2 id="events">Events</h2> <h2 id="events">Events</h2>
{{#api.events}} {{#api.events}}
{{+partials.event api:api}} {{+partials.event @:@ api:api}}
{{/}} {{/}}
{{/api.events}} {{/api.events}}
{{?api.domEvents}} {{?api.domEvents}}
......
<div> <div>
<h4 id="{{id}}">{{name}}</h4> <h4 id="{{id}}">{{name}}</h4>
{{+partials.warning_deprecated item:@}}
<div class="description"> <div class="description">
{{?description}}<p> {{?description}}<p>
{{{description}}} {{{description}}}
......
{{- Parameters: {{- Parameters:
|function|: the schema for the function |item|: the schema for the item
-}} -}}
{{?function.deprecated}} {{?item.deprecated}}
<p class="warning"> <p class="warning">
{{function.name}} is deprecated. {{{function.deprecated}}} {{item.name}} is deprecated. {{{item.deprecated}}}
</p> </p>
{{/function.deprecated}} {{/item.deprecated}}
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment