diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 18:46:21 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 18:46:21 +0000 |
commit | b75dca87f3ff3ee3ab003960276ec7bb49d4c734 (patch) | |
tree | 8026f1f38f82a5d7c922ba5245e38a5ecf3a61d8 /printing/printed_document.h | |
parent | 7ff3f63b8c66408a382adc88458a6e70038cad8d (diff) | |
download | chromium_src-b75dca87f3ff3ee3ab003960276ec7bb49d4c734.zip chromium_src-b75dca87f3ff3ee3ab003960276ec7bb49d4c734.tar.gz chromium_src-b75dca87f3ff3ee3ab003960276ec7bb49d4c734.tar.bz2 |
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
Diffstat (limited to 'printing/printed_document.h')
-rw-r--r-- | printing/printed_document.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/printing/printed_document.h b/printing/printed_document.h index cedaddd..6e20d33 100644 --- a/printing/printed_document.h +++ b/printing/printed_document.h @@ -7,6 +7,7 @@ #include <map> +#include "app/gfx/native_widget_types.h" #include "base/lock.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" @@ -51,12 +52,14 @@ class PrintedDocument : public base::RefCountedThreadSafe<PrintedDocument> { // Draws the page in the context. // Note: locks for a short amount of time in debug only. - void RenderPrintedPage(const PrintedPage& page, HDC context) const; + void RenderPrintedPage(const PrintedPage& page, + gfx::NativeDrawingContext context) const; // Draws the page in the context. If the page is not available right now, it // requests to have this page be rendered and returns false. // Note: locks for a short amount of time. - bool RenderPrintedPageNumber(int page_number, HDC context); + bool RenderPrintedPageNumber(int page_number, + gfx::NativeDrawingContext context); // Returns true if all the necessary pages for the settings are already // rendered. @@ -166,7 +169,7 @@ class PrintedDocument : public base::RefCountedThreadSafe<PrintedDocument> { // Prints the headers and footers for one page in the specified context // according to the current settings. - void PrintHeaderFooter(HDC context, + void PrintHeaderFooter(gfx::NativeDrawingContext context, const PrintedPage& page, PageOverlays::HorizontalPosition x, PageOverlays::VerticalPosition y, |