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

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

Issue 2834453004: Remove print preview scaling flag (Closed)
Patch Set: address comment Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/print_preview.js
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index a4b96fcd52cec3585a3adcc16c0ab7af81938a8f..ada2aac4dc3ac4e3946a1df1c9143bbbc0c91b1c 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -19,13 +19,6 @@ cr.define('print_preview', function() {
print_preview.Component.call(this);
/**
- * Whether the print scaling feature is enabled.
- * @type {boolean}
- * @private
- */
- this.scalingEnabled_ = loadTimeData.getBoolean('scalingEnabled');
-
- /**
* Used to communicate with Chromium's print system.
* @type {!print_preview.NativeLayer}
* @private
@@ -166,17 +159,15 @@ cr.define('print_preview', function() {
new print_preview.DpiSettings(this.printTicketStore_.dpi);
this.addChild(this.dpiSettings_);
- if (this.scalingEnabled_) {
- /**
- * Component that renders the scaling settings.
- * @type {!print_preview.ScalingSettings}
- * @private
- */
- this.scalingSettings_ =
- new print_preview.ScalingSettings(this.printTicketStore_.scaling,
- this.printTicketStore_.fitToPage);
- this.addChild(this.scalingSettings_);
- }
+ /**
+ * Component that renders the scaling settings.
+ * @type {!print_preview.ScalingSettings}
+ * @private
+ */
+ this.scalingSettings_ =
+ new print_preview.ScalingSettings(this.printTicketStore_.scaling,
+ this.printTicketStore_.fitToPage);
+ this.addChild(this.scalingSettings_);
/**
* Component that renders miscellaneous print options.
@@ -219,11 +210,9 @@ cr.define('print_preview', function() {
this.marginSettings_,
this.colorSettings_,
this.dpiSettings_,
+ this.scalingSettings_,
this.otherOptionsSettings_,
this.advancedOptionsSettings_];
- if (this.scalingEnabled_) {
- settingsSections.splice(8, 0, this.scalingSettings_);
- }
/**
* Component representing more/less settings button.
@@ -373,12 +362,10 @@ cr.define('print_preview', function() {
this.nativeLayer_,
print_preview.NativeLayer.EventType.PRINT_PRESET_OPTIONS,
this.onPrintPresetOptionsFromDocument_.bind(this));
- if (this.scalingEnabled_) {
- this.tracker.add(
- this.nativeLayer_,
- print_preview.NativeLayer.EventType.PAGE_COUNT_READY,
- this.onPageCountReady_.bind(this));
- }
+ this.tracker.add(
+ this.nativeLayer_,
+ print_preview.NativeLayer.EventType.PAGE_COUNT_READY,
+ this.onPageCountReady_.bind(this));
this.tracker.add(
this.nativeLayer_,
print_preview.NativeLayer.EventType.PRIVET_PRINT_FAILED,
@@ -503,8 +490,7 @@ cr.define('print_preview', function() {
this.mediaSizeSettings_.decorate($('media-size-settings'));
this.marginSettings_.decorate($('margin-settings'));
this.dpiSettings_.decorate($('dpi-settings'));
- if (this.scalingEnabled_)
- this.scalingSettings_.decorate($('scaling-settings'));
+ this.scalingSettings_.decorate($('scaling-settings'));
this.otherOptionsSettings_.decorate($('other-options-settings'));
this.advancedOptionsSettings_.decorate($('advanced-options-settings'));
this.advancedSettings_.decorate($('advanced-settings'));
@@ -532,8 +518,7 @@ cr.define('print_preview', function() {
this.mediaSizeSettings_.isEnabled = isEnabled;
this.marginSettings_.isEnabled = isEnabled;
this.dpiSettings_.isEnabled = isEnabled;
- if (this.scalingEnabled_)
- this.scalingSettings_.isEnabled = isEnabled;
+ this.scalingSettings_.isEnabled = isEnabled;
this.otherOptionsSettings_.isEnabled = isEnabled;
this.advancedOptionsSettings_.isEnabled = isEnabled;
},
« no previous file with comments | « chrome/browser/resources/print_preview/data/app_state.js ('k') | chrome/browser/ui/webui/print_preview/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698