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

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

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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/extension_options_overlay.js
diff --git a/chrome/browser/resources/extensions/extension_options_overlay.js b/chrome/browser/resources/extensions/extension_options_overlay.js
index 73aac3ed618f819ec22b2a4f844e58e0095cd2e4..f50ce00de6b7359b55242c83ca9e3cf88603f942 100644
--- a/chrome/browser/resources/extensions/extension_options_overlay.js
+++ b/chrome/browser/resources/extensions/extension_options_overlay.js
@@ -75,8 +75,8 @@ cr.define('extensions', function() {
* @private
*/
getExtensionOptions_: function() {
- return $('extension-options-overlay-guest').querySelector(
- 'extensionoptions');
+ return $('extension-options-overlay-guest')
+ .querySelector('extensionoptions');
},
/**
@@ -107,10 +107,8 @@ cr.define('extensions', function() {
* chrome/renderer/resources/extensions/extension_options.js
* to dependencies.
*/
- setExtensionAndShow: function(extensionId,
- extensionName,
- extensionIcon,
- shownCallback) {
+ setExtensionAndShow: function(
+ extensionId, extensionName, extensionIcon, shownCallback) {
var overlay = $('extension-options-overlay');
var overlayHeader = $('extension-options-overlay-header');
var overlayGuest = $('extension-options-overlay-guest');
@@ -130,8 +128,8 @@ cr.define('extensions', function() {
// maxHeight, but the maxHeight does not include our header height (title
// and close button), so we need to subtract that to get the maxHeight
// for the extension options.
- var maxHeight = parseInt(overlayStyle.maxHeight, 10) -
- overlayHeader.offsetHeight;
+ var maxHeight =
+ parseInt(overlayStyle.maxHeight, 10) - overlayHeader.offsetHeight;
var minWidth = parseInt(overlayStyle.minWidth, 10);
extensionoptions.onclose = function() {
@@ -171,21 +169,22 @@ cr.define('extensions', function() {
// 0.25 ms/px.
var loading = document.documentElement.classList.contains('loading');
var animationTime = loading ? 0 :
- 0.25 * Math.sqrt(Math.pow(newOverlayWidth - oldOverlayWidth, 2) +
- Math.pow(newOverlayHeight - oldOverlayHeight, 2));
+ 0.25 *
+ Math.sqrt(
+ Math.pow(newOverlayWidth - oldOverlayWidth, 2) +
+ Math.pow(newOverlayHeight - oldOverlayHeight, 2));
if (animation)
animation.cancel();
// The header height must be added to the (old and new) preferred
// heights to get the full overlay heights.
- animation = overlay.animate([
- {width: oldOverlayWidth + 'px', height: oldOverlayHeight + 'px'},
- {width: newOverlayWidth + 'px', height: newOverlayHeight + 'px'}
- ], {
- duration: animationTime,
- delay: 0
- });
+ animation = overlay.animate(
+ [
+ {width: oldOverlayWidth + 'px', height: oldOverlayHeight + 'px'},
+ {width: newOverlayWidth + 'px', height: newOverlayHeight + 'px'}
+ ],
+ {duration: animationTime, delay: 0});
animation.onfinish = function(e) {
animation = null;
@@ -244,14 +243,13 @@ cr.define('extensions', function() {
* @private
*/
setVisible_: function(isVisible) {
- this.showOverlay_(isVisible ?
- /** @type {HTMLDivElement} */($('extension-options-overlay')) :
- null);
+ this.showOverlay_(
+ isVisible ?
+ /** @type {HTMLDivElement} */ ($('extension-options-overlay')) :
+ null);
}
};
// Export
- return {
- ExtensionOptionsOverlay: ExtensionOptionsOverlay
- };
+ return {ExtensionOptionsOverlay: ExtensionOptionsOverlay};
});

Powered by Google App Engine
This is Rietveld 408576698