Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 * Interface to the Chromium print preview generator. | 9 * Interface to the Chromium print preview generator. |
| 10 * @param {!print_preview.DestinationStore} destinationStore Used to get the | 10 * @param {!print_preview.DestinationStore} destinationStore Used to get the |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 /** | 52 /** |
| 53 * ID of current in-flight request. Requests that do not share this ID will | 53 * ID of current in-flight request. Requests that do not share this ID will |
| 54 * be ignored. | 54 * be ignored. |
| 55 * @type {number} | 55 * @type {number} |
| 56 * @private | 56 * @private |
| 57 */ | 57 */ |
| 58 this.inFlightRequestId_ = -1; | 58 this.inFlightRequestId_ = -1; |
| 59 | 59 |
| 60 /** | 60 /** |
| 61 * Media size to generate preview with. {@code null} indicates default size. | 61 * Media size to generate preview with. {@code null} indicates default size. |
| 62 * @type {cp.cdd.MediaSizeTicketItem} | 62 * @type {print_preview.ticket_items.MediaSize} |
|
Aleksey Shlyapnikov
2014/09/24 17:54:43
cp.cdd.MediaSizeTicketItem was a correct type, it
Vitaly Pavlenko
2014/09/24 20:39:50
Where is the type cp.cdd.MediaSizeTicketItem decla
Aleksey Shlyapnikov
2014/09/24 21:13:18
Well, it is supposed to be generated from proto de
Vitaly Pavlenko
2014/09/24 22:37:57
Done.
| |
| 63 * @private | 63 * @private |
| 64 */ | 64 */ |
| 65 this.mediaSize_ = null; | 65 this.mediaSize_ = null; |
| 66 | 66 |
| 67 /** | 67 /** |
| 68 * Whether the previews are being generated in landscape mode. | 68 * Whether the previews are being generated in landscape mode. |
| 69 * @type {boolean} | 69 * @type {boolean} |
| 70 * @private | 70 * @private |
| 71 */ | 71 */ |
| 72 this.isLandscapeEnabled_ = false; | 72 this.isLandscapeEnabled_ = false; |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 87 | 87 |
| 88 /** | 88 /** |
| 89 * Whether the document should be fitted to the page. | 89 * Whether the document should be fitted to the page. |
| 90 * @type {boolean} | 90 * @type {boolean} |
| 91 * @private | 91 * @private |
| 92 */ | 92 */ |
| 93 this.isFitToPageEnabled_ = false; | 93 this.isFitToPageEnabled_ = false; |
| 94 | 94 |
| 95 /** | 95 /** |
| 96 * Page ranges setting used used to generate the last preview. | 96 * Page ranges setting used used to generate the last preview. |
| 97 * @type {!Array.<object.<{from: number, to: number}>>} | 97 * @type {Array.<Object.<{from: number, to: number}>>} |
| 98 * @private | 98 * @private |
| 99 */ | 99 */ |
| 100 this.pageRanges_ = null; | 100 this.pageRanges_ = null; |
| 101 | 101 |
| 102 /** | 102 /** |
| 103 * Margins type used to generate the last preview. | 103 * Margins type used to generate the last preview. |
| 104 * @type {!print_preview.ticket_items.MarginsType.Value} | 104 * @type {!print_preview.ticket_items.MarginsType.Value} |
| 105 * @private | 105 * @private |
| 106 */ | 106 */ |
| 107 this.marginsType_ = print_preview.ticket_items.MarginsType.Value.DEFAULT; | 107 this.marginsType_ = print_preview.ticket_items.MarginsType.Value.DEFAULT; |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 394 // current one. | 394 // current one. |
| 395 cr.dispatchSimpleEvent(this, PreviewGenerator.EventType.FAIL); | 395 cr.dispatchSimpleEvent(this, PreviewGenerator.EventType.FAIL); |
| 396 } | 396 } |
| 397 }; | 397 }; |
| 398 | 398 |
| 399 // Export | 399 // Export |
| 400 return { | 400 return { |
| 401 PreviewGenerator: PreviewGenerator | 401 PreviewGenerator: PreviewGenerator |
| 402 }; | 402 }; |
| 403 }); | 403 }); |
| OLD | NEW |