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

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

Issue 7792085: Print Preview: Handling pending print to pdf requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup 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
Index: chrome/browser/resources/print_preview/print_preview.js
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index 1ebbaae446c4ff18551967e31e07dce7f96f8cbc..162680c0eb46d33a848d262943a30af15e2af25b 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -433,11 +433,11 @@ function requestToPrintDocument() {
if (hasPendingPrintDocumentRequest) {
if (printToPDF) {
- // TODO(thestig) disable controls here.
- } else {
- isTabHidden = true;
- chrome.send('hidePreview');
- }
+ sendPrintDocumentRequest();
+ } else {
+ isTabHidden = true;
+ chrome.send('hidePreview');
kmadhusu 2011/09/02 21:47:03 Create a helper function to set isTabHidden = true
dpapad 2011/09/07 00:46:19 This is only performed once here (as of latest pat
+ }
return;
}
@@ -536,6 +536,11 @@ function fileSelectionCancelled() {
// TODO(thestig) re-enable controls here.
}
+function fileSelectionCompleted() {
+ isTabHidden = true;
kmadhusu 2011/09/02 21:47:03 Call that helper function here.
dpapad 2011/09/07 00:46:19 The preview tab is not hidden anymore here, instea
+ chrome.send('hidePreview');
+}
+
/**
* Set the default printer. If there is one, generate a print preview.
* @param {string} printer Name of the default printer. Empty if none.
@@ -978,6 +983,7 @@ function onDidPreviewPage(pageNumber, previewUid, previewResponseId) {
* this response.
*/
function updatePrintPreview(previewUid, previewResponseId) {
+ console.log("updatePrintPreview " + previewResponseId);
kmadhusu 2011/09/02 21:47:03 remove console.log
dpapad 2011/09/07 00:46:19 Done.
if (!isExpectedPreviewResponse(previewResponseId))
return;
hasPendingPreviewRequest = false;
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview_handler.h » ('j') | chrome/browser/ui/webui/print_preview_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698