| 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> |
| 11 |
| 10 #include "base/logging.h" | 12 #include "base/logging.h" |
| 11 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 12 #include "base/values.h" | 14 #include "base/values.h" |
| 13 #include "printing/metafile.h" | 15 #include "printing/metafile.h" |
| 14 #include "printing/print_job_constants.h" | 16 #include "printing/print_job_constants.h" |
| 15 #include "printing/units.h" | 17 #include "printing/units.h" |
| 16 | 18 |
| 17 namespace printing { | 19 namespace printing { |
| 18 | 20 |
| 21 #if !defined(USE_CUPS) |
| 19 // static | 22 // static |
| 20 std::unique_ptr<PrintingContext> PrintingContext::Create(Delegate* delegate) { | 23 std::unique_ptr<PrintingContext> PrintingContext::Create(Delegate* delegate) { |
| 21 return base::WrapUnique(new PrintingContextNoSystemDialog(delegate)); | 24 return base::MakeUnique<PrintingContextNoSystemDialog>(delegate); |
| 22 } | 25 } |
| 26 #endif // !defined(USE_CUPS) |
| 23 | 27 |
| 24 PrintingContextNoSystemDialog::PrintingContextNoSystemDialog(Delegate* delegate) | 28 PrintingContextNoSystemDialog::PrintingContextNoSystemDialog(Delegate* delegate) |
| 25 : PrintingContext(delegate) { | 29 : PrintingContext(delegate) { |
| 26 } | 30 } |
| 27 | 31 |
| 28 PrintingContextNoSystemDialog::~PrintingContextNoSystemDialog() { | 32 PrintingContextNoSystemDialog::~PrintingContextNoSystemDialog() { |
| 29 ReleaseContext(); | 33 ReleaseContext(); |
| 30 } | 34 } |
| 31 | 35 |
| 32 void PrintingContextNoSystemDialog::AskUserForSettings( | 36 void PrintingContextNoSystemDialog::AskUserForSettings( |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 abort_printing_ = true; | 142 abort_printing_ = true; |
| 139 in_print_job_ = false; | 143 in_print_job_ = false; |
| 140 } | 144 } |
| 141 | 145 |
| 142 void PrintingContextNoSystemDialog::ReleaseContext() { | 146 void PrintingContextNoSystemDialog::ReleaseContext() { |
| 143 // Intentional No-op. | 147 // Intentional No-op. |
| 144 } | 148 } |
| 145 | 149 |
| 146 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { | 150 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { |
| 147 // Intentional No-op. | 151 // Intentional No-op. |
| 148 return NULL; | 152 return nullptr; |
| 149 } | 153 } |
| 150 | 154 |
| 151 } // namespace printing | 155 } // namespace printing |
| 152 | 156 |
| OLD | NEW |