| OLD | NEW |
| 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 "chrome/browser/printing/win_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" |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 // abort_printing_ = true; | 377 // abort_printing_ = true; |
| 378 } | 378 } |
| 379 return true; | 379 return true; |
| 380 } | 380 } |
| 381 | 381 |
| 382 bool PrintingContext::InitializeSettings(const DEVMODE& dev_mode, | 382 bool PrintingContext::InitializeSettings(const DEVMODE& dev_mode, |
| 383 const std::wstring& new_device_name, | 383 const std::wstring& new_device_name, |
| 384 const PRINTPAGERANGE* ranges, | 384 const PRINTPAGERANGE* ranges, |
| 385 int number_ranges, | 385 int number_ranges, |
| 386 bool selection_only) { | 386 bool selection_only) { |
| 387 skia::PlatformDeviceWin::InitializeDC(hdc_); | 387 skia::PlatformDevice::InitializeDC(hdc_); |
| 388 DCHECK(GetDeviceCaps(hdc_, CLIPCAPS)); | 388 DCHECK(GetDeviceCaps(hdc_, CLIPCAPS)); |
| 389 DCHECK(GetDeviceCaps(hdc_, RASTERCAPS) & RC_STRETCHDIB); | 389 DCHECK(GetDeviceCaps(hdc_, RASTERCAPS) & RC_STRETCHDIB); |
| 390 DCHECK(GetDeviceCaps(hdc_, RASTERCAPS) & RC_BITMAP64); | 390 DCHECK(GetDeviceCaps(hdc_, RASTERCAPS) & RC_BITMAP64); |
| 391 // Some printers don't advertise these. | 391 // Some printers don't advertise these. |
| 392 // DCHECK(GetDeviceCaps(hdc_, RASTERCAPS) & RC_SCALING); | 392 // DCHECK(GetDeviceCaps(hdc_, RASTERCAPS) & RC_SCALING); |
| 393 // DCHECK(GetDeviceCaps(hdc_, SHADEBLENDCAPS) & SB_CONST_ALPHA); | 393 // DCHECK(GetDeviceCaps(hdc_, SHADEBLENDCAPS) & SB_CONST_ALPHA); |
| 394 // DCHECK(GetDeviceCaps(hdc_, SHADEBLENDCAPS) & SB_PIXEL_ALPHA); | 394 // DCHECK(GetDeviceCaps(hdc_, SHADEBLENDCAPS) & SB_PIXEL_ALPHA); |
| 395 | 395 |
| 396 // StretchDIBits() support is needed for printing. | 396 // StretchDIBits() support is needed for printing. |
| 397 if (!(GetDeviceCaps(hdc_, RASTERCAPS) & RC_STRETCHDIB) || | 397 if (!(GetDeviceCaps(hdc_, RASTERCAPS) & RC_STRETCHDIB) || |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 | 604 |
| 605 if (dialog_options.hDevMode != NULL) | 605 if (dialog_options.hDevMode != NULL) |
| 606 GlobalFree(dialog_options.hDevMode); | 606 GlobalFree(dialog_options.hDevMode); |
| 607 if (dialog_options.hDevNames != NULL) | 607 if (dialog_options.hDevNames != NULL) |
| 608 GlobalFree(dialog_options.hDevNames); | 608 GlobalFree(dialog_options.hDevNames); |
| 609 | 609 |
| 610 return hdc_ ? OK : FAILED; | 610 return hdc_ ? OK : FAILED; |
| 611 } | 611 } |
| 612 | 612 |
| 613 } // namespace printing | 613 } // namespace printing |
| OLD | NEW |