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

Unified Diff: chrome/browser/resources/extensions/extension_list.js

Issue 1008973002: [Extensions UI] Update extensions page to use api methods for permissions prompt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: chrome/browser/resources/extensions/extension_list.js
diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js
index 73b9b950cf25123f667b39a6f01704d2a3d95c8d..979bfcf78c8d5a8b907daefbd7f95f9d75a757e7 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -172,12 +172,17 @@ cr.define('extensions', function() {
/**
* Indicates whether an uninstall dialog is being shown to prevent multiple
* dialogs from being displayed.
- * @type {boolean}
- * @private
+ * @private {boolean}
*/
uninstallIsShowing_: false,
/**
+ * Indicates whether a permissions prompt is showing.
+ * @private {boolean}
+ */
+ permissionsPromptIsShowing_: false,
+
+ /**
* Necessary to only show the butterbar once.
* @private {boolean}
*/
@@ -375,7 +380,13 @@ cr.define('extensions', function() {
// The 'Permissions' link.
row.setupColumn('.permissions-link', 'details', 'click', function(e) {
- chrome.send('extensionSettingsPermissions', [extension.id]);
+ if (!this.permissionsPromptIsShowing_) {
+ chrome.developerPrivate.showPermissionsDialog(extension.id,
+ function() {
+ this.permissionsPromptIsShowing_ = false;
+ }.bind(this));
+ this.permissionsPromptIsShowing_ = true;
+ }
e.preventDefault();
});

Powered by Google App Engine
This is Rietveld 408576698