OLD | NEW |
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_win.h" | 5 #include "printing/printing_context_win.h" |
6 | 6 |
7 #include <winspool.h> | 7 #include <winspool.h> |
8 | 8 |
9 #include "base/i18n/file_util_icu.h" | 9 #include "base/i18n/file_util_icu.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 320 |
321 ResetSettings(); | 321 ResetSettings(); |
322 return OK; | 322 return OK; |
323 } | 323 } |
324 | 324 |
325 void PrintingContextWin::Cancel() { | 325 void PrintingContextWin::Cancel() { |
326 abort_printing_ = true; | 326 abort_printing_ = true; |
327 in_print_job_ = false; | 327 in_print_job_ = false; |
328 if (context_) | 328 if (context_) |
329 CancelDC(context_); | 329 CancelDC(context_); |
330 DismissDialog(); | |
331 } | |
332 | |
333 void PrintingContextWin::DismissDialog() { | |
334 if (dialog_box_) { | 330 if (dialog_box_) { |
335 DestroyWindow(dialog_box_); | 331 DestroyWindow(dialog_box_); |
336 dialog_box_dismissed_ = true; | 332 dialog_box_dismissed_ = true; |
337 } | 333 } |
338 } | 334 } |
339 | 335 |
340 void PrintingContextWin::ReleaseContext() { | 336 void PrintingContextWin::ReleaseContext() { |
341 if (context_) { | 337 if (context_) { |
342 DeleteDC(context_); | 338 DeleteDC(context_); |
343 context_ = NULL; | 339 context_ = NULL; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 if (buf_size) { | 600 if (buf_size) { |
605 buffer->reset(new uint8[buf_size]); | 601 buffer->reset(new uint8[buf_size]); |
606 memset(buffer->get(), 0, buf_size); | 602 memset(buffer->get(), 0, buf_size); |
607 if (!GetPrinter(printer, level, buffer->get(), buf_size, &buf_size)) { | 603 if (!GetPrinter(printer, level, buffer->get(), buf_size, &buf_size)) { |
608 buffer->reset(); | 604 buffer->reset(); |
609 } | 605 } |
610 } | 606 } |
611 } | 607 } |
612 | 608 |
613 } // namespace printing | 609 } // namespace printing |
OLD | NEW |