diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-20 20:47:25 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-20 20:47:25 +0000 |
commit | 6d7c8059b0b3c9e5f079bb8f0569b0de6a115330 (patch) | |
tree | 93b51fcbae522fdd93b0d8031922ab131a9eb2ac /chrome/browser/resources | |
parent | b674dc73f0b635aa2f7be660153e5b05f6a9b593 (diff) | |
download | chromium_src-6d7c8059b0b3c9e5f079bb8f0569b0de6a115330.zip chromium_src-6d7c8059b0b3c9e5f079bb8f0569b0de6a115330.tar.gz chromium_src-6d7c8059b0b3c9e5f079bb8f0569b0de6a115330.tar.bz2 |
Hook up more of extension uninstall.
Also removed all external dependencies from ExtensionsService.
It now only sends out notifications, which other services
consume. This should allow us to unit test the
ExtensionsService frontend, but I haven't added that yet.
Review URL: http://codereview.chromium.org/113493
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r-- | chrome/browser/resources/extensions_ui.html | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/chrome/browser/resources/extensions_ui.html b/chrome/browser/resources/extensions_ui.html index 8273c59..c689c82 100644 --- a/chrome/browser/resources/extensions_ui.html +++ b/chrome/browser/resources/extensions_ui.html @@ -117,6 +117,25 @@ function sendInspectMessage(viewData) { String(viewData.renderProcessId), String(viewData.renderViewId) ]); } + +/** + * Handles an 'uninstall' button getting clicked. + */ +function handleUninstallExtension(node) { + // Tell the C++ ExtensionDOMHandler to uninstall an extension. + chrome.send('uninstall', [node.extensionId]); + + // Find the div above us with class 'extension' and remove it. + while (node) { + if (node.className == 'extension') { + node.parentNode.removeChild(node); + return; + } + node = node.parentNode; + } + + throw new Error("Couldn't find containing extension element."); +} </script> <style> body { @@ -142,10 +161,13 @@ div.extension-name { font-size: large; font-weight: bold; margin-top: 2em; - margin-bottom: 1em; text-align: left; } +div.extension-uninstall { + margin-bottom: 1em; +} + dl { margin: 0px 0px 3px 0px; } @@ -189,10 +211,6 @@ th.desc { width: 50%; } -th.enabled { - width: 10%; -} - #error-box { background-color:#D8D8D8; margin-top: 8px; @@ -225,8 +243,13 @@ th.enabled { <div jsdisplay="extensions.length > 0"> <div class="extension" jsselect="extensions"> - <div class="extension-name" jscontent="name"> - sExtension Name</div> + <div class="extension-name" jscontent="name">Extension Name</div> + <div class="extension-uninstall"> + <button + jsvalues=".extensionId:id" + onclick="handleUninstallExtension(this)" + >Uninstall</button> + </div> <dl> <dd>Id: <span jscontent="id">0000000000000000000000000000000000000000</span></dd> <dd> |