| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 118 |
| 119 /** | 119 /** |
| 120 * True if drag-drop is both available and currently enabled - it can be | 120 * True if drag-drop is both available and currently enabled - it can be |
| 121 * temporarily disabled while overlays are showing. | 121 * temporarily disabled while overlays are showing. |
| 122 * @type {boolean} | 122 * @type {boolean} |
| 123 * @private | 123 * @private |
| 124 */ | 124 */ |
| 125 dragEnabled_: false, | 125 dragEnabled_: false, |
| 126 | 126 |
| 127 /** | 127 /** |
| 128 * Callback for testing purposes. This is called after the "Developer mode" |
| 129 * checkbox is toggled and the div containing developer buttons' height has |
| 130 * been set. |
| 131 * @type {function()?} |
| 132 */ |
| 133 testingDeveloperModeCallback: null, |
| 134 |
| 135 /** |
| 128 * Perform initial setup. | 136 * Perform initial setup. |
| 129 */ | 137 */ |
| 130 initialize: function() { | 138 initialize: function() { |
| 131 uber.onContentFrameLoaded(); | 139 uber.onContentFrameLoaded(); |
| 132 cr.ui.FocusOutlineManager.forDocument(document); | 140 cr.ui.FocusOutlineManager.forDocument(document); |
| 133 measureCheckboxStrings(); | 141 measureCheckboxStrings(); |
| 134 | 142 |
| 135 // Set the title. | 143 // Set the title. |
| 136 uber.setTitle(loadTimeData.getString('extensionSettings')); | 144 uber.setTitle(loadTimeData.getString('extensionSettings')); |
| 137 | 145 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 var buttons = devControls.querySelector('.button-container'); | 344 var buttons = devControls.querySelector('.button-container'); |
| 337 Array.prototype.forEach.call(buttons.querySelectorAll('a, button'), | 345 Array.prototype.forEach.call(buttons.querySelectorAll('a, button'), |
| 338 function(control) { | 346 function(control) { |
| 339 control.tabIndex = showDevControls ? 0 : -1; | 347 control.tabIndex = showDevControls ? 0 : -1; |
| 340 }); | 348 }); |
| 341 buttons.setAttribute('aria-hidden', !showDevControls); | 349 buttons.setAttribute('aria-hidden', !showDevControls); |
| 342 | 350 |
| 343 window.requestAnimationFrame(function() { | 351 window.requestAnimationFrame(function() { |
| 344 devControls.style.height = !showDevControls ? '' : | 352 devControls.style.height = !showDevControls ? '' : |
| 345 buttons.offsetHeight + 'px'; | 353 buttons.offsetHeight + 'px'; |
| 354 |
| 355 if (this.testingDeveloperModeCallback) |
| 356 this.testingDeveloperModeCallback(); |
| 346 }.bind(this)); | 357 }.bind(this)); |
| 347 }, | 358 }, |
| 348 | 359 |
| 349 /** @override */ | 360 /** @override */ |
| 350 onExtensionCountChanged: function() { | 361 onExtensionCountChanged: function() { |
| 351 /** @const */ | 362 /** @const */ |
| 352 var hasExtensions = $('extension-settings-list').getNumExtensions() != 0; | 363 var hasExtensions = $('extension-settings-list').getNumExtensions() != 0; |
| 353 $('no-extensions').hidden = hasExtensions; | 364 $('no-extensions').hidden = hasExtensions; |
| 354 $('extension-list-wrapper').hidden = !hasExtensions; | 365 $('extension-list-wrapper').hidden = !hasExtensions; |
| 355 }, | 366 }, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 // Export | 479 // Export |
| 469 return { | 480 return { |
| 470 ExtensionSettings: ExtensionSettings | 481 ExtensionSettings: ExtensionSettings |
| 471 }; | 482 }; |
| 472 }); | 483 }); |
| 473 | 484 |
| 474 window.addEventListener('load', function(e) { | 485 window.addEventListener('load', function(e) { |
| 475 document.documentElement.classList.add('loading'); | 486 document.documentElement.classList.add('loading'); |
| 476 extensions.ExtensionSettings.getInstance().initialize(); | 487 extensions.ExtensionSettings.getInstance().initialize(); |
| 477 }); | 488 }); |
| OLD | NEW |