1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This is dummy implementation for all configurations where there is no
7 #if !defined(PRINT_BACKEND_AVAILABLE)
9 #include "printing/backend/print_backend.h"
11 #include "base/logging.h"
12 #include "base/values.h"
16 class DummyPrintBackend
: public PrintBackend
{
21 bool EnumeratePrinters(PrinterList
* printer_list
) override
{
25 std::string
GetDefaultPrinterName() override
{
29 bool GetPrinterSemanticCapsAndDefaults(
30 const std::string
& printer_name
,
31 PrinterSemanticCapsAndDefaults
* printer_info
) override
{
35 bool GetPrinterCapsAndDefaults(
36 const std::string
& printer_name
,
37 PrinterCapsAndDefaults
* printer_info
) override
{
41 std::string
GetPrinterDriverInfo(
42 const std::string
& printer_name
) override
{
46 bool IsValidPrinter(const std::string
& printer_name
) override
{
51 ~DummyPrintBackend() override
{}
53 DISALLOW_COPY_AND_ASSIGN(DummyPrintBackend
);
56 scoped_refptr
<PrintBackend
> PrintBackend::CreateInstance(
57 const base::DictionaryValue
* print_backend_settings
) {
58 return new DummyPrintBackend();
61 } // namespace printing
63 #endif // PRINT_BACKEND_AVAILABLE