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

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

Issue 196413028: Promote Apps Developer Tools in the chrome:extensions page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 <include src="extension_error_overlay.js"></include> 10 <include src="extension_error_overlay.js"></include>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 this.handleDevControlsTransitionEnd_.bind(this)); 107 this.handleDevControlsTransitionEnd_.bind(this));
108 108
109 // Set up the three dev mode buttons (load unpacked, pack and update). 109 // Set up the three dev mode buttons (load unpacked, pack and update).
110 $('load-unpacked').addEventListener('click', 110 $('load-unpacked').addEventListener('click',
111 this.handleLoadUnpackedExtension_.bind(this)); 111 this.handleLoadUnpackedExtension_.bind(this));
112 $('pack-extension').addEventListener('click', 112 $('pack-extension').addEventListener('click',
113 this.handlePackExtension_.bind(this)); 113 this.handlePackExtension_.bind(this));
114 $('update-extensions-now').addEventListener('click', 114 $('update-extensions-now').addEventListener('click',
115 this.handleUpdateExtensionNow_.bind(this)); 115 this.handleUpdateExtensionNow_.bind(this));
116 116
117 // Set up the close dialog for the apps developer tools promo.
118 this.promoDismissed_ = false;
119 $('apps-developer-tools-promo').querySelector('.close-button')
Dan Beam 2014/04/18 21:27:28 nit: . at end
Devlin 2014/04/18 22:19:55 Whoops, sorry - git cl format is making bad habits
120 .addEventListener('click', function(e) {
121 this.promoDismissed_ = true;
122 $('apps-developer-tools-promo').hidden = true;
123 $('extension-settings').classList.remove('adt-promo');
124 }.bind(this));
125
117 if (!loadTimeData.getBoolean('offStoreInstallEnabled')) { 126 if (!loadTimeData.getBoolean('offStoreInstallEnabled')) {
118 this.dragWrapper_ = new cr.ui.DragWrapper(document.documentElement, 127 this.dragWrapper_ = new cr.ui.DragWrapper(document.documentElement,
119 dragWrapperHandler); 128 dragWrapperHandler);
120 } 129 }
121 130
122 extensions.PackExtensionOverlay.getInstance().initializePage(); 131 extensions.PackExtensionOverlay.getInstance().initializePage();
123 132
124 // Hook up the configure commands link to the overlay. 133 // Hook up the configure commands link to the overlay.
125 var link = document.querySelector('.extension-commands-config'); 134 var link = document.querySelector('.extension-commands-config');
126 link.addEventListener('click', 135 link.addEventListener('click',
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 299
291 if (extensionsData.developerMode) { 300 if (extensionsData.developerMode) {
292 pageDiv.classList.add('dev-mode'); 301 pageDiv.classList.add('dev-mode');
293 $('toggle-dev-on').checked = true; 302 $('toggle-dev-on').checked = true;
294 $('dev-controls').hidden = false; 303 $('dev-controls').hidden = false;
295 } else { 304 } else {
296 pageDiv.classList.remove('dev-mode'); 305 pageDiv.classList.remove('dev-mode');
297 $('toggle-dev-on').checked = false; 306 $('toggle-dev-on').checked = false;
298 } 307 }
299 308
309 if (extensionsData.promoteAppsDevTools && !this.promoDismissed_) {
310 $('apps-developer-tools-promo').hidden = false;
311 pageDiv.classList.add('adt-promo');
Dan Beam 2014/04/18 21:27:28 why are we hiding the promo at all? can't we just
Devlin 2014/04/18 22:19:55 Oh, I guess we can. Nice.
312 } else {
313 $('apps-developer-tools-promo').hidden = true;
314 pageDiv.classList.remove('adt-promo');
315 }
316
300 $('load-unpacked').disabled = extensionsData.loadUnpackedDisabled; 317 $('load-unpacked').disabled = extensionsData.loadUnpackedDisabled;
301 318
302 ExtensionsList.prototype.data_ = extensionsData; 319 ExtensionsList.prototype.data_ = extensionsData;
303 var extensionList = $('extension-settings-list'); 320 var extensionList = $('extension-settings-list');
304 ExtensionsList.decorate(extensionList); 321 ExtensionsList.decorate(extensionList);
305 } 322 }
306 323
307 // Indicate that warning |message| has occured for pack of |crx_path| and 324 // Indicate that warning |message| has occured for pack of |crx_path| and
308 // |pem_path| files. Ask if user wants override the warning. Send 325 // |pem_path| files. Ask if user wants override the warning. Send
309 // |overrideFlags| to repeated 'pack' call to accomplish the override. 326 // |overrideFlags| to repeated 'pack' call to accomplish the override.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 416
400 // Export 417 // Export
401 return { 418 return {
402 ExtensionSettings: ExtensionSettings 419 ExtensionSettings: ExtensionSettings
403 }; 420 };
404 }); 421 });
405 422
406 window.addEventListener('load', function(e) { 423 window.addEventListener('load', function(e) {
407 extensions.ExtensionSettings.getInstance().initialize(); 424 extensions.ExtensionSettings.getInstance().initialize();
408 }); 425 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698