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

Unified Diff: chrome/browser/resources/print_preview/search/destination_list.js

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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/print_preview/search/destination_list.js
diff --git a/chrome/browser/resources/print_preview/search/destination_list.js b/chrome/browser/resources/print_preview/search/destination_list.js
index 351d31184980cbe76ca4808d869d0e1ec89238c0..e50e0ec77d0865d20bfac75c2ab1b677fba8b85e 100644
--- a/chrome/browser/resources/print_preview/search/destination_list.js
+++ b/chrome/browser/resources/print_preview/search/destination_list.js
@@ -145,10 +145,10 @@ cr.define('print_preview', function() {
numItems = Math.min(numItems, this.destinations_.length);
var headerHeight =
this.getChildElement('.destination-list > header').offsetHeight;
- return headerHeight + (numItems > 0 ?
- numItems * DestinationList.HEIGHT_OF_ITEM_ :
- // To account for "No destinations found" message.
- DestinationList.HEIGHT_OF_ITEM_);
+ return headerHeight +
+ (numItems > 0 ? numItems * DestinationList.HEIGHT_OF_ITEM_ :
+ // To account for "No destinations found" message.
+ DestinationList.HEIGHT_OF_ITEM_);
},
/**
@@ -181,8 +181,8 @@ cr.define('print_preview', function() {
/** @override */
createDom: function() {
- this.setElementInternal(this.cloneTemplateInternal(
- 'destination-list-template'));
+ this.setElementInternal(
+ this.cloneTemplateInternal('destination-list-template'));
this.getChildElement('.title').textContent = this.title_;
if (this.actionLinkLabel_) {
var actionLinkEl = this.getChildElement('.action-link');
@@ -195,12 +195,10 @@ cr.define('print_preview', function() {
enterDocument: function() {
print_preview.Component.prototype.enterDocument.call(this);
this.tracker.add(
- this.getChildElement('.action-link'),
- 'click',
+ this.getChildElement('.action-link'), 'click',
this.onActionLinkClick_.bind(this));
this.tracker.add(
- this.getChildElement('.show-all-button'),
- 'click',
+ this.getChildElement('.show-all-button'), 'click',
this.setIsShowAll.bind(this, true));
},
@@ -265,8 +263,9 @@ cr.define('print_preview', function() {
*/
renderDestinationsList_: function(destinations) {
// Update item counters, footers and other misc controls.
- setIsVisible(this.getChildElement('.no-destinations-message'),
- destinations.length == 0);
+ setIsVisible(
+ this.getChildElement('.no-destinations-message'),
+ destinations.length == 0);
setIsVisible(this.getChildElement('.destination-list > footer'), false);
var numItems = destinations.length;
if (destinations.length > this.shortListSize_ && !this.isShowAll_) {
@@ -352,13 +351,11 @@ cr.define('print_preview', function() {
* @private
*/
onActionLinkClick_: function() {
- cr.dispatchSimpleEvent(this,
- DestinationList.EventType.ACTION_LINK_ACTIVATED);
+ cr.dispatchSimpleEvent(
+ this, DestinationList.EventType.ACTION_LINK_ACTIVATED);
}
};
// Export
- return {
- DestinationList: DestinationList
- };
+ return {DestinationList: DestinationList};
});

Powered by Google App Engine
This is Rietveld 408576698