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

Side by Side Diff: chrome/common/extensions/docs/server2/api_data_source.py

Issue 121713002: Rework API reference pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@addscss_330235
Patch Set: moved inline style to sass file Created 6 years, 11 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import copy 5 import copy
6 import logging 6 import logging
7 import os 7 import os
8 8
9 from environment import IsPreviewServer 9 from environment import IsPreviewServer
10 from extensions_paths import ( 10 from extensions_paths import (
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 else: 289 else:
290 self._RenderTypeInformation(type_, property_dict) 290 self._RenderTypeInformation(type_, property_dict)
291 291
292 return property_dict 292 return property_dict
293 293
294 def _GenerateCallbackProperty(self, callback): 294 def _GenerateCallbackProperty(self, callback):
295 property_dict = { 295 property_dict = {
296 'name': callback.simple_name, 296 'name': callback.simple_name,
297 'description': self._FormatDescription(callback.description), 297 'description': self._FormatDescription(callback.description),
298 'optional': callback.optional, 298 'optional': callback.optional,
299 'is_callback': True,
not at google - send to devlin 2014/01/03 23:30:24 you will need to bump the app version due to this
Renato Mangini (chromium) 2014/02/06 03:19:17 Done.
299 'id': _CreateId(callback, 'property'), 300 'id': _CreateId(callback, 'property'),
300 'simple_type': 'function', 301 'simple_type': 'function',
301 } 302 }
302 if (callback.parent is not None and 303 if (callback.parent is not None and
303 not isinstance(callback.parent, model.Namespace)): 304 not isinstance(callback.parent, model.Namespace)):
304 property_dict['parentName'] = callback.parent.simple_name 305 property_dict['parentName'] = callback.parent.simple_name
305 return property_dict 306 return property_dict
306 307
307 def _RenderTypeInformation(self, type_, dst_dict): 308 def _RenderTypeInformation(self, type_, dst_dict):
308 dst_dict['is_object'] = type_.property_type == model.PropertyType.OBJECT 309 dst_dict['is_object'] = type_.property_type == model.PropertyType.OBJECT
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 # anything. Don't do it. 561 # anything. Don't do it.
561 if not IsPreviewServer(): 562 if not IsPreviewServer():
562 handlebar_dict['samples'] = _LazySamplesGetter( 563 handlebar_dict['samples'] = _LazySamplesGetter(
563 handlebar_dict['name'], 564 handlebar_dict['name'],
564 self._samples) 565 self._samples)
565 return handlebar_dict 566 return handlebar_dict
566 567
567 def get(self, api_name, disable_refs=False): 568 def get(self, api_name, disable_refs=False):
568 return self._GenerateHandlebarContext( 569 return self._GenerateHandlebarContext(
569 self._get_schema_model(api_name, disable_refs)) 570 self._get_schema_model(api_name, disable_refs))
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/docs/static/css/site.css » ('j') | chrome/common/extensions/docs/static/sass/_api.scss » ('J')

Powered by Google App Engine
This is Rietveld 408576698