[email protected] | de6ac32 | 2012-03-05 23:17:25 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 8e553f49 | 2010-10-25 20:05:44 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #include "printing/backend/print_backend.h" | ||||
6 | |||||
skau | 8ffe775 | 2016-06-29 02:10:28 | [diff] [blame] | 7 | namespace { |
skau | a1e0b7a6 | 2016-12-22 23:23:14 | [diff] [blame] | 8 | |
9 | // PrintBackend override for testing. | ||||
10 | printing::PrintBackend* g_print_backend_for_test = nullptr; | ||||
11 | |||||
skau | 8ffe775 | 2016-06-29 02:10:28 | [diff] [blame] | 12 | } // namespace |
13 | |||||
[email protected] | 8e553f49 | 2010-10-25 20:05:44 | [diff] [blame] | 14 | namespace printing { |
15 | |||||
[email protected] | 3fe291b | 2011-06-22 06:18:18 | [diff] [blame] | 16 | PrinterBasicInfo::PrinterBasicInfo() |
17 | : printer_status(0), | ||||
18 | is_default(false) {} | ||||
[email protected] | 8e553f49 | 2010-10-25 20:05:44 | [diff] [blame] | 19 | |
vmpstr | 04b8358f | 2016-02-26 01:38:29 | [diff] [blame] | 20 | PrinterBasicInfo::PrinterBasicInfo(const PrinterBasicInfo& other) = default; |
21 | |||||
[email protected] | 8e553f49 | 2010-10-25 20:05:44 | [diff] [blame] | 22 | PrinterBasicInfo::~PrinterBasicInfo() {} |
23 | |||||
[email protected] | 8b6098e | 2012-09-07 04:21:21 | [diff] [blame] | 24 | PrinterSemanticCapsAndDefaults::PrinterSemanticCapsAndDefaults() |
[email protected] | dfb4a9d | 2014-06-05 21:44:45 | [diff] [blame] | 25 | : collate_capable(false), |
[email protected] | 15b0a34 | 2014-02-05 04:11:22 | [diff] [blame] | 26 | collate_default(false), |
27 | copies_capable(false), | ||||
[email protected] | 15b0a34 | 2014-02-05 04:11:22 | [diff] [blame] | 28 | duplex_capable(false), |
[email protected] | dfb4a9d | 2014-06-05 21:44:45 | [diff] [blame] | 29 | duplex_default(UNKNOWN_DUPLEX_MODE), |
30 | color_changeable(false), | ||||
[email protected] | 53ff43d | 2014-06-08 09:05:45 | [diff] [blame] | 31 | color_default(false), |
[email protected] | dfb4a9d | 2014-06-05 21:44:45 | [diff] [blame] | 32 | color_model(UNKNOWN_COLOR_MODEL), |
33 | bw_model(UNKNOWN_COLOR_MODEL) | ||||
[email protected] | dfb4a9d | 2014-06-05 21:44:45 | [diff] [blame] | 34 | {} |
[email protected] | 8b6098e | 2012-09-07 04:21:21 | [diff] [blame] | 35 | |
vmpstr | bcdec0d | 2016-04-14 01:24:52 | [diff] [blame] | 36 | PrinterSemanticCapsAndDefaults::PrinterSemanticCapsAndDefaults( |
37 | const PrinterSemanticCapsAndDefaults& other) = default; | ||||
38 | |||||
[email protected] | 8b6098e | 2012-09-07 04:21:21 | [diff] [blame] | 39 | PrinterSemanticCapsAndDefaults::~PrinterSemanticCapsAndDefaults() {} |
40 | |||||
[email protected] | d2f05d0 | 2011-01-27 18:51:01 | [diff] [blame] | 41 | PrinterCapsAndDefaults::PrinterCapsAndDefaults() {} |
42 | |||||
vmpstr | 04b8358f | 2016-02-26 01:38:29 | [diff] [blame] | 43 | PrinterCapsAndDefaults::PrinterCapsAndDefaults( |
44 | const PrinterCapsAndDefaults& other) = default; | ||||
45 | |||||
[email protected] | d2f05d0 | 2011-01-27 18:51:01 | [diff] [blame] | 46 | PrinterCapsAndDefaults::~PrinterCapsAndDefaults() {} |
47 | |||||
[email protected] | 8e553f49 | 2010-10-25 20:05:44 | [diff] [blame] | 48 | PrintBackend::~PrintBackend() {} |
49 | |||||
skau | 8ffe775 | 2016-06-29 02:10:28 | [diff] [blame] | 50 | // static |
skau | a1e0b7a6 | 2016-12-22 23:23:14 | [diff] [blame] | 51 | scoped_refptr<PrintBackend> PrintBackend::CreateInstance( |
52 | const base::DictionaryValue* print_backend_settings) { | ||||
53 | return g_print_backend_for_test | ||||
54 | ? g_print_backend_for_test | ||||
55 | : PrintBackend::CreateInstanceImpl(print_backend_settings); | ||||
56 | } | ||||
57 | |||||
58 | // static | ||||
59 | void PrintBackend::SetPrintBackendForTesting(PrintBackend* backend) { | ||||
60 | g_print_backend_for_test = backend; | ||||
61 | } | ||||
62 | |||||
[email protected] | 8e553f49 | 2010-10-25 20:05:44 | [diff] [blame] | 63 | } // namespace printing |