Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: printing/printing_context_mac.mm

Issue 7828106: Revert 100233 - PrintPreview: Added code to identify the printer default duplex value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/print_job_constants.h ('k') | printing/printing_context_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/printing_context_mac.h" 5 #include "printing/printing_context_mac.h"
6 6
7 #import <ApplicationServices/ApplicationServices.h> 7 #import <ApplicationServices/ApplicationServices.h>
8 #import <AppKit/AppKit.h> 8 #import <AppKit/AppKit.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 bool PrintingContextMac::SetDuplexModeInPrintSettings(DuplexMode mode) { 230 bool PrintingContextMac::SetDuplexModeInPrintSettings(DuplexMode mode) {
231 PMDuplexMode duplexSetting; 231 PMDuplexMode duplexSetting;
232 switch (mode) { 232 switch (mode) {
233 case LONG_EDGE: 233 case LONG_EDGE:
234 duplexSetting = kPMDuplexNoTumble; 234 duplexSetting = kPMDuplexNoTumble;
235 break; 235 break;
236 case SHORT_EDGE: 236 case SHORT_EDGE:
237 duplexSetting = kPMDuplexTumble; 237 duplexSetting = kPMDuplexTumble;
238 break; 238 break;
239 case SIMPLEX: 239 default:
240 duplexSetting = kPMDuplexNone; 240 duplexSetting = kPMDuplexNone;
241 break; 241 break;
242 default: // UNKNOWN_DUPLEX_MODE
243 return true;
244 } 242 }
245 243
246 PMPrintSettings pmPrintSettings = 244 PMPrintSettings pmPrintSettings =
247 static_cast<PMPrintSettings>([print_info_.get() PMPrintSettings]); 245 static_cast<PMPrintSettings>([print_info_.get() PMPrintSettings]);
248 return PMSetDuplex(pmPrintSettings, duplexSetting) == noErr; 246 return PMSetDuplex(pmPrintSettings, duplexSetting) == noErr;
249 } 247 }
250 248
251 bool PrintingContextMac::SetOutputColor(int color_mode) { 249 bool PrintingContextMac::SetOutputColor(int color_mode) {
252 PMPrintSettings pmPrintSettings = 250 PMPrintSettings pmPrintSettings =
253 static_cast<PMPrintSettings>([print_info_.get() PMPrintSettings]); 251 static_cast<PMPrintSettings>([print_info_.get() PMPrintSettings]);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 void PrintingContextMac::ReleaseContext() { 375 void PrintingContextMac::ReleaseContext() {
378 print_info_.reset(); 376 print_info_.reset();
379 context_ = NULL; 377 context_ = NULL;
380 } 378 }
381 379
382 gfx::NativeDrawingContext PrintingContextMac::context() const { 380 gfx::NativeDrawingContext PrintingContextMac::context() const {
383 return context_; 381 return context_;
384 } 382 }
385 383
386 } // namespace printing 384 } // namespace printing
OLDNEW
« no previous file with comments | « printing/print_job_constants.h ('k') | printing/printing_context_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698