| 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_no_system_dialog.h" | 5 #include "printing/printing_context_no_system_dialog.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <unicode/ulocdata.h> | 8 #include <unicode/ulocdata.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 bool show_system_dialog, | 85 bool show_system_dialog, |
| 86 int page_count) { | 86 int page_count) { |
| 87 DCHECK(!show_system_dialog); | 87 DCHECK(!show_system_dialog); |
| 88 | 88 |
| 89 if (settings_.dpi() == 0) | 89 if (settings_.dpi() == 0) |
| 90 UseDefaultSettings(); | 90 UseDefaultSettings(); |
| 91 | 91 |
| 92 return OK; | 92 return OK; |
| 93 } | 93 } |
| 94 | 94 |
| 95 PrintingContext::Result PrintingContextNoSystemDialog::InitWithSettings( | |
| 96 const PrintSettings& settings) { | |
| 97 DCHECK(!in_print_job_); | |
| 98 | |
| 99 settings_ = settings; | |
| 100 | |
| 101 return OK; | |
| 102 } | |
| 103 | |
| 104 PrintingContext::Result PrintingContextNoSystemDialog::NewDocument( | 95 PrintingContext::Result PrintingContextNoSystemDialog::NewDocument( |
| 105 const base::string16& document_name) { | 96 const base::string16& document_name) { |
| 106 DCHECK(!in_print_job_); | 97 DCHECK(!in_print_job_); |
| 107 in_print_job_ = true; | 98 in_print_job_ = true; |
| 108 | 99 |
| 109 return OK; | 100 return OK; |
| 110 } | 101 } |
| 111 | 102 |
| 112 PrintingContext::Result PrintingContextNoSystemDialog::NewPage() { | 103 PrintingContext::Result PrintingContextNoSystemDialog::NewPage() { |
| 113 if (abort_printing_) | 104 if (abort_printing_) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // Intentional No-op. | 138 // Intentional No-op. |
| 148 } | 139 } |
| 149 | 140 |
| 150 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { | 141 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { |
| 151 // Intentional No-op. | 142 // Intentional No-op. |
| 152 return nullptr; | 143 return nullptr; |
| 153 } | 144 } |
| 154 | 145 |
| 155 } // namespace printing | 146 } // namespace printing |
| 156 | 147 |
| OLD | NEW |