summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/build
diff options
context:
space:
mode:
authorcaseq@google.com <caseq@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-29 23:08:56 +0000
committercaseq@google.com <caseq@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-29 23:08:56 +0000
commit50cacea842493916f8793c3f4974b96f48af440d (patch)
treee6acb531a9b3a6711ae68073122616cb006a58f3 /chrome/common/extensions/docs/build
parentabe390e388afe636b55096036785ab3801d95029 (diff)
downloadchromium_src-50cacea842493916f8793c3f4974b96f48af440d.zip
chromium_src-50cacea842493916f8793c3f4974b96f48af440d.tar.gz
chromium_src-50cacea842493916f8793c3f4974b96f48af440d.tar.bz2
Added samples for devtools.audits and devtools.panels.
BUG=none TEST=Navigate to docs/samples.html, search for devtools, observe 2 examples. Review URL: http://codereview.chromium.org/6904113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83619 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs/build')
-rwxr-xr-xchrome/common/extensions/docs/build/build.py12
-rw-r--r--chrome/common/extensions/docs/build/directory.py11
2 files changed, 10 insertions, 13 deletions
diff --git a/chrome/common/extensions/docs/build/build.py b/chrome/common/extensions/docs/build/build.py
index e73e42b..35bc3ac 100755
--- a/chrome/common/extensions/docs/build/build.py
+++ b/chrome/common/extensions/docs/build/build.py
@@ -18,8 +18,6 @@ from optparse import OptionParser
_script_path = os.path.realpath(__file__)
_build_dir = os.path.dirname(_script_path)
_base_dir = os.path.normpath(_build_dir + "/..")
-_webkit_dir = _base_dir + "/../../../../third_party/WebKit"
-_devtools_dir = _webkit_dir + "/Source/WebCore/inspector/front-end"
_static_dir = _base_dir + "/static"
_js_dir = _base_dir + "/js"
_template_dir = _base_dir + "/template"
@@ -27,7 +25,7 @@ _samples_dir = _base_dir + "/examples"
_extension_api_dir = os.path.normpath(_base_dir + "/../api")
_extension_api_json = _extension_api_dir + "/extension_api.json"
-_devtools_api_json = _devtools_dir + "/ExtensionAPISchema.json"
+_devtools_api_json = _extension_api_dir + "/devtools_api.json"
_api_template_html = _template_dir + "/api_template.html"
_page_shell_html = _template_dir + "/page_shell.html"
_generator_html = _build_dir + "/generator.html"
@@ -187,17 +185,13 @@ def main():
dump_render_tree = FindDumpRenderTree()
# Load the manifest of existing API Methods
- api_manifest = ApiManifest(_extension_api_json)
-
- # DevTools API is maintained separately, in WebCore land
- devtools_api_manifest = ApiManifest(_devtools_api_json)
+ api_manifest = ApiManifest([_extension_api_json, _devtools_api_json])
# Read static file names
static_names = GetStaticFileNames()
# Read module names
- module_names = (api_manifest.getModuleNames() |
- devtools_api_manifest.getModuleNames())
+ module_names = api_manifest.getModuleNames()
# All pages to generate
page_names = static_names | module_names
diff --git a/chrome/common/extensions/docs/build/directory.py b/chrome/common/extensions/docs/build/directory.py
index 055948d..7dd6ec2 100644
--- a/chrome/common/extensions/docs/build/directory.py
+++ b/chrome/common/extensions/docs/build/directory.py
@@ -62,13 +62,15 @@ class ApiManifest(object):
_MODULE_DOC_KEYS = ['functions', 'events']
""" Keys which may be passed to the _parseModuleDocLinksByKey method."""
- def __init__(self, manifest_path):
+ def __init__(self, manifest_paths):
""" Read the supplied manifest file and parse its contents.
Args:
- manifest_path: Path to extension_api.json
+ manifest_paths: Array of paths to API schemas (extension_api.json etc).
"""
- self._manifest = parse_json_file(manifest_path)
+ self._manifest = [];
+ for path in manifest_paths:
+ self._manifest.extend(parse_json_file(path))
def _getDocLink(self, method, hashprefix):
"""
@@ -296,7 +298,8 @@ class Sample(dict):
'options_page',
'plugins',
'theme',
- 'chrome_url_overrides'
+ 'chrome_url_overrides',
+ 'devtools_page'
)
""" Attributes that will map to "features" if their corresponding key is
present in the extension manifest. """