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

Unified Diff: chrome/browser/resources/print_preview/data/document_info.js

Issue 10108001: Refactor print preview web ui (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes broken tests Created 8 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 side-by-side diff with in-line comments
Download patch
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
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698