diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-19 00:09:22 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-19 00:09:22 +0000 |
commit | 5cc4c42d46ac837b79333091b110391c2ca1c996 (patch) | |
tree | 02764336dcbc316b1725fc614f658f391de8326c /printing/printed_document_cairo.cc | |
parent | 38a0a14f438057e1c8c0ddcf1e903c8d53620141 (diff) | |
download | chromium_src-5cc4c42d46ac837b79333091b110391c2ca1c996.zip chromium_src-5cc4c42d46ac837b79333091b110391c2ca1c996.tar.gz chromium_src-5cc4c42d46ac837b79333091b110391c2ca1c996.tar.bz2 |
Linux: Refactor printing to be more linux Windows/Mac.
BUG=41543,59732
TEST=Printing works on Linux and CrOS, Linux printing respect print dialog settings.
Review URL: http://codereview.chromium.org/6516022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/printed_document_cairo.cc')
-rw-r--r-- | printing/printed_document_cairo.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/printing/printed_document_cairo.cc b/printing/printed_document_cairo.cc index d24fef9..9992bc6 100644 --- a/printing/printed_document_cairo.cc +++ b/printing/printed_document_cairo.cc @@ -1,19 +1,18 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. #include "printing/printed_document.h" -#include "base/file_util.h" #include "base/logging.h" -#include "base/message_loop.h" #include "printing/page_number.h" #include "printing/printed_page.h" +#include "printing/printing_context_cairo.h" namespace printing { void PrintedDocument::RenderPrintedPage( - const PrintedPage& page, gfx::NativeDrawingContext context) const { + const PrintedPage& page, PrintingContext* context) const { #ifndef NDEBUG { // Make sure the page is from our list. @@ -24,7 +23,12 @@ void PrintedDocument::RenderPrintedPage( DCHECK(context); - NOTIMPLEMENTED(); +#if !defined(OS_CHROMEOS) + if (page.page_number() == 1) { + reinterpret_cast<PrintingContextCairo*>(context)->PrintDocument( + page.native_metafile()); + } +#endif // !defined(OS_CHROMEOS) } void PrintedDocument::DrawHeaderFooter(gfx::NativeDrawingContext context, |