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

Side by Side Diff: printing/printing_context_win.cc

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_win.h ('k') | printing/printing_context_win_unittest.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) 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_win.h" 5 #include "printing/printing_context_win.h"
6 6
7 #include <winspool.h> 7 #include <winspool.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/i18n/file_util_icu.h" 10 #include "base/i18n/file_util_icu.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 private: 116 private:
117 PrintingContextWin& owner_; 117 PrintingContextWin& owner_;
118 HWND owner_hwnd_; 118 HWND owner_hwnd_;
119 IPrintDialogServices* services_; 119 IPrintDialogServices* services_;
120 120
121 DISALLOW_COPY_AND_ASSIGN(CallbackHandler); 121 DISALLOW_COPY_AND_ASSIGN(CallbackHandler);
122 }; 122 };
123 123
124 // static 124 // static
125 PrintingContext* PrintingContext::Create() { 125 PrintingContext* PrintingContext::Create(const std::string& app_locale) {
126 return static_cast<PrintingContext*>(new PrintingContextWin); 126 return static_cast<PrintingContext*>(new PrintingContextWin(app_locale));
127 } 127 }
128 128
129 PrintingContextWin::PrintingContextWin() 129 PrintingContextWin::PrintingContextWin(const std::string& app_locale)
130 : PrintingContext(), 130 : PrintingContext(app_locale),
131 context_(NULL), 131 context_(NULL),
132 dialog_box_(NULL), 132 dialog_box_(NULL),
133 print_dialog_func_(&PrintDlgEx) { 133 print_dialog_func_(&PrintDlgEx) {
134 } 134 }
135 135
136 PrintingContextWin::~PrintingContextWin() { 136 PrintingContextWin::~PrintingContextWin() {
137 ReleaseContext(); 137 ReleaseContext();
138 } 138 }
139 139
140 void PrintingContextWin::AskUserForSettings(HWND view, 140 void PrintingContextWin::AskUserForSettings(HWND view,
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 if (buf_size) { 606 if (buf_size) {
607 buffer->reset(new uint8[buf_size]); 607 buffer->reset(new uint8[buf_size]);
608 memset(buffer->get(), 0, buf_size); 608 memset(buffer->get(), 0, buf_size);
609 if (!GetPrinter(printer, level, buffer->get(), buf_size, &buf_size)) { 609 if (!GetPrinter(printer, level, buffer->get(), buf_size, &buf_size)) {
610 buffer->reset(); 610 buffer->reset();
611 } 611 }
612 } 612 }
613 } 613 }
614 614
615 } // namespace printing 615 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printing_context_win.h ('k') | printing/printing_context_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698