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

Side by Side Diff: chrome/browser/resources/print_preview/settings/dpi_settings.js

Issue 2861713004: Print Preview: Fix compile errors in settings/ directory (Closed)
Patch Set: Address comments and fix remaining lint errors Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Encapsulates all settings and logic related to the DPI selection UI. 9 * Encapsulates all settings and logic related to the DPI selection UI.
10 * @param {!print_preview.ticket_items.Dpi} ticketItem Used to read and write 10 * @param {!print_preview.ticket_items.Dpi} ticketItem Used to read and write
11 * the DPI ticket item. 11 * the DPI ticket item.
12 * @constructor 12 * @constructor
13 * @extends {print_preview.SettingsSectionSelect} 13 * @extends {print_preview.SettingsSectionSelect}
14 */ 14 */
15 function DpiSettings(ticketItem) { 15 function DpiSettings(ticketItem) {
16 print_preview.SettingsSectionSelect.call(this, ticketItem); 16 print_preview.SettingsSectionSelect.call(this, ticketItem);
17 }; 17 }
18 18
19 DpiSettings.prototype = { 19 DpiSettings.prototype = {
20 __proto__: print_preview.SettingsSectionSelect.prototype, 20 __proto__: print_preview.SettingsSectionSelect.prototype,
21 21
22 /** @override */ 22 /** @override */
23 getDefaultDisplayName_: function(option) { 23 getDefaultDisplayName_: function(option) {
24 var hDpi = option.horizontal_dpi || 0; 24 var hDpi = option.horizontal_dpi || 0;
25 var vDpi = option.vertical_dpi || 0; 25 var vDpi = option.vertical_dpi || 0;
26 if (hDpi > 0 && vDpi > 0 && hDpi != vDpi) { 26 if (hDpi > 0 && vDpi > 0 && hDpi != vDpi) {
27 return loadTimeData.getStringF('nonIsotropicDpiItemLabel', 27 return loadTimeData.getStringF('nonIsotropicDpiItemLabel',
28 hDpi.toLocaleString(), 28 hDpi.toLocaleString(),
29 vDpi.toLocaleString()); 29 vDpi.toLocaleString());
30 } 30 }
31 return loadTimeData.getStringF('dpiItemLabel', 31 return loadTimeData.getStringF('dpiItemLabel',
32 (hDpi || vDpi).toLocaleString()); 32 (hDpi || vDpi).toLocaleString());
33 } 33 }
34 }; 34 };
35 35
36 // Export 36 // Export
37 return { 37 return {
38 DpiSettings: DpiSettings 38 DpiSettings: DpiSettings
39 }; 39 };
40 }); 40 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698