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

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

Issue 1920153002: Fix an issue in checkbox handler to enable extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 chrome.developerPrivate.reload(extension.id, {failQuietly: true}); 540 chrome.developerPrivate.reload(extension.id, {failQuietly: true});
541 }); 541 });
542 542
543 // The 'Repair' corrupted link. 543 // The 'Repair' corrupted link.
544 wrapper.setupColumn('repair', '.corrupted-repair-button', 'click', 544 wrapper.setupColumn('repair', '.corrupted-repair-button', 'click',
545 function(e) { 545 function(e) {
546 chrome.developerPrivate.repairExtension(extension.id); 546 chrome.developerPrivate.repairExtension(extension.id);
547 }); 547 });
548 548
549 // The 'Enabled' checkbox. 549 // The 'Enabled' checkbox.
550 wrapper.setupColumn('enabled', '.enable-checkbox input', 'change', 550 wrapper.setupColumn('enabled', '.enable-checkbox input', 'click',
551 function(e) { 551 function(e) {
552 var checked = e.target.checked; 552 var checked = e.target.checked;
553 // TODO(devlin): What should we do if this fails? 553 // Even if this fails, e.preventDefault() call below would keep stuff
Devlin 2016/04/27 13:52:01 nit: I think this isn't entirely addressed - the s
lazyboy 2016/04/27 22:12:55 Ah, got it. I've also updated the document to say
554 // consistent.
554 chrome.management.setEnabled(extension.id, checked); 555 chrome.management.setEnabled(extension.id, checked);
555 556
556 // This may seem counter-intuitive (to not set/clear the checkmark) 557 // This may seem counter-intuitive (to not set/clear the checkmark)
557 // but this page will be updated asynchronously if the extension 558 // but this page will be updated asynchronously if the extension
558 // becomes enabled/disabled. It also might not become enabled or 559 // becomes enabled/disabled. It also might not become enabled or
559 // disabled, because the user might e.g. get prompted when enabling 560 // disabled, because the user might e.g. get prompted when enabling
560 // and choose not to. 561 // and choose not to.
561 e.preventDefault(); 562 e.preventDefault();
562 }); 563 });
563 564
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 this.createWrapper_(extension, nextExt ? $(nextExt.id) : null); 1076 this.createWrapper_(extension, nextExt ? $(nextExt.id) : null);
1076 } 1077 }
1077 } 1078 }
1078 }; 1079 };
1079 1080
1080 return { 1081 return {
1081 ExtensionList: ExtensionList, 1082 ExtensionList: ExtensionList,
1082 ExtensionListDelegate: ExtensionListDelegate 1083 ExtensionListDelegate: ExtensionListDelegate
1083 }; 1084 };
1084 }); 1085 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698