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

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

Issue 952053003: extensions: allow trash to have a focus outline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 10 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 | « no previous file | chrome/browser/resources/extensions/extensions.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0b919eb93db8b1340b81878e7913d7c982cd587e..6943d246e9a1b2675c5693063d66c201977739c5 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -197,7 +197,7 @@ ExtensionFocusRow.prototype = {
},
};
-cr.define('options', function() {
+cr.define('extensions', function() {
'use strict';
/**
@@ -206,7 +206,7 @@ cr.define('options', function() {
* @constructor
* @extends {HTMLDivElement}
*/
- var ExtensionsList = cr.ui.define('div');
+ var ExtensionList = cr.ui.define('div');
/**
* @type {Object<string, number>} A map from extension id to last reloaded
@@ -216,7 +216,7 @@ cr.define('options', function() {
*/
var extensionReloadedTimestamp = {};
- ExtensionsList.prototype = {
+ ExtensionList.prototype = {
__proto__: HTMLDivElement.prototype,
/**
@@ -449,6 +449,8 @@ cr.define('options', function() {
trash.hidden = extension.managedInstall;
trash.setAttribute('column-type', 'trash');
trash.addEventListener('click', function(e) {
+ trash.classList.add('open');
+ trash.classList.toggle('mouse-clicked', e.detail > 0);
chrome.send('extensionSettingsUninstall', [extension.id]);
});
row.querySelector('.enable-controls').appendChild(trash);
@@ -882,7 +884,14 @@ cr.define('options', function() {
},
};
+ ExtensionList.uninstallCancel = function() {
+ var trash = document.querySelector('.trash.open');
+ if (trash.classList.contains('mouse-clicked'))
+ trash.blur();
+ trash.classList.remove('open');
+ };
+
return {
- ExtensionsList: ExtensionsList
+ ExtensionList: ExtensionList
};
});
« no previous file with comments | « no previous file | chrome/browser/resources/extensions/extensions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698