summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-28 02:26:30 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-28 02:26:30 +0000
commitbbeae1b4351499ca2ab3082040a289f1dd493584 (patch)
tree88cb130fa46ffe70e0d437f953b92dc9011e41a2 /chrome/browser/resources
parentcd1b8530bbb6bb7351e2a54f0b23aedc16a4498a (diff)
downloadchromium_src-bbeae1b4351499ca2ab3082040a289f1dd493584.zip
chromium_src-bbeae1b4351499ca2ab3082040a289f1dd493584.tar.gz
chromium_src-bbeae1b4351499ca2ab3082040a289f1dd493584.tar.bz2
Initial work on chrome-ui://extensions/ page. URL now displays a static template page
Review URL: http://codereview.chromium.org/28172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r--chrome/browser/resources/extensions.html87
1 files changed, 87 insertions, 0 deletions
diff --git a/chrome/browser/resources/extensions.html b/chrome/browser/resources/extensions.html
new file mode 100644
index 0000000..9147b03
--- /dev/null
+++ b/chrome/browser/resources/extensions.html
@@ -0,0 +1,87 @@
+<!DOCTYPE HTML>
+<html id="root">
+<head>
+<meta charset="utf-8">
+<title jscontent="title"></title>
+<script type="text/javascript">
+
+// TODO(rafaelw): Remove. This is stub data. The idea is that the C++ will
+// populate a similar json structure and hand it to this page with real data
+// from the extensions system
+var testExtensionData = [
+ {
+ "name": "Dummy Extension",
+ "description": "Does some extremely cool stuff that I won't ever bother " +
+ "explaining, because it's just that cool.",
+ "version": "1.0.231",
+ "content_scripts": [
+ {
+ "js": ["file1.js", "file2.js"],
+ "matches": ["http://*/*", "http://other.com/*"]
+ },
+ {
+ "js": ["file1.js", "file2.js"],
+ "matches": ["http://*/*", "http://other.com/*"]
+ },
+ {
+ "js": ["file1.js", "file2.js"],
+ "matches": ["http://*/*", "http://other.com/*"]
+ },
+ ],
+ },
+ {
+ "name": "PlaceHolder Extension",
+ "description": "",
+ "version": "1.0.231",
+ "content_scripts": [],
+ }
+];
+
+/**
+ * Takes the |extensionsData| input argument which represents data about the
+ * currently installed/running extensions and populates the html jstemplate with
+ * that data
+ * @param {Object} extensionsData Detailed info about installed extensions
+ */
+function showExtensionsData(extensionsData) {
+ // This is the javascript code that processes the template:
+ var input = new JsExprContext(extensionsData);
+ var output = document.getElementById('extensionTemplate');
+ jstProcess(input, output);
+}
+</script>
+<style type="text/css">
+h1 {
+ text-align: center;
+}
+.extension{
+ padding: 8px;
+}
+.scriptMatches {
+ padding: 4px;
+ font-size: 12px;
+}
+</style>
+</head>
+<body onload="showExtensionsData(testExtensionData);">
+ <h1>Installed Extensions</h1>
+ <div id="extensionTemplate">
+ <div class="extension" jsselect="$this">
+ <div jscontent="name">Extension Name</div>
+ <div jscontent="description">Extension Description</div>
+ <div>Version: <span jscontent="version">x.x.x.x</span></div>
+ <div class="scriptMatches" jsselect="content_scripts">
+ <div>
+ <span jsselect="js"
+ jscontent="(($index > 0) ? ' ' : '') + $this">
+ </span>
+ </div>
+ <div>
+ <span jsselect="matches"
+ jscontent="(($index > 0) ? ' ' : '') + $this">
+ </span>
+ </div>
+ </div>
+ </div>
+ </body>
+</html> \ No newline at end of file