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

Unified Diff: chrome/browser/resources/extensions_ui.html

Issue 199018: Add a disable button to the Extension management UI. (Closed)
Patch Set: comments Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extensions_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/extensions_ui.html
diff --git a/chrome/browser/resources/extensions_ui.html b/chrome/browser/resources/extensions_ui.html
index 0542d1cf63783a883dbcd3388abdffaa8e4ff926..0c9273b1b8c6f678d1036a927e2e7b497a04b690 100644
--- a/chrome/browser/resources/extensions_ui.html
+++ b/chrome/browser/resources/extensions_ui.html
@@ -247,11 +247,11 @@ function handleReloadExtension(node) {
}
/**
- * Handles a 'reenable' button getting clicked.
+ * Handles a 'enable' or 'disable' button getting clicked.
*/
-function handleEnableExtension(node) {
+function handleEnableExtension(node, enable) {
// Tell the C++ ExtensionDOMHandler to reload the extension.
- chrome.send('enable', [node.extensionId]);
+ chrome.send('enable', [node.extensionId, String(enable)]);
requestExtensionsData();
}
@@ -325,8 +325,13 @@ function autoUpdate() {
<div class="extension-actions">
<button
jsvalues=".extensionId:id"
+ jsdisplay="enabled"
+ onclick="handleEnableExtension(this, false)"
+ >Disable</button>
+ <button
+ jsvalues=".extensionId:id"
jsdisplay="!enabled"
- onclick="handleEnableExtension(this)"
+ onclick="handleEnableExtension(this, true)"
>Enable</button>
<button
jsvalues=".extensionId:id"
« no previous file with comments | « chrome/browser/extensions/extensions_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698