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

Side by Side Diff: printing/printing_context_win.cc

Issue 149212: Move printing related stuff to the root printing project from the browser pro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/printing/win_printing_context.h" 5 #include "printing/printing_context.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/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "base/time_format.h" 12 #include "base/time_format.h"
13 #include "chrome/browser/browser_process.h" 13 #include "printing/printed_document.h"
14 #include "chrome/browser/printing/printed_document.h"
15 #include "skia/ext/platform_device_win.h" 14 #include "skia/ext/platform_device_win.h"
16 15
17 using base::Time; 16 using base::Time;
18 17
19 namespace { 18 namespace {
20 19
21 // Retrieves the content of a GetPrinter call. 20 // Retrieves the content of a GetPrinter call.
22 void GetPrinterHelper(HANDLE printer, int level, scoped_array<uint8>* buffer) { 21 void GetPrinterHelper(HANDLE printer, int level, scoped_array<uint8>* buffer) {
23 DWORD buf_size = 0; 22 DWORD buf_size = 0;
24 GetPrinter(printer, level, NULL, 0, &buf_size); 23 GetPrinter(printer, level, NULL, 0, &buf_size);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 DISALLOW_EVIL_CONSTRUCTORS(CallbackHandler); 136 DISALLOW_EVIL_CONSTRUCTORS(CallbackHandler);
138 }; 137 };
139 138
140 PrintingContext::PrintingContext() 139 PrintingContext::PrintingContext()
141 : hdc_(NULL), 140 : hdc_(NULL),
142 #ifndef NDEBUG 141 #ifndef NDEBUG
143 page_number_(-1), 142 page_number_(-1),
144 #endif 143 #endif
145 dialog_box_(NULL), 144 dialog_box_(NULL),
146 dialog_box_dismissed_(false), 145 dialog_box_dismissed_(false),
147 abort_printing_(false), 146 in_print_job_(false),
148 in_print_job_(false) { 147 abort_printing_(false) {
149 } 148 }
150 149
151 PrintingContext::~PrintingContext() { 150 PrintingContext::~PrintingContext() {
152 ResetSettings(); 151 ResetSettings();
153 } 152 }
154 153
155 PrintingContext::Result PrintingContext::AskUserForSettings( 154 PrintingContext::Result PrintingContext::AskUserForSettings(
156 HWND window, 155 HWND window,
157 int max_pages, 156 int max_pages,
158 bool has_selection) { 157 bool has_selection) {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 598
600 if (dialog_options.hDevMode != NULL) 599 if (dialog_options.hDevMode != NULL)
601 GlobalFree(dialog_options.hDevMode); 600 GlobalFree(dialog_options.hDevMode);
602 if (dialog_options.hDevNames != NULL) 601 if (dialog_options.hDevNames != NULL)
603 GlobalFree(dialog_options.hDevNames); 602 GlobalFree(dialog_options.hDevNames);
604 603
605 return hdc_ ? OK : FAILED; 604 return hdc_ ? OK : FAILED;
606 } 605 }
607 606
608 } // namespace printing 607 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698