diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-29 03:16:37 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-29 03:16:37 +0000 |
commit | e5324b55e4204451d02d9323a6ea013955b82bc0 (patch) | |
tree | 369de1fdbf16aee58036f9a0a95c27bb9a0aa1e8 /printing/printing_context.h | |
parent | b7898896f26bc424e1e11d7533f866c2872a8c4f (diff) | |
download | chromium_src-e5324b55e4204451d02d9323a6ea013955b82bc0.zip chromium_src-e5324b55e4204451d02d9323a6ea013955b82bc0.tar.gz chromium_src-e5324b55e4204451d02d9323a6ea013955b82bc0.tar.bz2 |
De-duplicate job_settings parsing code.
Proper set/get methods in PrintSettings.
Objective of this re-factoring is to simplify processing of
"print_to_pdf || is_cloud_dialog || print_to_cloud" case.
Now all platforms for this case do almost the same by in different way: calculate and set printing area.
In the next CL I'll move that code into common PrintingContext::UpdatePrintSettings and will ask platform specific implementation for desired page size only.
BUG=305731
Review URL: https://codereview.chromium.org/47823002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/printing_context.h')
-rw-r--r-- | printing/printing_context.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/printing/printing_context.h b/printing/printing_context.h index f4ba7ad7..7fa90d2 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h @@ -51,11 +51,14 @@ class PRINTING_EXPORT PrintingContext { // default device settings. virtual Result UseDefaultSettings() = 0; - // Updates printer related settings. |job_settings| contains all print job - // settings information. |ranges| has the new page range settings. - virtual Result UpdatePrinterSettings( - const base::DictionaryValue& job_settings, - const PageRanges& ranges) = 0; + // Updates printer settings. + // |target_is_pdf| is true if implementation needs to generate PDF without + // actual printing. In this case implementation may avoid setup of native + // print system. Ex. "save to pdf" or Cloud Print. + // |external_preview| is true if pdf is going to be opened in external + // preview. Used by MacOS only now to open Preview.app. + virtual Result UpdatePrinterSettings(bool target_is_pdf, + bool external_preview) = 0; // Updates Print Settings. |job_settings| contains all print job // settings information. |ranges| has the new page range settings. |