| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 // This is dummy implementation for all configurations where there is no | 5 // This is dummy implementation for all configurations where there is no |
| 6 // print backend. | 6 // print backend. |
| 7 #if !defined(PRINT_BACKEND_AVAILABLE) | 7 #if !defined(PRINT_BACKEND_AVAILABLE) |
| 8 | 8 |
| 9 #include "printing/backend/print_backend.h" | 9 #include "printing/backend/print_backend.h" |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 | 14 |
| 15 namespace printing { | 15 namespace printing { |
| 16 | 16 |
| 17 class DummyPrintBackend : public PrintBackend { | 17 class DummyPrintBackend : public PrintBackend { |
| 18 public: | 18 public: |
| 19 DummyPrintBackend() { | 19 DummyPrintBackend() { |
| 20 } | 20 } |
| 21 | 21 |
| 22 bool EnumeratePrinters(PrinterList* printer_list) override { | 22 bool EnumeratePrinters(PrinterList* printer_list) override { |
| 23 return false; | 23 return false; |
| 24 } | 24 } |
| 25 | 25 |
| 26 std::string GetDefaultPrinterName() override { | 26 std::string GetDefaultPrinterName() override { |
| 27 return std::string(); | 27 return std::string(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 bool GetPrinterBasicInfo(const std::string& printer_name, |
| 31 PrinterBasicInfo* printer_info) override { |
| 32 return false; |
| 33 } |
| 34 |
| 30 bool GetPrinterSemanticCapsAndDefaults( | 35 bool GetPrinterSemanticCapsAndDefaults( |
| 31 const std::string& printer_name, | 36 const std::string& printer_name, |
| 32 PrinterSemanticCapsAndDefaults* printer_info) override { | 37 PrinterSemanticCapsAndDefaults* printer_info) override { |
| 33 return false; | 38 return false; |
| 34 } | 39 } |
| 35 | 40 |
| 36 bool GetPrinterCapsAndDefaults( | 41 bool GetPrinterCapsAndDefaults( |
| 37 const std::string& printer_name, | 42 const std::string& printer_name, |
| 38 PrinterCapsAndDefaults* printer_info) override { | 43 PrinterCapsAndDefaults* printer_info) override { |
| 39 return false; | 44 return false; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 55 }; | 60 }; |
| 56 | 61 |
| 57 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( | 62 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( |
| 58 const base::DictionaryValue* print_backend_settings) { | 63 const base::DictionaryValue* print_backend_settings) { |
| 59 return new DummyPrintBackend(); | 64 return new DummyPrintBackend(); |
| 60 } | 65 } |
| 61 | 66 |
| 62 } // namespace printing | 67 } // namespace printing |
| 63 | 68 |
| 64 #endif // PRINT_BACKEND_AVAILABLE | 69 #endif // PRINT_BACKEND_AVAILABLE |
| OLD | NEW |