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

Unified Diff: chrome/browser/resources/print_preview/settings/dpi_settings.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/settings/dpi_settings.js
diff --git a/chrome/browser/resources/print_preview/settings/dpi_settings.js b/chrome/browser/resources/print_preview/settings/dpi_settings.js
new file mode 100644
index 0000000000000000000000000000000000000000..e39e9f41583ad2e537503138fc33eb8297d6fe86
--- /dev/null
+++ b/chrome/browser/resources/print_preview/settings/dpi_settings.js
@@ -0,0 +1,32 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+cr.define('print_preview', function() {
+ 'use strict';
+
+ /**
+ * Encapsulates all settings and logic related to the DPI selection UI.
+ * @param {!print_preview.ticket_items.Dpi} ticketItem Used to read and write
+ * the DPI ticket item.
+ * @constructor
+ * @extends {print_preview.SettingsSectionSelect}
+ */
+ function DpiSettings(ticketItem) {
+ print_preview.SettingsSectionSelect.call(this, ticketItem);
+ };
+
+ DpiSettings.prototype = {
+ __proto__: print_preview.SettingsSectionSelect.prototype,
+
+ /** @override */
+ getDefaultDisplayName_: function(option) {
+ return loadTimeData.getStringF('dpiItemLabel', option.horizontal_dpi);
+ }
+ };
+
+ // Export
+ return {
+ DpiSettings: DpiSettings
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698