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

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

Issue 1049483003: [Extensions] Update extensions UI to observe events and add test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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="../../../../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="extension_code.js"> 8 <include src="extension_code.js">
9 <include src="extension_commands_overlay.js"> 9 <include src="extension_commands_overlay.js">
10 <include src="extension_error_overlay.js"> 10 <include src="extension_error_overlay.js">
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 342
343 $('load-unpacked').disabled = extensionsData.loadUnpackedDisabled; 343 $('load-unpacked').disabled = extensionsData.loadUnpackedDisabled;
344 var extensionList = $('extension-settings-list'); 344 var extensionList = $('extension-settings-list');
345 extensionList.updateExtensionsData( 345 extensionList.updateExtensionsData(
346 extensionsData.incognitoAvailable, 346 extensionsData.incognitoAvailable,
347 extensionsData.enableAppInfoDialog).then(function() { 347 extensionsData.enableAppInfoDialog).then(function() {
348 // We can get called many times in short order, thus we need to 348 // We can get called many times in short order, thus we need to
349 // be careful to remove the 'finished loading' timeout. 349 // be careful to remove the 'finished loading' timeout.
350 if (this.loadingTimeout_) 350 if (this.loadingTimeout_)
351 window.clearTimeout(this.loadingTimeout_); 351 window.clearTimeout(this.loadingTimeout_);
352 document.documentElement.classList.add('loading');
353 this.loadingTimeout_ = window.setTimeout(function() { 352 this.loadingTimeout_ = window.setTimeout(function() {
354 document.documentElement.classList.remove('loading'); 353 document.documentElement.classList.remove('loading');
355 }, 0); 354 }, 0);
356 355
357 var hasExtensions = extensionList.getNumExtensions() != 0; 356 var hasExtensions = extensionList.getNumExtensions() != 0;
358 $('no-extensions').hidden = hasExtensions; 357 $('no-extensions').hidden = hasExtensions;
359 $('extension-list-wrapper').hidden = !hasExtensions; 358 $('extension-list-wrapper').hidden = !hasExtensions;
360 $('extension-settings-list').updateFocusableElements(); 359 $('extension-settings-list').updateFocusableElements();
361 }.bind(this)); 360 }.bind(this));
362 }; 361 };
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 document.querySelector('head').appendChild(style); 463 document.querySelector('head').appendChild(style);
465 }; 464 };
466 465
467 // Export 466 // Export
468 return { 467 return {
469 ExtensionSettings: ExtensionSettings 468 ExtensionSettings: ExtensionSettings
470 }; 469 };
471 }); 470 });
472 471
473 window.addEventListener('load', function(e) { 472 window.addEventListener('load', function(e) {
473 document.documentElement.classList.add('loading');
474 extensions.ExtensionSettings.getInstance().initialize(); 474 extensions.ExtensionSettings.getInstance().initialize();
475 }); 475 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698