#if !defined(PRINT_BACKEND_AVAILABLE)
#include "printing/backend/print_backend.h"
#include "printing/mojom/print.mojom.h"
namespace printing {
class DummyPrintBackend : public PrintBackend {
public:
DummyPrintBackend() = default;
DummyPrintBackend(const DummyPrintBackend&) = delete;
DummyPrintBackend& operator=(const DummyPrintBackend&) = delete;
mojom::ResultCode EnumeratePrinters(PrinterList& printer_list) override {
return mojom::ResultCode::kFailed;
}
mojom::ResultCode GetDefaultPrinterName(
std::string& default_printer) override {
default_printer = std::string();
return mojom::ResultCode::kSuccess;
}
mojom::ResultCode GetPrinterBasicInfo(
const std::string& printer_name,
PrinterBasicInfo* printer_info) override {
return mojom::ResultCode::kFailed;
}
mojom::ResultCode GetPrinterSemanticCapsAndDefaults(
const std::string& printer_name,
PrinterSemanticCapsAndDefaults* printer_info) override {
return mojom::ResultCode::kFailed;
}
std::vector<std::string> GetPrinterDriverInfo(
const std::string& printer_name) override {
return std::vector<std::string>();
}
bool IsValidPrinter(const std::string& printer_name) override {
return false;
}
private:
~DummyPrintBackend() override = default;
};
scoped_refptr<PrintBackend> PrintBackend::CreateInstanceImpl(
const std::string& ) {
return base::MakeRefCounted<DummyPrintBackend>();
}
}
#endif