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

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

Issue 22849012: Update WebUI calls to use extensions namespace, update IDs in c/b/r/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change all HTML IDs in c/b/r/extensions to be in-hyphenated-case Created 7 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 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="../uber/uber_utils.js"></include> 5 <include src="../uber/uber_utils.js"></include>
6 <include src="extension_commands_overlay.js"></include> 6 <include src="extension_commands_overlay.js"></include>
7 <include src="extension_focus_manager.js"></include> 7 <include src="extension_focus_manager.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 16 matching lines...) Expand all
27 // wait until 'drop' to decide whether to do something with the file or 27 // wait until 'drop' to decide whether to do something with the file or
28 // not. 28 // not.
29 // See: http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html#concept-dnd-p 29 // See: http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html#concept-dnd-p
30 return (e.dataTransfer.types && 30 return (e.dataTransfer.types &&
31 e.dataTransfer.types.indexOf('Files') > -1); 31 e.dataTransfer.types.indexOf('Files') > -1);
32 }, 32 },
33 /** @override */ 33 /** @override */
34 doDragEnter: function() { 34 doDragEnter: function() {
35 chrome.send('startDrag'); 35 chrome.send('startDrag');
36 ExtensionSettings.showOverlay(null); 36 ExtensionSettings.showOverlay(null);
37 ExtensionSettings.showOverlay($('dropTargetOverlay')); 37 ExtensionSettings.showOverlay($('drop-target-overlay'));
38 }, 38 },
39 /** @override */ 39 /** @override */
40 doDragLeave: function() { 40 doDragLeave: function() {
41 ExtensionSettings.showOverlay(null); 41 ExtensionSettings.showOverlay(null);
42 chrome.send('stopDrag'); 42 chrome.send('stopDrag');
43 }, 43 },
44 /** @override */ 44 /** @override */
45 doDragOver: function(e) { 45 doDragOver: function(e) {
46 e.preventDefault(); 46 e.preventDefault();
47 }, 47 },
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 kioskOverlay.initialize(); 139 kioskOverlay.initialize();
140 140
141 $('add-kiosk-app').addEventListener('click', function() { 141 $('add-kiosk-app').addEventListener('click', function() {
142 ExtensionSettings.showOverlay($('kiosk-apps-page')); 142 ExtensionSettings.showOverlay($('kiosk-apps-page'));
143 kioskOverlay.didShowPage(); 143 kioskOverlay.didShowPage();
144 }); 144 });
145 145
146 extensions.KioskDisableBailoutConfirm.getInstance().initialize(); 146 extensions.KioskDisableBailoutConfirm.getInstance().initialize();
147 } 147 }
148 148
149 cr.ui.overlay.setupOverlay($('dropTargetOverlay')); 149 cr.ui.overlay.setupOverlay($('drop-target-overlay'));
150 cr.ui.overlay.globalInitialization(); 150 cr.ui.overlay.globalInitialization();
151 151
152 extensions.ExtensionFocusManager.getInstance().initialize(); 152 extensions.ExtensionFocusManager.getInstance().initialize();
153 153
154 var path = document.location.pathname; 154 var path = document.location.pathname;
155 if (path.length > 1) { 155 if (path.length > 1) {
156 // Skip starting slash and remove trailing slash (if any). 156 // Skip starting slash and remove trailing slash (if any).
157 var overlayName = path.slice(1).replace(/\/$/, ''); 157 var overlayName = path.slice(1).replace(/\/$/, '');
158 if (overlayName == 'configureCommands') 158 if (overlayName == 'configureCommands')
159 this.showExtensionCommandsConfigUi_(); 159 this.showExtensionCommandsConfigUi_();
(...skipping 10 matching lines...) Expand all
170 handleLoadUnpackedExtension_: function(e) { 170 handleLoadUnpackedExtension_: function(e) {
171 chrome.send('extensionSettingsLoadUnpackedExtension'); 171 chrome.send('extensionSettingsLoadUnpackedExtension');
172 }, 172 },
173 173
174 /** 174 /**
175 * Handles the Pack Extension button. 175 * Handles the Pack Extension button.
176 * @param {Event} e Change event. 176 * @param {Event} e Change event.
177 * @private 177 * @private
178 */ 178 */
179 handlePackExtension_: function(e) { 179 handlePackExtension_: function(e) {
180 ExtensionSettings.showOverlay($('packExtensionOverlay')); 180 ExtensionSettings.showOverlay($('pack-extension-overlay'));
181 chrome.send('metricsHandler:recordAction', ['Options_PackExtension']); 181 chrome.send('metricsHandler:recordAction', ['Options_PackExtension']);
182 }, 182 },
183 183
184 /** 184 /**
185 * Shows the Extension Commands configuration UI. 185 * Shows the Extension Commands configuration UI.
186 * @param {Event} e Change event. 186 * @param {Event} e Change event.
187 * @private 187 * @private
188 */ 188 */
189 showExtensionCommandsConfigUi_: function(e) { 189 showExtensionCommandsConfigUi_: function(e) {
190 ExtensionSettings.showOverlay($('extensionCommandsOverlay')); 190 ExtensionSettings.showOverlay($('extension-commands-overlay'));
191 chrome.send('metricsHandler:recordAction', 191 chrome.send('metricsHandler:recordAction',
192 ['Options_ExtensionCommands']); 192 ['Options_ExtensionCommands']);
193 }, 193 },
194 194
195 /** 195 /**
196 * Handles the Configure (Extension) Commands link. 196 * Handles the Configure (Extension) Commands link.
197 * @param {Event} e Change event. 197 * @param {Event} e Change event.
198 * @private 198 * @private
199 */ 199 */
200 handleExtensionCommandsConfig_: function(e) { 200 handleExtensionCommandsConfig_: function(e) {
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 '}'; 402 '}';
403 document.querySelector('head').appendChild(style); 403 document.querySelector('head').appendChild(style);
404 } 404 }
405 405
406 // Export 406 // Export
407 return { 407 return {
408 ExtensionSettings: ExtensionSettings 408 ExtensionSettings: ExtensionSettings
409 }; 409 };
410 }); 410 });
411 411
412 var ExtensionSettings = extensions.ExtensionSettings;
413
414 window.addEventListener('load', function(e) { 412 window.addEventListener('load', function(e) {
415 ExtensionSettings.getInstance().initialize(); 413 extensions.ExtensionSettings.getInstance().initialize();
416 }); 414 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/extensions/extensions.html ('k') | chrome/browser/resources/extensions/pack_extension_overlay.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698