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="../../../../ui/webui/resources/js/cr/ui/focus_row.js"> | 5 <include src="../../../../ui/webui/resources/js/cr/ui/focus_row.js"> |
6 <include src="../../../../ui/webui/resources/js/cr/ui/focus_grid.js"> | 6 <include src="../../../../ui/webui/resources/js/cr/ui/focus_grid.js"> |
7 <include src="../uber/uber_utils.js"> | 7 <include src="../uber/uber_utils.js"> |
8 <include src="extension_code.js"> | 8 <include src="extension_code.js"> |
9 <include src="extension_commands_overlay.js"> | 9 <include src="extension_commands_overlay.js"> |
10 <include src="extension_error_overlay.js"> | 10 <include src="extension_error_overlay.js"> |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
267 profileInfo.appInfoDialogEnabled).then(function() { | 267 profileInfo.appInfoDialogEnabled).then(function() { |
268 // We can get called many times in short order, thus we need to | 268 // We can get called many times in short order, thus we need to |
269 // be careful to remove the 'finished loading' timeout. | 269 // be careful to remove the 'finished loading' timeout. |
270 if (this.loadingTimeout_) | 270 if (this.loadingTimeout_) |
271 window.clearTimeout(this.loadingTimeout_); | 271 window.clearTimeout(this.loadingTimeout_); |
272 document.documentElement.classList.add('loading'); | 272 document.documentElement.classList.add('loading'); |
273 this.loadingTimeout_ = window.setTimeout(function() { | 273 this.loadingTimeout_ = window.setTimeout(function() { |
274 document.documentElement.classList.remove('loading'); | 274 document.documentElement.classList.remove('loading'); |
275 }, 0); | 275 }, 0); |
276 | 276 |
277 /** @const */ | 277 var onHasExtensionsChanged = function() { |
Dan Beam
2015/04/23 18:01:39
onExtensionChanged (or at the very least HaveExten
Devlin
2015/04/23 18:27:31
How about onExtensionCountChanged? (Before, it wa
| |
278 var hasExtensions = extensionList.getNumExtensions() != 0; | 278 /** @const */ |
279 $('no-extensions').hidden = hasExtensions; | 279 var hasExtensions = extensionList.getNumExtensions() != 0; |
280 $('extension-list-wrapper').hidden = !hasExtensions; | 280 $('no-extensions').hidden = hasExtensions; |
281 $('extension-settings-list').updateFocusableElements(); | 281 $('extension-list-wrapper').hidden = !hasExtensions; |
282 $('extension-settings-list').updateFocusableElements(); | |
283 }; | |
Dan Beam
2015/04/23 18:01:38
make this a permanent instance or static method in
Devlin
2015/04/23 18:27:31
Done.
| |
284 extensionList.onHasExtensionsChanged = onHasExtensionsChanged; | |
285 onHasExtensionsChanged(); | |
282 }.bind(this)); | 286 }.bind(this)); |
283 }, | 287 }, |
284 | 288 |
285 /** | 289 /** |
286 * Handles the Pack Extension button. | 290 * Handles the Pack Extension button. |
287 * @param {Event} e Change event. | 291 * @param {Event} e Change event. |
288 * @private | 292 * @private |
289 */ | 293 */ |
290 handlePackExtension_: function(e) { | 294 handlePackExtension_: function(e) { |
291 ExtensionSettings.showOverlay($('pack-extension-overlay')); | 295 ExtensionSettings.showOverlay($('pack-extension-overlay')); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
459 // Export | 463 // Export |
460 return { | 464 return { |
461 ExtensionSettings: ExtensionSettings | 465 ExtensionSettings: ExtensionSettings |
462 }; | 466 }; |
463 }); | 467 }); |
464 | 468 |
465 window.addEventListener('load', function(e) { | 469 window.addEventListener('load', function(e) { |
466 document.documentElement.classList.add('loading'); | 470 document.documentElement.classList.add('loading'); |
467 extensions.ExtensionSettings.getInstance().initialize(); | 471 extensions.ExtensionSettings.getInstance().initialize(); |
468 }); | 472 }); |
OLD | NEW |