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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 var instance = ExtensionSettings.getInstance(); | 336 var instance = ExtensionSettings.getInstance(); |
337 instance.displayPromo_ = extensionsData.promoteAppsDevTools; | 337 instance.displayPromo_ = extensionsData.promoteAppsDevTools; |
338 instance.updateDevControlsVisibility_(false); | 338 instance.updateDevControlsVisibility_(false); |
339 | 339 |
340 $('load-unpacked').disabled = extensionsData.loadUnpackedDisabled; | 340 $('load-unpacked').disabled = extensionsData.loadUnpackedDisabled; |
341 | 341 |
342 ExtensionList.prototype.data_ = extensionsData; | 342 ExtensionList.prototype.data_ = extensionsData; |
343 ExtensionList.decorate($('extension-settings-list')); | 343 ExtensionList.decorate($('extension-settings-list')); |
344 }; | 344 }; |
345 | 345 |
346 // Indicate that warning |message| has occured for pack of |crx_path| and | |
347 // |pem_path| files. Ask if user wants override the warning. Send | |
348 // |overrideFlags| to repeated 'pack' call to accomplish the override. | |
349 ExtensionSettings.askToOverrideWarning = | |
350 function(message, crx_path, pem_path, overrideFlags) { | |
351 var closeAlert = function() { | |
352 ExtensionSettings.showOverlay(null); | |
353 }; | |
354 | |
355 alertOverlay.setValues( | |
356 loadTimeData.getString('packExtensionWarningTitle'), | |
357 message, | |
358 loadTimeData.getString('packExtensionProceedAnyway'), | |
359 loadTimeData.getString('cancel'), | |
360 function() { | |
361 chrome.send('pack', [crx_path, pem_path, overrideFlags]); | |
362 closeAlert(); | |
363 }, | |
364 closeAlert); | |
365 ExtensionSettings.showOverlay($('alertOverlay')); | |
366 }; | |
367 | |
368 /** | 346 /** |
369 * Returns the current overlay or null if one does not exist. | 347 * Returns the current overlay or null if one does not exist. |
370 * @return {Element} The overlay element. | 348 * @return {Element} The overlay element. |
371 */ | 349 */ |
372 ExtensionSettings.getCurrentOverlay = function() { | 350 ExtensionSettings.getCurrentOverlay = function() { |
373 return document.querySelector('#overlay .page.showing'); | 351 return document.querySelector('#overlay .page.showing'); |
374 }; | 352 }; |
375 | 353 |
376 /** | 354 /** |
377 * Sets the given overlay to show. This hides whatever overlay is currently | 355 * Sets the given overlay to show. This hides whatever overlay is currently |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 439 |
462 // Export | 440 // Export |
463 return { | 441 return { |
464 ExtensionSettings: ExtensionSettings | 442 ExtensionSettings: ExtensionSettings |
465 }; | 443 }; |
466 }); | 444 }); |
467 | 445 |
468 window.addEventListener('load', function(e) { | 446 window.addEventListener('load', function(e) { |
469 extensions.ExtensionSettings.getInstance().initialize(); | 447 extensions.ExtensionSettings.getInstance().initialize(); |
470 }); | 448 }); |
OLD | NEW |