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

Unified Diff: chrome/browser/resources/print_preview/settings/more_settings.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/settings/more_settings.js
diff --git a/chrome/browser/resources/print_preview/settings/more_settings.js b/chrome/browser/resources/print_preview/settings/more_settings.js
index c8e366286cda79a06882163febcd3d554db3a711..b7e6d7ce89b39c7854f9a33049a9ef216521f556 100644
--- a/chrome/browser/resources/print_preview/settings/more_settings.js
+++ b/chrome/browser/resources/print_preview/settings/more_settings.js
@@ -43,10 +43,7 @@ cr.define('print_preview', function() {
* Which settings are visible to the user.
* @enum {number}
*/
- MoreSettings.SettingsToShow = {
- MOST_POPULAR: 1,
- ALL: 2
- };
+ MoreSettings.SettingsToShow = {MOST_POPULAR: 1, ALL: 2};
MoreSettings.prototype = {
__proto__: print_preview.Component.prototype,
@@ -66,9 +63,8 @@ cr.define('print_preview', function() {
print_preview.DestinationStore.EventType.DESTINATION_SELECT,
this.onDestinationChanged_.bind(this));
this.tracker.add(
- this.destinationStore_,
- print_preview.DestinationStore.EventType.
- SELECTED_DESTINATION_CAPABILITIES_READY,
+ this.destinationStore_, print_preview.DestinationStore.EventType
+ .SELECTED_DESTINATION_CAPABILITIES_READY,
this.onDestinationCapabilitiesReady_.bind(this));
this.settingsSections_.forEach(function(section) {
this.tracker.add(
@@ -88,12 +84,15 @@ cr.define('print_preview', function() {
onClick_: function() {
this.settingsToShow_ =
this.settingsToShow_ == MoreSettings.SettingsToShow.MOST_POPULAR ?
- MoreSettings.SettingsToShow.ALL :
- MoreSettings.SettingsToShow.MOST_POPULAR;
+ MoreSettings.SettingsToShow.ALL :
+ MoreSettings.SettingsToShow.MOST_POPULAR;
this.updateState_(false);
- this.metrics_.record(this.isExpanded ?
- print_preview.Metrics.PrintSettingsUiBucket.MORE_SETTINGS_CLICKED :
- print_preview.Metrics.PrintSettingsUiBucket.LESS_SETTINGS_CLICKED);
+ this.metrics_.record(
+ this.isExpanded ?
+ print_preview.Metrics.PrintSettingsUiBucket
+ .MORE_SETTINGS_CLICKED :
+ print_preview.Metrics.PrintSettingsUiBucket
+ .LESS_SETTINGS_CLICKED);
},
/**
@@ -138,15 +137,14 @@ cr.define('print_preview', function() {
iconEl.classList.toggle('more-settings-icon-plus', !all);
iconEl.classList.toggle('more-settings-icon-minus', all);
- var availableSections = this.settingsSections_.reduce(
- function(count, section) {
+ var availableSections =
+ this.settingsSections_.reduce(function(count, section) {
return count + (section.isAvailable() ? 1 : 0);
}, 0);
// Magic 6 is chosen as the number of sections when it still feels like
// manageable and not too crowded.
- var hasSectionsToToggle =
- availableSections > 6 &&
+ var hasSectionsToToggle = availableSections > 6 &&
this.settingsSections_.some(function(section) {
return section.hasCollapsibleContent();
});
@@ -166,7 +164,5 @@ cr.define('print_preview', function() {
};
// Export
- return {
- MoreSettings: MoreSettings
- };
+ return {MoreSettings: MoreSettings};
});

Powered by Google App Engine
This is Rietveld 408576698