diff options
author | erikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 16:44:43 +0000 |
---|---|---|
committer | erikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 16:44:43 +0000 |
commit | 9c45b718e0b24664945c98d7a6315e4666fe7c22 (patch) | |
tree | 8697f8b5890b4a0f6121a76adf17a00045943068 /chrome/common | |
parent | 79ae821680fd8d84cc567063ead475072b799bc9 (diff) | |
download | chromium_src-9c45b718e0b24664945c98d7a6315e4666fe7c22.zip chromium_src-9c45b718e0b24664945c98d7a6315e4666fe7c22.tar.gz chromium_src-9c45b718e0b24664945c98d7a6315e4666fe7c22.tar.bz2 |
mole API - take 2
originally reviewed / committed as http://codereview.chromium.org/160276
TBR=mpcomplete,phadjan.jr
Review URL: http://codereview.chromium.org/159854
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/common_resources.grd | 2 | ||||
-rwxr-xr-x | chrome/common/extensions/api/extension_api.json | 32 | ||||
-rw-r--r-- | chrome/common/extensions/docs/toolstrip.html | 46 |
3 files changed, 78 insertions, 2 deletions
diff --git a/chrome/common/common_resources.grd b/chrome/common/common_resources.grd index 5ea8f3c..e13c7c1 100644 --- a/chrome/common/common_resources.grd +++ b/chrome/common/common_resources.grd @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- This comment is only here because changes to resources are not picked up -without changes to the corresponding grd file. rw --> +without changes to the corresponding grd file. --> <grit latest_public_release="0" current_release="1"> <outputs> <output filename="grit/common_resources.h" type="rc_header"> diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index 1561a41..2740069 100755 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -65,7 +65,6 @@ * TODO(rafaelw): Validate event arguments in debug and unittests * TODO(rafaelw): Support $ref for json_schema validation. */ - [ /** * chrome.self @@ -706,5 +705,36 @@ ] } ] + }, + + /** + * chrome.toolstrip + */ + { + namespace: "toolstrip", + types: [], + functions: [ + { + name: "expand", + type: "function", + description: "", + parameters: [ + {type: "integer", name: "height", minimum: 0}, + {type: "string", name: "url", optional: true}, + {type: "function", name: "callback", optional: true} + ] + }, + { + name: "collapse", + type: "function", + description: "", + parameters: [ + {type: "string", name: "url", optional: true}, + {type: "function", name: "callback", optional: true} + ] + } + ], + events: [ + ] } ] diff --git a/chrome/common/extensions/docs/toolstrip.html b/chrome/common/extensions/docs/toolstrip.html new file mode 100644 index 0000000..faf8a37 --- /dev/null +++ b/chrome/common/extensions/docs/toolstrip.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<!-- This page is a placeholder for generated extensions api doc. Note: + 1) The <head> information in this page is significant, should be uniform + across api docs and should be edited only with knowledge of the + templating mechanism. + 2) The <body> tag *must* retain id="body" + 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a + browser, it will be re-generated from the template, json schema and + authored overview content. + 4) The <body>.innerHTML is also generated by an offline step so that this + page may easily be indexed by search engines. + + TODO(rafaelw): Abstract this into a "pageshell" that becomes the single + version of page template shell and the "instance" pages (bookmarks.html, + etc...) can be generated with a build step. +--> +<!-- <html> must retain id="template --> +<html xmlns="http://www.w3.org/1999/xhtml"> + <!-- <head> data is significant and loads the needed libraries and styles --> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <title jscontent="pageTitle">pageTitle</title> + <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> + <script type="text/javascript" + src="../../../third_party/jstemplate/jstemplate_compiled.js"> + </script> + <script type="text/javascript" src="js/api_page_generator.js"></script> + <script> +// Re-render the page if the user-agent is chrome and it is being served as +// a file:/// scheme. This allows both the initial render to static as well +// as dynamic re-rendering for developers/doc-writers working on local changes. +window.onload = function() { + var chrome = navigator.userAgent.indexOf("Chrome") > -1; + var fileScheme = location.protocol == "file:"; + var regenerate = chrome && fileScheme; + //if (regenerate) { + window.renderPage(); + //} +} + </script> + </head> + <!-- <body> content is completely generated. Do not edit, as it will be + and rewritten. --> + <body class="hidden"> + </body> +</html> |