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

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

Issue 692303002: Add DPI option selection to Print Preview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do not show DPI selection if there's only one option available. Created 6 years, 1 month 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 b93440205a1a64ba7dffb73c32da8dd5ab14ca31..673b8d89ef191a18ce356069d2512ed1080f5780 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -151,6 +151,15 @@ cr.define('print_preview', function() {
this.addChild(this.marginSettings_);
/**
+ * Component that renders the DPI settings.
+ * @type {!print_preview.DpiSettings}
+ * @private
+ */
+ this.dpiSettings_ =
+ new print_preview.DpiSettings(this.printTicketStore_.dpi);
+ this.addChild(this.dpiSettings_);
+
+ /**
* Component that renders miscellaneous print options.
* @type {!print_preview.OtherOptionsSettings}
* @private
@@ -189,6 +198,7 @@ cr.define('print_preview', function() {
this.layoutSettings_,
this.marginSettings_,
this.colorSettings_,
+ this.dpiSettings_,
this.otherOptionsSettings_,
this.advancedOptionsSettings_];
/**
@@ -461,6 +471,7 @@ cr.define('print_preview', function() {
this.layoutSettings_.decorate($('layout-settings'));
this.colorSettings_.decorate($('color-settings'));
this.marginSettings_.decorate($('margin-settings'));
+ this.dpiSettings_.decorate($('dpi-settings'));
this.otherOptionsSettings_.decorate($('other-options-settings'));
this.advancedOptionsSettings_.decorate($('advanced-options-settings'));
this.advancedSettings_.decorate($('advanced-settings'));
@@ -487,6 +498,7 @@ cr.define('print_preview', function() {
this.layoutSettings_.isEnabled = isEnabled;
this.colorSettings_.isEnabled = isEnabled;
this.marginSettings_.isEnabled = isEnabled;
+ this.dpiSettings_.isEnabled = isEnabled;
this.otherOptionsSettings_.isEnabled = isEnabled;
this.advancedOptionsSettings_.isEnabled = isEnabled;
},
@@ -1242,6 +1254,7 @@ cr.define('print_preview', function() {
<include src="data/ticket_items/collate.js">
<include src="data/ticket_items/color.js">
<include src="data/ticket_items/copies.js">
+<include src="data/ticket_items/dpi.js">
<include src="data/ticket_items/duplex.js">
<include src="data/ticket_items/header_footer.js">
<include src="data/ticket_items/media_size.js">
@@ -1261,8 +1274,10 @@ cr.define('print_preview', function() {
<include src="metrics.js">
<include src="settings/settings_section.js">
+<include src="settings/settings_section_select.js">
<include src="settings/page_settings.js">
<include src="settings/copies_settings.js">
+<include src="settings/dpi_settings.js">
<include src="settings/media_size_settings.js">
<include src="settings/layout_settings.js">
<include src="settings/color_settings.js">

Powered by Google App Engine
This is Rietveld 408576698