| Index: chrome/common/extensions/docs/server2/jsc_view.py
|
| diff --git a/chrome/common/extensions/docs/server2/jsc_view.py b/chrome/common/extensions/docs/server2/jsc_view.py
|
| index 73859c15559b07ad03dd2d75e12a9715afc2a463..f990019f9e9f7489396c9e4e40f5072bdf19e581 100644
|
| --- a/chrome/common/extensions/docs/server2/jsc_view.py
|
| +++ b/chrome/common/extensions/docs/server2/jsc_view.py
|
| @@ -59,8 +59,6 @@ def _FormatValue(value):
|
| return ','.join([s[max(0, i - 3):i] for i in range(len(s), 0, -3)][::-1])
|
|
|
|
|
| -
|
| -
|
| class JSCView(object):
|
| '''Uses a Model from the JSON Schema Compiler and generates a dict that
|
| a Handlebar template can use for a data source.
|
| @@ -73,7 +71,8 @@ class JSCView(object):
|
| json_cache,
|
| template_cache,
|
| features_bundle,
|
| - event_byname_future):
|
| + event_byname_future,
|
| + platform):
|
| self._content_script_apis = content_script_apis
|
| self._availability = availability_finder.GetAPIAvailability(jsc_model.name)
|
| self._current_node = APINodeCursor(availability_finder, jsc_model.name)
|
| @@ -85,6 +84,7 @@ class JSCView(object):
|
| self._template_cache = template_cache
|
| self._event_byname_future = event_byname_future
|
| self._jsc_model = jsc_model
|
| + self._platform = platform
|
|
|
| def _GetLink(self, link):
|
| ref = link if '.' in link else (self._jsc_model.name + '.' + link)
|
| @@ -544,6 +544,9 @@ class JSCView(object):
|
| for category in table_info.iterkeys():
|
| content = []
|
| for node in table_info[category]:
|
| + # Don't display nodes restricted to a different platform.
|
| + if node.get('restrictedTo', self._platform) != self._platform:
|
| + continue
|
| # If there is a 'partial' argument and it hasn't already been
|
| # converted to a Handlebar object, transform it to a template.
|
| if 'partial' in node:
|
|
|