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

Unified Diff: chrome/browser/resources/print_preview/print_preview_utils.js

Issue 7550022: Print Preview: Fixing behavior of event listeners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comments Created 9 years, 4 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
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview.js ('k') | chrome/browser/ui/webui/print_preview_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/print_preview_utils.js
diff --git a/chrome/browser/resources/print_preview/print_preview_utils.js b/chrome/browser/resources/print_preview/print_preview_utils.js
index 68e52243603b894dbc4cc06aec757c8bae2137f9..594769e96d7b23a299e04a1d0ebdd10f9b4f0adf 100644
--- a/chrome/browser/resources/print_preview/print_preview_utils.js
+++ b/chrome/browser/resources/print_preview/print_preview_utils.js
@@ -189,3 +189,17 @@ function pageSetToPageRanges(pageSet) {
function getPageSrcURL(id, pageNumber) {
return 'chrome://print/' + id + '/' + pageNumber + '/print.pdf';
}
+
+
+/**
+ * Returns a random integer within the specified range, |endPointA| and
+ * |endPointB| are included.
+ * @param {number} endPointA One end of the desired range.
+ * @param {number} endPointB The other end of the desired range.
+ * @return {number} The random integer.
+ */
+function randomInteger(endPointA, endPointB) {
+ from = Math.min(endPointA, endPointB);
+ to = Math.max(endPointA, endPointB);
+ return Math.floor(Math.random() * (to - from + 1) + from);
+}
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview.js ('k') | chrome/browser/ui/webui/print_preview_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698