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

Side by Side Diff: chrome/browser/resources/print_preview/data/destination_store.js

Issue 1407353003: Expose more paper sizes when printing to PDF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update AUTHORS file with right mail address Created 4 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 unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * A data store that stores destinations and dispatches events when the data 9 * A data store that stores destinations and dispatches events when the data
10 * store changes. 10 * store changes.
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 /** 334 /**
335 * Localizes printer capabilities. 335 * Localizes printer capabilities.
336 * @param {!Object} capabilities Printer capabilities to localize. 336 * @param {!Object} capabilities Printer capabilities to localize.
337 * @return {!Object} Localized capabilities. 337 * @return {!Object} Localized capabilities.
338 * @private 338 * @private
339 */ 339 */
340 DestinationStore.localizeCapabilities_ = function(capabilities) { 340 DestinationStore.localizeCapabilities_ = function(capabilities) {
341 var mediaSize = capabilities.printer.media_size; 341 var mediaSize = capabilities.printer.media_size;
342 if (mediaSize) { 342 if (mediaSize) {
343 var mediaDisplayNames = { 343 var mediaDisplayNames = {
344 'ISO_A0': 'A0',
345 'ISO_A1': 'A1',
346 'ISO_A2': 'A2',
347 'ISO_A3': 'A3',
344 'ISO_A4': 'A4', 348 'ISO_A4': 'A4',
345 'ISO_A3': 'A3', 349 'ISO_A5': 'A5',
350 'NA_LEGAL': 'Legal',
346 'NA_LETTER': 'Letter', 351 'NA_LETTER': 'Letter',
347 'NA_LEGAL': 'Legal',
348 'NA_LEDGER': 'Tabloid' 352 'NA_LEDGER': 'Tabloid'
349 }; 353 };
350 for (var i = 0, media; media = mediaSize.option[i]; i++) { 354 for (var i = 0, media; media = mediaSize.option[i]; i++) {
351 // No need to patch capabilities with localized names provided. 355 // No need to patch capabilities with localized names provided.
352 if (!media.custom_display_name_localized) { 356 if (!media.custom_display_name_localized) {
353 media.custom_display_name = 357 media.custom_display_name =
354 media.custom_display_name || 358 media.custom_display_name ||
355 mediaDisplayNames[media.name] || 359 mediaDisplayNames[media.name] ||
356 media.name; 360 media.name;
357 } 361 }
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 return this.getDestinationKey_( 1471 return this.getDestinationKey_(
1468 destination.origin, destination.id, destination.account); 1472 destination.origin, destination.id, destination.account);
1469 } 1473 }
1470 }; 1474 };
1471 1475
1472 // Export 1476 // Export
1473 return { 1477 return {
1474 DestinationStore: DestinationStore 1478 DestinationStore: DestinationStore
1475 }; 1479 };
1476 }); 1480 });
OLDNEW
« no previous file with comments | « AUTHORS ('k') | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698