OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 : PrintingContext(delegate), context_(NULL) { | 47 : PrintingContext(delegate), context_(NULL) { |
48 } | 48 } |
49 | 49 |
50 PrintingContextWin::~PrintingContextWin() { | 50 PrintingContextWin::~PrintingContextWin() { |
51 ReleaseContext(); | 51 ReleaseContext(); |
52 } | 52 } |
53 | 53 |
54 void PrintingContextWin::AskUserForSettings( | 54 void PrintingContextWin::AskUserForSettings( |
55 int max_pages, | 55 int max_pages, |
56 bool has_selection, | 56 bool has_selection, |
| 57 bool is_scripted, |
57 const PrintSettingsCallback& callback) { | 58 const PrintSettingsCallback& callback) { |
58 NOTIMPLEMENTED(); | 59 NOTIMPLEMENTED(); |
59 } | 60 } |
60 | 61 |
61 PrintingContext::Result PrintingContextWin::UseDefaultSettings() { | 62 PrintingContext::Result PrintingContextWin::UseDefaultSettings() { |
62 DCHECK(!in_print_job_); | 63 DCHECK(!in_print_job_); |
63 | 64 |
64 scoped_refptr<PrintBackend> backend = PrintBackend::CreateInstance(NULL); | 65 scoped_refptr<PrintBackend> backend = PrintBackend::CreateInstance(NULL); |
65 base::string16 default_printer = | 66 base::string16 default_printer = |
66 base::UTF8ToWide(backend->GetDefaultPrinterName()); | 67 base::UTF8ToWide(backend->GetDefaultPrinterName()); |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 | 400 |
400 if (canceled) { | 401 if (canceled) { |
401 result.reset(); | 402 result.reset(); |
402 abort_printing_ = true; | 403 abort_printing_ = true; |
403 } | 404 } |
404 | 405 |
405 return result.Pass(); | 406 return result.Pass(); |
406 } | 407 } |
407 | 408 |
408 } // namespace printing | 409 } // namespace printing |
OLD | NEW |