summaryrefslogtreecommitdiffstats
path: root/printing/printing_context_gtk.cc
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-29 03:16:37 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-29 03:16:37 +0000
commite5324b55e4204451d02d9323a6ea013955b82bc0 (patch)
tree369de1fdbf16aee58036f9a0a95c27bb9a0aa1e8 /printing/printing_context_gtk.cc
parentb7898896f26bc424e1e11d7533f866c2872a8c4f (diff)
downloadchromium_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_gtk.cc')
-rw-r--r--printing/printing_context_gtk.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/printing/printing_context_gtk.cc b/printing/printing_context_gtk.cc
index 39d0ef5..6cf0015 100644
--- a/printing/printing_context_gtk.cc
+++ b/printing/printing_context_gtk.cc
@@ -79,15 +79,17 @@ PrintingContext::Result PrintingContextGtk::UseDefaultSettings() {
}
PrintingContext::Result PrintingContextGtk::UpdatePrinterSettings(
- const DictionaryValue& job_settings, const PageRanges& ranges) {
+ bool target_is_pdf,
+ bool external_preview) {
DCHECK(!in_print_job_);
+ DCHECK(!external_preview) << "Not implemented";
if (!print_dialog_) {
print_dialog_ = create_dialog_func_(this);
print_dialog_->AddRefToDialog();
}
- if (!print_dialog_->UpdateSettings(job_settings, ranges, &settings_))
+ if (!print_dialog_->UpdateSettings(target_is_pdf, &settings_))
return OnError();
return OK;