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 18 matching lines...) Expand all Loading... |
29 * profileIsSupervised: boolean, | 29 * profileIsSupervised: boolean, |
30 * promoteAppsDevTools: boolean}} | 30 * promoteAppsDevTools: boolean}} |
31 */ | 31 */ |
32 var ExtensionDataResponse; | 32 var ExtensionDataResponse; |
33 | 33 |
34 // Used for observing function of the backend datasource for this page by | 34 // Used for observing function of the backend datasource for this page by |
35 // tests. | 35 // tests. |
36 var webuiResponded = false; | 36 var webuiResponded = false; |
37 | 37 |
38 cr.define('extensions', function() { | 38 cr.define('extensions', function() { |
39 var ExtensionsList = options.ExtensionsList; | 39 var ExtensionList = extensions.ExtensionList; |
40 | 40 |
41 // Implements the DragWrapper handler interface. | 41 // Implements the DragWrapper handler interface. |
42 var dragWrapperHandler = { | 42 var dragWrapperHandler = { |
43 /** @override */ | 43 /** @override */ |
44 shouldAcceptDrag: function(e) { | 44 shouldAcceptDrag: function(e) { |
45 // We can't access filenames during the 'dragenter' event, so we have to | 45 // We can't access filenames during the 'dragenter' event, so we have to |
46 // wait until 'drop' to decide whether to do something with the file or | 46 // wait until 'drop' to decide whether to do something with the file or |
47 // not. | 47 // not. |
48 // See: http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html#concept-dnd-p | 48 // See: http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html#concept-dnd-p |
49 return (e.dataTransfer.types && | 49 return (e.dataTransfer.types && |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 var devControlsCheckbox = $('toggle-dev-on'); | 332 var devControlsCheckbox = $('toggle-dev-on'); |
333 devControlsCheckbox.checked = extensionsData.developerMode; | 333 devControlsCheckbox.checked = extensionsData.developerMode; |
334 devControlsCheckbox.disabled = supervised; | 334 devControlsCheckbox.disabled = supervised; |
335 | 335 |
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 ExtensionsList.prototype.data_ = extensionsData; | 342 ExtensionList.prototype.data_ = extensionsData; |
343 var extensionList = $('extension-settings-list'); | 343 ExtensionList.decorate($('extension-settings-list')); |
344 ExtensionsList.decorate(extensionList); | |
345 }; | 344 }; |
346 | 345 |
347 // Indicate that warning |message| has occured for pack of |crx_path| and | 346 // Indicate that warning |message| has occured for pack of |crx_path| and |
348 // |pem_path| files. Ask if user wants override the warning. Send | 347 // |pem_path| files. Ask if user wants override the warning. Send |
349 // |overrideFlags| to repeated 'pack' call to accomplish the override. | 348 // |overrideFlags| to repeated 'pack' call to accomplish the override. |
350 ExtensionSettings.askToOverrideWarning = | 349 ExtensionSettings.askToOverrideWarning = |
351 function(message, crx_path, pem_path, overrideFlags) { | 350 function(message, crx_path, pem_path, overrideFlags) { |
352 var closeAlert = function() { | 351 var closeAlert = function() { |
353 ExtensionSettings.showOverlay(null); | 352 ExtensionSettings.showOverlay(null); |
354 }; | 353 }; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 | 461 |
463 // Export | 462 // Export |
464 return { | 463 return { |
465 ExtensionSettings: ExtensionSettings | 464 ExtensionSettings: ExtensionSettings |
466 }; | 465 }; |
467 }); | 466 }); |
468 | 467 |
469 window.addEventListener('load', function(e) { | 468 window.addEventListener('load', function(e) { |
470 extensions.ExtensionSettings.getInstance().initialize(); | 469 extensions.ExtensionSettings.getInstance().initialize(); |
471 }); | 470 }); |
OLD | NEW |