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

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

Issue 10382025: Revert 135525 - Add a first-class off-store install UI to chrome://extensions/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
===================================================================
--- chrome/browser/resources/extensions/extensions.js (revision 135527)
+++ chrome/browser/resources/extensions/extensions.js (working copy)
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-<include src="../shared/js/cr/ui/drag_wrapper.js"></include>
<include src="../uber/uber_utils.js"></include>
<include src="extension_list.js"></include>
<include src="pack_extension_overlay.js"></include>
@@ -14,45 +13,6 @@
cr.define('extensions', function() {
var ExtensionsList = options.ExtensionsList;
- // Implements the DragWrapper handler interface.
- var dragWrapperHandler = {
- // @inheritdoc
- shouldAcceptDrag: function(e) {
- // We can't access filenames during the 'dragenter' event, so we have to
- // wait until 'drop' to decide whether to do something with the file or
- // not.
- // See: http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html#concept-dnd-p
- return e.dataTransfer.types.indexOf('Files') > -1;
- },
- // @inheritdoc
- doDragEnter: function() {
- chrome.send('startDrag');
- ExtensionSettings.showOverlay(null);
- ExtensionSettings.showOverlay($('dropTargetOverlay'));
- },
- // @inheritdoc
- doDragLeave: function() {
- ExtensionSettings.showOverlay(null);
- chrome.send('stopDrag');
- },
- // @inheritdoc
- doDragOver: function(e) {
- },
- // @inheritdoc
- doDrop: function(e) {
- // Only process files that look like extensions. Other files should
- // navigate the browser normally.
- if (!e.dataTransfer.files.length ||
- !/\.crx$/.test(e.dataTransfer.files[0].name)) {
- return;
- }
-
- chrome.send('installDroppedFile');
- ExtensionSettings.showOverlay(null);
- e.preventDefault();
- }
- };
-
/**
* ExtensionSettings class
* @class
@@ -93,15 +53,8 @@
$('update-extensions-now').addEventListener('click',
this.handleUpdateExtensionNow_.bind(this));
- if (!loadTimeData.getBoolean('offStoreInstallEnabled')) {
- this.dragWrapper_ =
- new cr.ui.DragWrapper(document.body, dragWrapperHandler);
- }
-
var packExtensionOverlay = extensions.PackExtensionOverlay.getInstance();
packExtensionOverlay.initializePage();
-
- cr.ui.overlay.setupOverlay($('dropTargetOverlay'));
},
/**
« no previous file with comments | « chrome/browser/resources/extensions/extensions.html ('k') | chrome/browser/ui/webui/extensions/extensions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698