OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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. |
| 4 |
| 5 #include "printing/backend/print_backend.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 namespace printing { |
| 10 |
| 11 // Provides a stubbed out PrintBackend implementation for use on ChromeOS. |
| 12 class PrintBackendChromeOS : public PrintBackend { |
| 13 public: |
| 14 PrintBackendChromeOS(); |
| 15 virtual ~PrintBackendChromeOS() {} |
| 16 |
| 17 // PrintBackend implementation. |
| 18 virtual bool EnumeratePrinters(PrinterList* printer_list); |
| 19 |
| 20 virtual std::string GetDefaultPrinterName(); |
| 21 |
| 22 virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name, |
| 23 PrinterCapsAndDefaults* printer_info); |
| 24 |
| 25 virtual bool IsValidPrinter(const std::string& printer_name); |
| 26 |
| 27 private: |
| 28 }; |
| 29 |
| 30 PrintBackendChromeOS::PrintBackendChromeOS() {} |
| 31 |
| 32 bool PrintBackendChromeOS::EnumeratePrinters(PrinterList* printer_list) { |
| 33 return true; |
| 34 } |
| 35 |
| 36 |
| 37 |
| 38 bool PrintBackendChromeOS::GetPrinterCapsAndDefaults( |
| 39 const std::string& printer_name, |
| 40 PrinterCapsAndDefaults* printer_info) { |
| 41 NOTREACHED(); |
| 42 return false; |
| 43 } |
| 44 |
| 45 std::string PrintBackendChromeOS::GetDefaultPrinterName() { |
| 46 return std::string(); |
| 47 } |
| 48 |
| 49 bool PrintBackendChromeOS::IsValidPrinter(const std::string& printer_name) { |
| 50 NOTREACHED(); |
| 51 return true; |
| 52 } |
| 53 |
| 54 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( |
| 55 const base::DictionaryValue* print_backend_settings) { |
| 56 return new PrintBackendChromeOS(); |
| 57 } |
| 58 |
| 59 } // namespace printing |
| 60 |
OLD | NEW |