diff options
-rw-r--r-- | chrome/browser/printing/print_job_worker.cc | 8 | ||||
-rw-r--r-- | printing/printed_document_cairo.cc | 2 | ||||
-rw-r--r-- | printing/printed_document_mac.cc | 2 | ||||
-rw-r--r-- | printing/printed_document_win.cc | 2 | ||||
-rw-r--r-- | printing/printing_context_win.cc | 2 |
5 files changed, 9 insertions, 7 deletions
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc index dbc9544..ce1623b 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -263,9 +263,7 @@ void PrintJobWorker::OnDocumentDone() { void PrintJobWorker::SpoolPage(PrintedPage& page) { DCHECK_EQ(message_loop(), MessageLoop::current()); DCHECK_NE(page_number_, PageNumber::npos()); -#if !defined(OS_MACOSX) - DCHECK(printing_context_.context()); -#endif + // Signal everyone that the page is about to be printed. NotificationTask* task = new NotificationTask(); task->Init(owner_, @@ -280,10 +278,6 @@ void PrintJobWorker::SpoolPage(PrintedPage& page) { return; } -#if defined(OS_MACOSX) - // Context is only valid between NewPage and PageDone, so we only check here. - DCHECK(printing_context_.context()); -#endif // Actual printing. document_->RenderPrintedPage(page, printing_context_.context()); diff --git a/printing/printed_document_cairo.cc b/printing/printed_document_cairo.cc index 8386914..fb996db 100644 --- a/printing/printed_document_cairo.cc +++ b/printing/printed_document_cairo.cc @@ -22,6 +22,8 @@ void PrintedDocument::RenderPrintedPage( } #endif + DCHECK(context); + NOTIMPLEMENTED(); } diff --git a/printing/printed_document_mac.cc b/printing/printed_document_mac.cc index 924ec0f..f729215 100644 --- a/printing/printed_document_mac.cc +++ b/printing/printed_document_mac.cc @@ -24,6 +24,8 @@ void PrintedDocument::RenderPrintedPage( } #endif + DCHECK(context); + const printing::PageSetup& page_setup( immutable_.settings_.page_setup_device_units()); gfx::Rect content_area; diff --git a/printing/printed_document_win.cc b/printing/printed_document_win.cc index 081bddc..e6a1126 100644 --- a/printing/printed_document_win.cc +++ b/printing/printed_document_win.cc @@ -46,6 +46,8 @@ void PrintedDocument::RenderPrintedPage( } #endif + DCHECK(context); + const printing::PageSetup& page_setup( immutable_.settings_.page_setup_device_units()); gfx::Rect content_area; diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc index a94c71f..83ddfd4 100644 --- a/printing/printing_context_win.cc +++ b/printing/printing_context_win.cc @@ -301,6 +301,8 @@ PrintingContext::Result PrintingContext::NewDocument( PrintingContext::Result PrintingContext::NewPage() { if (abort_printing_) return CANCEL; + + DCHECK(context_); DCHECK(in_print_job_); // Inform the driver that the application is about to begin sending data. |