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 // ExtensionFocusRow: | 8 // ExtensionFocusRow: |
9 | 9 |
10 /** | 10 /** |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
734 row.classList.toggle('developer-extras', hasDependents); | 734 row.classList.toggle('developer-extras', hasDependents); |
735 this.updateVisibility_(row, '.dependent-extensions-message', | 735 this.updateVisibility_(row, '.dependent-extensions-message', |
736 hasDependents, function(item) { | 736 hasDependents, function(item) { |
737 var dependentList = item.querySelector('ul'); | 737 var dependentList = item.querySelector('ul'); |
738 dependentList.textContent = ''; | 738 dependentList.textContent = ''; |
739 var dependentTemplate = $('template-collection').querySelector( | 739 var dependentTemplate = $('template-collection').querySelector( |
740 '.dependent-list-item'); | 740 '.dependent-list-item'); |
741 extension.dependentExtensions.forEach(function(dependentId) { | 741 extension.dependentExtensions.forEach(function(dependentId) { |
742 var dependentExtension = null; | 742 var dependentExtension = null; |
743 for (var i = 0; i < this.extensions_.length; ++i) { | 743 for (var i = 0; i < this.extensions_.length; ++i) { |
744 if (this.extensions_[i].id == dependentId) { | 744 if (this.extensions_[i].id == dependentId) { |
Devlin
2015/03/24 17:52:25
closure compiler, why you no help me?
Tyler Breisacher (Chromium)
2015/03/24 18:20:14
Without looking too deeply, my guess is that this
Tyler Breisacher (Chromium)
2015/03/24 18:22:45
Er, I guess it's from 735 to 759 but you know what
| |
745 dependentExtension = this.extensions_[i]; | 745 dependentExtension = this.extensions_[i]; |
746 break; | 746 break; |
747 } | 747 } |
748 } | 748 } |
749 if (!dependentExtension) | 749 if (!dependentExtension) |
750 return; | 750 return; |
751 | 751 |
752 var depNode = dependentTemplate.cloneNode(true); | 752 var depNode = dependentTemplate.cloneNode(true); |
753 depNode.querySelector('.dep-extension-title').textContent = | 753 depNode.querySelector('.dep-extension-title').textContent = |
754 dependentExtension.name; | 754 dependentExtension.name; |
755 depNode.querySelector('.dep-extension-id').textContent = | 755 depNode.querySelector('.dep-extension-id').textContent = |
756 dependentExtension.id; | 756 dependentExtension.id; |
757 dependentList.appendChild(depNode); | 757 dependentList.appendChild(depNode); |
758 }, this); | 758 }, this); |
759 }); | 759 }.bind(this)); |
760 | 760 |
761 // The active views. | 761 // The active views. |
762 this.updateVisibility_(row, '.active-views', extension.views.length > 0, | 762 this.updateVisibility_(row, '.active-views', extension.views.length > 0, |
763 function(item) { | 763 function(item) { |
764 var link = item.querySelector('a'); | 764 var link = item.querySelector('a'); |
765 | 765 |
766 // Link needs to be an only child before the list is updated. | 766 // Link needs to be an only child before the list is updated. |
767 while (link.nextElementSibling) | 767 while (link.nextElementSibling) |
768 item.removeChild(link.nextElementSibling); | 768 item.removeChild(link.nextElementSibling); |
769 | 769 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
974 // TODO(dbeam): why do we need to focus <extensionoptions> before and | 974 // TODO(dbeam): why do we need to focus <extensionoptions> before and |
975 // after its showing animation? Makes very little sense to me. | 975 // after its showing animation? Makes very little sense to me. |
976 overlay.setInitialFocus(); | 976 overlay.setInitialFocus(); |
977 }, | 977 }, |
978 }; | 978 }; |
979 | 979 |
980 return { | 980 return { |
981 ExtensionList: ExtensionList | 981 ExtensionList: ExtensionList |
982 }; | 982 }; |
983 }); | 983 }); |
OLD | NEW |