OLD | NEW |
---|---|
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 /** | 7 /** |
8 * The type of the extension data object. The definition is based on | 8 * The type of the extension data object. The definition is based on |
9 * chrome/browser/ui/webui/extensions/extension_basic_info.cc | 9 * chrome/browser/ui/webui/extensions/extension_basic_info.cc |
10 * and | 10 * and |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
459 trash.classList.add('open'); | 459 trash.classList.add('open'); |
460 trash.classList.toggle('mouse-clicked', e.detail > 0); | 460 trash.classList.toggle('mouse-clicked', e.detail > 0); |
461 if (this.uninstallIsShowing_) | 461 if (this.uninstallIsShowing_) |
462 return; | 462 return; |
463 this.uninstallIsShowing_ = true; | 463 this.uninstallIsShowing_ = true; |
464 chrome.management.uninstall(extension.id, | 464 chrome.management.uninstall(extension.id, |
465 {showConfirmDialog: true}, | 465 {showConfirmDialog: true}, |
466 function() { | 466 function() { |
467 // TODO(devlin): What should we do if the uninstall fails? | 467 // TODO(devlin): What should we do if the uninstall fails? |
468 this.uninstallIsShowing_ = false; | 468 this.uninstallIsShowing_ = false; |
469 if (trash.classList.contains('mouse-clicked')) | |
470 trash.blur(); | |
471 if (chrome.extension.lastError) | |
Devlin
2015/03/03 00:17:40
Maybe a comment like:
// chrome.extension.lastErro
Dan Beam
2015/03/03 00:25:43
Added comment to that effect.
| |
472 trash.classList.remove('open'); | |
469 }.bind(this)); | 473 }.bind(this)); |
470 }.bind(this)); | 474 }.bind(this)); |
471 row.querySelector('.enable-controls').appendChild(trash); | 475 row.querySelector('.enable-controls').appendChild(trash); |
472 | 476 |
473 // Developer mode //////////////////////////////////////////////////////// | 477 // Developer mode //////////////////////////////////////////////////////// |
474 | 478 |
475 // The path, if provided by unpacked extension. | 479 // The path, if provided by unpacked extension. |
476 row.setupColumn('.load-path a:first-of-type', 'dev-loadPath', 'click', | 480 row.setupColumn('.load-path a:first-of-type', 'dev-loadPath', 'click', |
477 function(e) { | 481 function(e) { |
478 chrome.send('extensionSettingsShowPath', [String(extension.id)]); | 482 chrome.send('extensionSettingsShowPath', [String(extension.id)]); |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
892 self.optionsShown_ = false; | 896 self.optionsShown_ = false; |
893 $('overlay').removeEventListener('cancelOverlay', f); | 897 $('overlay').removeEventListener('cancelOverlay', f); |
894 }); | 898 }); |
895 | 899 |
896 // TODO(dbeam): why do we need to focus <extensionoptions> before and | 900 // TODO(dbeam): why do we need to focus <extensionoptions> before and |
897 // after its showing animation? Makes very little sense to me. | 901 // after its showing animation? Makes very little sense to me. |
898 overlay.setInitialFocus(); | 902 overlay.setInitialFocus(); |
899 }, | 903 }, |
900 }; | 904 }; |
901 | 905 |
902 ExtensionList.uninstallCancel = function() { | |
903 var trash = document.querySelector('.trash.open'); | |
904 if (trash.classList.contains('mouse-clicked')) | |
905 trash.blur(); | |
906 trash.classList.remove('open'); | |
907 }; | |
908 | |
909 return { | 906 return { |
910 ExtensionList: ExtensionList | 907 ExtensionList: ExtensionList |
911 }; | 908 }; |
912 }); | 909 }); |
OLD | NEW |