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

Side by Side Diff: printing/printing_context_mac.mm

Issue 121123002: Update uses of UTF conversions in ppapi/, printing/, remoting/, rlz/, sandbox/, skia/, sql/, sync/,… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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/backend/win_helper.cc ('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 #import <iomanip> 10 #import <iomanip>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 // NOTE: Reset |print_info_| with a copy of |sharedPrintInfo| so as to start 143 // NOTE: Reset |print_info_| with a copy of |sharedPrintInfo| so as to start
144 // with a clean slate. 144 // with a clean slate.
145 print_info_.reset([[NSPrintInfo sharedPrintInfo] copy]); 145 print_info_.reset([[NSPrintInfo sharedPrintInfo] copy]);
146 146
147 if (external_preview) { 147 if (external_preview) {
148 if (!SetPrintPreviewJob()) 148 if (!SetPrintPreviewJob())
149 return OnError(); 149 return OnError();
150 } else { 150 } else {
151 // Don't need this for preview. 151 // Don't need this for preview.
152 if (!SetPrinter(UTF16ToUTF8(settings_.device_name())) || 152 if (!SetPrinter(base::UTF16ToUTF8(settings_.device_name())) ||
153 !SetCopiesInPrintSettings(settings_.copies()) || 153 !SetCopiesInPrintSettings(settings_.copies()) ||
154 !SetCollateInPrintSettings(settings_.collate()) || 154 !SetCollateInPrintSettings(settings_.collate()) ||
155 !SetDuplexModeInPrintSettings(settings_.duplex_mode()) || 155 !SetDuplexModeInPrintSettings(settings_.duplex_mode()) ||
156 !SetOutputColor(settings_.color())) { 156 !SetOutputColor(settings_.color())) {
157 return OnError(); 157 return OnError();
158 } 158 }
159 } 159 }
160 160
161 if (!UpdatePageFormatWithPaperInfo() || 161 if (!UpdatePageFormatWithPaperInfo() ||
162 !SetOrientationIsLandscape(settings_.landscape())) { 162 !SetOrientationIsLandscape(settings_.landscape())) {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 void PrintingContextMac::ReleaseContext() { 499 void PrintingContextMac::ReleaseContext() {
500 print_info_.reset(); 500 print_info_.reset();
501 context_ = NULL; 501 context_ = NULL;
502 } 502 }
503 503
504 gfx::NativeDrawingContext PrintingContextMac::context() const { 504 gfx::NativeDrawingContext PrintingContextMac::context() const {
505 return context_; 505 return context_;
506 } 506 }
507 507
508 } // namespace printing 508 } // namespace printing
OLDNEW
« no previous file with comments | « printing/backend/win_helper.cc ('k') | printing/printing_context_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698