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="../shared/js/cr/ui/drag_wrapper.js"></include> | 5 <include src="../shared/js/cr/ui/drag_wrapper.js"></include> |
6 <include src="../uber/uber_utils.js"></include> | 6 <include src="../uber/uber_utils.js"></include> |
7 <include src="extension_commands_overlay.js"></include> | 7 <include src="extension_commands_overlay.js"></include> |
8 <include src="extension_list.js"></include> | 8 <include src="extension_list.js"></include> |
9 <include src="pack_extension_overlay.js"></include> | 9 <include src="pack_extension_overlay.js"></include> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 chrome.send('stopDrag'); | 37 chrome.send('stopDrag'); |
38 }, | 38 }, |
39 // @inheritdoc | 39 // @inheritdoc |
40 doDragOver: function(e) { | 40 doDragOver: function(e) { |
41 }, | 41 }, |
42 // @inheritdoc | 42 // @inheritdoc |
43 doDrop: function(e) { | 43 doDrop: function(e) { |
44 // Only process files that look like extensions. Other files should | 44 // Only process files that look like extensions. Other files should |
45 // navigate the browser normally. | 45 // navigate the browser normally. |
46 if (!e.dataTransfer.files.length || | 46 if (!e.dataTransfer.files.length || |
47 !/\.crx$/.test(e.dataTransfer.files[0].name)) { | 47 !/\.(crx|user\.js)$/.test(e.dataTransfer.files[0].name)) { |
48 return; | 48 return; |
49 } | 49 } |
50 | 50 |
51 chrome.send('installDroppedFile'); | 51 chrome.send('installDroppedFile'); |
52 ExtensionSettings.showOverlay(null); | 52 ExtensionSettings.showOverlay(null); |
53 e.preventDefault(); | 53 e.preventDefault(); |
54 } | 54 } |
55 }; | 55 }; |
56 | 56 |
57 /** | 57 /** |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 return { | 311 return { |
312 ExtensionSettings: ExtensionSettings | 312 ExtensionSettings: ExtensionSettings |
313 }; | 313 }; |
314 }); | 314 }); |
315 | 315 |
316 var ExtensionSettings = extensions.ExtensionSettings; | 316 var ExtensionSettings = extensions.ExtensionSettings; |
317 | 317 |
318 window.addEventListener('load', function(e) { | 318 window.addEventListener('load', function(e) { |
319 ExtensionSettings.getInstance().initialize(); | 319 ExtensionSettings.getInstance().initialize(); |
320 }); | 320 }); |
OLD | NEW |