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

Unified Diff: chrome/browser/resources/extensions/extensions.js

Issue 406713002: Allow drag-and-drop of zipped extensions on chrome://extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add test Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/extensions/extensions.js
diff --git a/chrome/browser/resources/extensions/extensions.js b/chrome/browser/resources/extensions/extensions.js
index 32e0df1a6061c892af9b5fbe52f4751e7096df33..6d3ac72e82451e87c2b8b56f63f66d28abe8ccf5 100644
--- a/chrome/browser/resources/extensions/extensions.js
+++ b/chrome/browser/resources/extensions/extensions.js
@@ -66,8 +66,10 @@ cr.define('extensions', function() {
}
// Only process files that look like extensions. Other files should
// navigate the browser normally.
- if (!toSend && /\.(crx|user\.js)$/i.test(e.dataTransfer.files[0].name))
+ if (!toSend &&
+ /\.(crx|user\.js|zip)$/i.test(e.dataTransfer.files[0].name)) {
toSend = 'installDroppedFile';
+ }
if (toSend) {
e.preventDefault();
@@ -337,7 +339,7 @@ cr.define('extensions', function() {
ExtensionsList.prototype.data_ = extensionsData;
var extensionList = $('extension-settings-list');
ExtensionsList.decorate(extensionList);
- }
+ };
// Indicate that warning |message| has occured for pack of |crx_path| and
// |pem_path| files. Ask if user wants override the warning. Send
@@ -359,7 +361,7 @@ cr.define('extensions', function() {
},
closeAlert);
ExtensionSettings.showOverlay($('alertOverlay'));
- }
+ };
/**
* Returns the current overlay or null if one does not exist.
@@ -367,7 +369,7 @@ cr.define('extensions', function() {
*/
ExtensionSettings.getCurrentOverlay = function() {
return document.querySelector('#overlay .page.showing');
- }
+ };
/**
* Sets the given overlay to show. This hides whatever overlay is currently
@@ -400,7 +402,7 @@ cr.define('extensions', function() {
overlay.hidden = !node;
uber.invokeMethodOnParent(node ? 'beginInterceptingEvents' :
'stopInterceptingEvents');
- }
+ };
/**
* Utility function to find the width of various UI strings and synchronize
@@ -430,7 +432,7 @@ cr.define('extensions', function() {
' min-width: ' + pxWidth + 'px;' +
'}';
document.querySelector('head').appendChild(style);
- }
+ };
// Export
return {

Powered by Google App Engine
This is Rietveld 408576698