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

Side by Side Diff: chrome/browser/resources/extensions/extension_list.js

Issue 2898203004: [Extensions] Remove "show button" UI from chrome://extensions (Closed)
Patch Set: Dan's Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // <include src="extension_error.js"> 5 // <include src="extension_error.js">
6 6
7 cr.define('extensions', function() { 7 cr.define('extensions', function() {
8 'use strict'; 8 'use strict';
9 9
10 var ExtensionType = chrome.developerPrivate.ExtensionType; 10 var ExtensionType = chrome.developerPrivate.ExtensionType;
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 wrapper.setupColumn('suspiciousLearnMore', 474 wrapper.setupColumn('suspiciousLearnMore',
475 '.suspicious-install-message .learn-more-link'); 475 '.suspicious-install-message .learn-more-link');
476 476
477 // The path, if provided by unpacked extension. 477 // The path, if provided by unpacked extension.
478 wrapper.setupColumn('loadPath', '.load-path a:first-of-type', 'click', 478 wrapper.setupColumn('loadPath', '.load-path a:first-of-type', 'click',
479 function(e) { 479 function(e) {
480 chrome.developerPrivate.showPath(extension.id); 480 chrome.developerPrivate.showPath(extension.id);
481 e.preventDefault(); 481 e.preventDefault();
482 }); 482 });
483 483
484 // The 'Show Browser Action' button.
485 wrapper.setupColumn('showButton', '.show-button', 'click', function(e) {
486 chrome.developerPrivate.updateExtensionConfiguration({
487 extensionId: extension.id,
488 showActionButton: true
489 });
490 });
491
492 // The 'allow in incognito' checkbox. 484 // The 'allow in incognito' checkbox.
493 wrapper.setupColumn('incognito', '.incognito-control input', 'change', 485 wrapper.setupColumn('incognito', '.incognito-control input', 'change',
494 function(e) { 486 function(e) {
495 var butterBar = wrapper.querySelector('.butter-bar'); 487 var butterBar = wrapper.querySelector('.butter-bar');
496 var checked = e.target.checked; 488 var checked = e.target.checked;
497 butterBar.hidden = !checked || 489 butterBar.hidden = !checked ||
498 extension.type == ExtensionType.HOSTED_APP; 490 extension.type == ExtensionType.HOSTED_APP;
499 chrome.developerPrivate.updateExtensionConfiguration({ 491 chrome.developerPrivate.updateExtensionConfiguration({
500 extensionId: extension.id, 492 extensionId: extension.id,
501 incognitoAccess: e.target.checked 493 incognitoAccess: e.target.checked
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 616
625 var item = wrapper.querySelector('.extension-list-item'); 617 var item = wrapper.querySelector('.extension-list-item');
626 item.style.backgroundImage = 'url(' + extension.iconUrl + ')'; 618 item.style.backgroundImage = 'url(' + extension.iconUrl + ')';
627 619
628 this.setText_(wrapper, '.extension-title', extension.name); 620 this.setText_(wrapper, '.extension-title', extension.name);
629 this.setText_(wrapper, '.extension-version', extension.version); 621 this.setText_(wrapper, '.extension-version', extension.version);
630 this.setText_(wrapper, '.location-text', extension.locationText || ''); 622 this.setText_(wrapper, '.location-text', extension.locationText || '');
631 this.setText_(wrapper, '.blacklist-text', extension.blacklistText || ''); 623 this.setText_(wrapper, '.blacklist-text', extension.blacklistText || '');
632 this.setText_(wrapper, '.extension-description', extension.description); 624 this.setText_(wrapper, '.extension-description', extension.description);
633 625
634 // The 'Show Browser Action' button.
635 this.updateVisibility_(wrapper, '.show-button',
636 isActive && extension.actionButtonHidden);
637
638 // The 'allow in incognito' checkbox. 626 // The 'allow in incognito' checkbox.
639 this.updateVisibility_(wrapper, '.incognito-control', 627 this.updateVisibility_(wrapper, '.incognito-control',
640 isActive && this.incognitoAvailable_, 628 isActive && this.incognitoAvailable_,
641 function(item) { 629 function(item) {
642 var incognito = item.querySelector('input'); 630 var incognito = item.querySelector('input');
643 incognito.disabled = !extension.incognitoAccess.isEnabled; 631 incognito.disabled = !extension.incognitoAccess.isEnabled;
644 incognito.checked = extension.incognitoAccess.isActive; 632 incognito.checked = extension.incognitoAccess.isActive;
645 }); 633 });
646 var showButterBar = isActive && 634 var showButterBar = isActive &&
647 extension.incognitoAccess.isActive && 635 extension.incognitoAccess.isActive &&
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 this.createWrapper_(extension, nextExt ? $(nextExt.id) : null); 1055 this.createWrapper_(extension, nextExt ? $(nextExt.id) : null);
1068 } 1056 }
1069 } 1057 }
1070 }; 1058 };
1071 1059
1072 return { 1060 return {
1073 ExtensionList: ExtensionList, 1061 ExtensionList: ExtensionList,
1074 ExtensionListDelegate: ExtensionListDelegate 1062 ExtensionListDelegate: ExtensionListDelegate
1075 }; 1063 };
1076 }); 1064 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698