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

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

Issue 8915027: Print preview: A quick hack to support printing to the default printer without user confirmation ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « no previous file | chrome/browser/ui/webui/print_preview_handler.cc » ('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.js
===================================================================
--- chrome/browser/resources/print_preview/print_preview.js (revision 114602)
+++ chrome/browser/resources/print_preview/print_preview.js (working copy)
@@ -53,6 +53,10 @@
// True when preview tab is hidden.
var isTabHidden = false;
+// True in kiosk mode where print preview can print automatically without
+// user intervention. See http://crbug.com/31395.
+var printAutomaticallyInKioskMode = false;
+
// @type {print_preview.PrintHeader} Holds the print and cancel buttons.
var printHeader;
@@ -191,6 +195,8 @@
}
setDefaultPrinter(initialSettings['printerName'],
initialSettings['cloudPrintData']);
+ printAutomaticallyInKioskMode =
+ initialSettings['printAutomaticallyInKioskMode'];
}
/**
@@ -815,6 +821,8 @@
isFirstPageLoaded = true;
checkAndHideOverlayLayerIfValid();
sendPrintDocumentRequestIfNeeded();
+ if (printAutomaticallyInKioskMode)
+ printHeader.printButton.click();
}
function setPluginPreviewPageCount() {
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698