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

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

Issue 2668863002: [Extensions] Remove FeatureSwitch::easy_off_store_install (Closed)
Patch Set: Add TODO for histograms Created 3 years, 10 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
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="../../../../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="drag_and_drop_handler.js"> 8 // <include src="drag_and_drop_handler.js">
9 // <include src="extension_code.js"> 9 // <include src="extension_code.js">
10 // <include src="extension_commands_overlay.js"> 10 // <include src="extension_commands_overlay.js">
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 $('load-unpacked').addEventListener('click', function(e) { 103 $('load-unpacked').addEventListener('click', function(e) {
104 chrome.send('metricsHandler:recordAction', 104 chrome.send('metricsHandler:recordAction',
105 ['Options_LoadUnpackedExtension']); 105 ['Options_LoadUnpackedExtension']);
106 extensionLoader.loadUnpacked(); 106 extensionLoader.loadUnpacked();
107 }); 107 });
108 $('pack-extension').addEventListener('click', 108 $('pack-extension').addEventListener('click',
109 this.handlePackExtension_.bind(this)); 109 this.handlePackExtension_.bind(this));
110 $('update-extensions-now').addEventListener('click', 110 $('update-extensions-now').addEventListener('click',
111 this.handleUpdateExtensionNow_.bind(this)); 111 this.handleUpdateExtensionNow_.bind(this));
112 112
113 if (!loadTimeData.getBoolean('offStoreInstallEnabled')) { 113 var dragTarget = document.documentElement;
114 var dragTarget = document.documentElement; 114 /** @private {extensions.DragAndDropHandler} */
115 /** @private {extensions.DragAndDropHandler} */ 115 this.dragWrapperHandler_ =
116 this.dragWrapperHandler_ = 116 new extensions.DragAndDropHandler(true, dragTarget);
117 new extensions.DragAndDropHandler(true, dragTarget); 117 dragTarget.addEventListener('extension-drag-started', function() {
118 dragTarget.addEventListener('extension-drag-started', function() { 118 ExtensionSettings.showOverlay($('drop-target-overlay'));
119 ExtensionSettings.showOverlay($('drop-target-overlay')); 119 });
120 }); 120 dragTarget.addEventListener('extension-drag-ended', function() {
121 dragTarget.addEventListener('extension-drag-ended', function() { 121 var overlay = ExtensionSettings.getCurrentOverlay();
122 var overlay = ExtensionSettings.getCurrentOverlay(); 122 if (overlay && overlay.id === 'drop-target-overlay')
123 if (overlay && overlay.id === 'drop-target-overlay') 123 ExtensionSettings.showOverlay(null);
124 ExtensionSettings.showOverlay(null); 124 });
125 }); 125 this.dragWrapper_ =
126 this.dragWrapper_ = 126 new cr.ui.DragWrapper(dragTarget, this.dragWrapperHandler_);
127 new cr.ui.DragWrapper(dragTarget, this.dragWrapperHandler_);
128 }
129 127
130 extensions.PackExtensionOverlay.getInstance().initializePage(); 128 extensions.PackExtensionOverlay.getInstance().initializePage();
131 129
132 // Hook up the configure commands link to the overlay. 130 // Hook up the configure commands link to the overlay.
133 var link = document.querySelector('.extension-commands-config'); 131 var link = document.querySelector('.extension-commands-config');
134 link.addEventListener('click', 132 link.addEventListener('click',
135 this.handleExtensionCommandsConfig_.bind(this)); 133 this.handleExtensionCommandsConfig_.bind(this));
136 134
137 // Initialize the Commands overlay. 135 // Initialize the Commands overlay.
138 extensions.ExtensionCommandsOverlay.getInstance().initializePage(); 136 extensions.ExtensionCommandsOverlay.getInstance().initializePage();
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 461
464 // Export 462 // Export
465 return { 463 return {
466 ExtensionSettings: ExtensionSettings 464 ExtensionSettings: ExtensionSettings
467 }; 465 };
468 }); 466 });
469 467
470 window.addEventListener('load', function(e) { 468 window.addEventListener('load', function(e) {
471 extensions.ExtensionSettings.getInstance().initialize(); 469 extensions.ExtensionSettings.getInstance().initialize();
472 }); 470 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698