summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing/print_view_manager.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-24 23:50:25 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-24 23:50:25 +0000
commit9a26bb2293f2734050cdd9c0e62249378cd8d249 (patch)
tree0aed2aa0c66db0f4c1f4447817c18d76e942d9ab /chrome/browser/printing/print_view_manager.cc
parent75577eca2e0090635fb1aaafe46dd3a6bb0af692 (diff)
downloadchromium_src-9a26bb2293f2734050cdd9c0e62249378cd8d249.zip
chromium_src-9a26bb2293f2734050cdd9c0e62249378cd8d249.tar.gz
chromium_src-9a26bb2293f2734050cdd9c0e62249378cd8d249.tar.bz2
Print preview: Do not exit the window.print() nested loop too early when saving to PDF. Also fix the print preview state machine in PrintViewManager.
BUG=105640,110100 TEST=See minimal test case in bug 110100. Review URL: http://codereview.chromium.org/9112052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118944 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing/print_view_manager.cc')
-rw-r--r--chrome/browser/printing/print_view_manager.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index 5ac48e1..c9c4f25 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -122,10 +122,14 @@ bool PrintViewManager::PrintPreviewNow() {
return PrintNowInternal(new PrintMsg_InitiatePrintPreview(routing_id()));
}
+void PrintViewManager::PrintPreviewForWebNode() {
+ DCHECK_EQ(NOT_PREVIEWING, print_preview_state_);
+ print_preview_state_ = USER_INITIATED_PREVIEW;
+}
+
void PrintViewManager::PrintPreviewDone() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- // DCHECK_NE(NOT_PREVIEWING, print_preview_state_);
- // TODO(thestig) Fix this. http://crbug.com/105640
+ DCHECK_NE(NOT_PREVIEWING, print_preview_state_);
if (print_preview_state_ == SCRIPTED_PREVIEW) {
ScriptedPrintPreviewClosureMap& map =