Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/browser/resources/extensions/extensions.js

Issue 10449008: Allow user script install by dragging onto chrome://extensions/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use correct base Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/install_extension_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/install_extension_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698