From b75dca87f3ff3ee3ab003960276ec7bb49d4c734 Mon Sep 17 00:00:00 2001 From: "stuartmorgan@chromium.org" Date: Tue, 13 Oct 2009 18:46:21 +0000 Subject: Implement the basic OS-level printing mechanics on Mac Part two of printing implementation on the Mac. This adds a Mac implementation of PrintSettings to get page setup and printer information, basic PDF->context rendering in PrintedDocument, and most of PrintingContext to allow getting print settings (both default and interactive). Reworks the message flow a bit when asking for print settings on the Mac, since it can only be done from the UI thread. Uses a modal dialog for now, but will later be modified further to allow for a sheet. BUG=13158 TEST=None; no user-visible effect yet. Review URL: http://codereview.chromium.org/268036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28857 0039d316-1c4b-4281-b951-d872f2087c98 --- printing/printed_document_linux.cc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 printing/printed_document_linux.cc (limited to 'printing/printed_document_linux.cc') diff --git a/printing/printed_document_linux.cc b/printing/printed_document_linux.cc new file mode 100644 index 0000000..8386914 --- /dev/null +++ b/printing/printed_document_linux.cc @@ -0,0 +1,28 @@ +// Copyright (c) 2009 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" + +namespace printing { + +void PrintedDocument::RenderPrintedPage( + const PrintedPage& page, gfx::NativeDrawingContext context) const { +#ifndef NDEBUG + { + // Make sure the page is from our list. + AutoLock lock(lock_); + DCHECK(&page == mutable_.pages_.find(page.page_number() - 1)->second.get()); + } +#endif + + NOTIMPLEMENTED(); +} + +} // namespace printing -- cgit v1.1