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

Side by Side Diff: printing/printing_context_mac.mm

Issue 5636001: On Chrome OS, use the application locale to determine the default paper size ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Review comments addressed Created 10 years 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/printing_context_mac.h ('k') | printing/printing_context_win.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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"
11 #include "base/mac/scoped_cftyperef.h" 11 #include "base/mac/scoped_cftyperef.h"
12 #include "base/sys_string_conversions.h" 12 #include "base/sys_string_conversions.h"
13 #include "printing/print_settings_initializer_mac.h" 13 #include "printing/print_settings_initializer_mac.h"
14 14
15 namespace printing { 15 namespace printing {
16 16
17 // static 17 // static
18 PrintingContext* PrintingContext::Create() { 18 PrintingContext* PrintingContext::Create(const std::string& app_locale) {
19 return static_cast<PrintingContext*>(new PrintingContextMac); 19 return static_cast<PrintingContext*>(new PrintingContextMac(app_locale));
20 } 20 }
21 21
22 PrintingContextMac::PrintingContextMac() 22 PrintingContextMac::PrintingContextMac(const std::string& app_locale)
23 : PrintingContext(), 23 : PrintingContext(app_locale),
24 print_info_(NULL), 24 print_info_(NULL),
25 context_(NULL) { 25 context_(NULL) {
26 } 26 }
27 27
28 PrintingContextMac::~PrintingContextMac() { 28 PrintingContextMac::~PrintingContextMac() {
29 ReleaseContext(); 29 ReleaseContext();
30 } 30 }
31 31
32 void PrintingContextMac::AskUserForSettings(gfx::NativeView parent_view, 32 void PrintingContextMac::AskUserForSettings(gfx::NativeView parent_view,
33 int max_pages, 33 int max_pages,
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 print_info_ = nil; 211 print_info_ = nil;
212 context_ = NULL; 212 context_ = NULL;
213 } 213 }
214 } 214 }
215 215
216 gfx::NativeDrawingContext PrintingContextMac::context() const { 216 gfx::NativeDrawingContext PrintingContextMac::context() const {
217 return context_; 217 return context_;
218 } 218 }
219 219
220 } // namespace printing 220 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printing_context_mac.h ('k') | printing/printing_context_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698