Chromium Code Reviews| Index: chrome/browser/resources/print_preview/data/document_info.js |
| diff --git a/chrome/browser/resources/print_preview/data/document_info.js b/chrome/browser/resources/print_preview/data/document_info.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c3d7bb1dbae73c8d522a9ae8e6ae4929c20bc209 |
| --- /dev/null |
| +++ b/chrome/browser/resources/print_preview/data/document_info.js |
| @@ -0,0 +1,48 @@ |
| +// Copyright (c) 2012 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'; |
| + |
| + /** |
| + * Object which contains information related to the document to print. |
| + * @param {boolean} isModifiable Whether the document is modifiable. I.e. can |
| + * the content of the document be reflowed. |
| + * @param {number} pageCount Number of pages in the document. |
| + * @param {!print_preview.Size} pageSize Size of the document pages. |
| + * @param {!print_preview.PrintableArea} printableArea Area of the document |
| + * which the destination can print to. |
| + * @constructor |
| + */ |
| + function DocumentInfo(isModifiable, pageCount, pageSize, printableArea) { |
| + /** |
| + * Whether the document to print is modifiable (i.e. can be reflowed). |
| + * @type {boolean} |
| + */ |
| + this.isModifiable = isModifiable; |
| + |
| + /** |
| + * Number of pages in the document to print. |
| + * @type {number} |
| + */ |
| + this.pageCount = pageCount; |
| + |
| + /** |
| + * Size of the pages of the document. |
|
dpapad
2012/05/09 15:48:56
Document the unit of measurement.
Robert Toscano
2012/05/10 00:23:27
Done.
|
| + * @type {!print_preview.Size} |
| + */ |
| + this.pageSize = pageSize; |
| + |
| + /** |
| + * Printable area of the document. |
|
dpapad
2012/05/09 15:48:56
Same here.
Robert Toscano
2012/05/10 00:23:27
Done.
|
| + * @type {!print_preview.PrintableArea} |
| + */ |
| + this.printableArea = printableArea; |
| + }; |
| + |
| + // Export |
| + return { |
| + DocumentInfo: DocumentInfo |
| + }; |
| +}); |