summaryrefslogtreecommitdiffstats
path: root/printing/printing_context_mac.mm
diff options
context:
space:
mode:
authorkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-31 16:12:36 +0000
committerkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-31 16:12:36 +0000
commit37a401bfb45cf6d197c7bfa23f6f2dc73800d206 (patch)
treeebfcc300a5c1bc33fd77fc4ebf3a2515753457e7 /printing/printing_context_mac.mm
parent92acf3449e8092146151cef5ffee6a05d25b46bd (diff)
downloadchromium_src-37a401bfb45cf6d197c7bfa23f6f2dc73800d206.zip
chromium_src-37a401bfb45cf6d197c7bfa23f6f2dc73800d206.tar.gz
chromium_src-37a401bfb45cf6d197c7bfa23f6f2dc73800d206.tar.bz2
PrintPreview: Added a helper function to get print job settings from dictionary.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6758014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80008 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/printing_context_mac.mm')
-rw-r--r--printing/printing_context_mac.mm9
1 files changed, 3 insertions, 6 deletions
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index cf6ea9f..9357e77 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -11,7 +11,6 @@
#include "base/mac/scoped_cftyperef.h"
#include "base/sys_string_conversions.h"
#include "base/values.h"
-#include "printing/print_job_constants.h"
#include "printing/print_settings_initializer_mac.h"
namespace printing {
@@ -93,14 +92,12 @@ PrintingContext::Result PrintingContextMac::UpdatePrintSettings(
print_info_.reset([[NSPrintInfo sharedPrintInfo] copy]);
bool landscape;
- if (!job_settings.GetBoolean(kSettingLandscape, &landscape))
- return OnError();
- settings_.SetOrientation(landscape);
-
std::string printer_name;
- if (!job_settings.GetString(kSettingPrinterName, &printer_name))
+ if (!GetSettingsFromDict(job_settings, &landscape, &printer_name))
return OnError();
+ settings_.SetOrientation(landscape);
+
if (!SetPrinter(printer_name))
return OnError();