Infobar material design refresh: bg color
[chromium-blink-merge.git] / printing / backend / print_backend_dummy.cc
blob917078b0448c97db21bd6b4777874d694448269c
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
6 // print backend.
7 #if !defined(PRINT_BACKEND_AVAILABLE)
9 #include "printing/backend/print_backend.h"
11 #include "base/logging.h"
12 #include "base/values.h"
14 namespace printing {
16 class DummyPrintBackend : public PrintBackend {
17 public:
18 DummyPrintBackend() {
21 bool EnumeratePrinters(PrinterList* printer_list) override {
22 return false;
25 std::string GetDefaultPrinterName() override {
26 return std::string();
29 bool GetPrinterSemanticCapsAndDefaults(
30 const std::string& printer_name,
31 PrinterSemanticCapsAndDefaults* printer_info) override {
32 return false;
35 bool GetPrinterCapsAndDefaults(
36 const std::string& printer_name,
37 PrinterCapsAndDefaults* printer_info) override {
38 return false;
41 std::string GetPrinterDriverInfo(
42 const std::string& printer_name) override {
43 return std::string();
46 bool IsValidPrinter(const std::string& printer_name) override {
47 return false;
50 private:
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