| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "printing/backend/print_backend.h" | 5 #include "printing/backend/print_backend.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace printing { | 9 namespace printing { |
| 10 | 10 |
| 11 // Provides a stubbed out PrintBackend implementation for use on ChromeOS. | 11 // Provides a stubbed out PrintBackend implementation for use on ChromeOS. |
| 12 class PrintBackendChromeOS : public PrintBackend { | 12 class PrintBackendChromeOS : public PrintBackend { |
| 13 public: | 13 public: |
| 14 PrintBackendChromeOS(); | 14 PrintBackendChromeOS(); |
| 15 | 15 |
| 16 // PrintBackend implementation. | 16 // PrintBackend implementation. |
| 17 bool EnumeratePrinters(PrinterList* printer_list) override; | 17 bool EnumeratePrinters(PrinterList* printer_list) override; |
| 18 std::string GetDefaultPrinterName() override; | 18 std::string GetDefaultPrinterName() override; |
| 19 bool GetPrinterBasicInfo(const std::string& printer_name, |
| 20 PrinterBasicInfo* printer_info) override; |
| 19 bool GetPrinterSemanticCapsAndDefaults( | 21 bool GetPrinterSemanticCapsAndDefaults( |
| 20 const std::string& printer_name, | 22 const std::string& printer_name, |
| 21 PrinterSemanticCapsAndDefaults* printer_info) override; | 23 PrinterSemanticCapsAndDefaults* printer_info) override; |
| 22 bool GetPrinterCapsAndDefaults(const std::string& printer_name, | 24 bool GetPrinterCapsAndDefaults(const std::string& printer_name, |
| 23 PrinterCapsAndDefaults* printer_info) override; | 25 PrinterCapsAndDefaults* printer_info) override; |
| 24 std::string GetPrinterDriverInfo(const std::string& printer_name) override; | 26 std::string GetPrinterDriverInfo(const std::string& printer_name) override; |
| 25 bool IsValidPrinter(const std::string& printer_name) override; | 27 bool IsValidPrinter(const std::string& printer_name) override; |
| 26 | 28 |
| 27 protected: | 29 protected: |
| 28 ~PrintBackendChromeOS() override {} | 30 ~PrintBackendChromeOS() override {} |
| 29 }; | 31 }; |
| 30 | 32 |
| 31 PrintBackendChromeOS::PrintBackendChromeOS() {} | 33 PrintBackendChromeOS::PrintBackendChromeOS() {} |
| 32 | 34 |
| 33 bool PrintBackendChromeOS::EnumeratePrinters(PrinterList* printer_list) { | 35 bool PrintBackendChromeOS::EnumeratePrinters(PrinterList* printer_list) { |
| 34 return true; | 36 return true; |
| 35 } | 37 } |
| 36 | 38 |
| 39 bool PrintBackendChromeOS::GetPrinterBasicInfo(const std::string& printer_name, |
| 40 PrinterBasicInfo* printer_info) { |
| 41 return false; |
| 42 } |
| 43 |
| 37 bool PrintBackendChromeOS::GetPrinterSemanticCapsAndDefaults( | 44 bool PrintBackendChromeOS::GetPrinterSemanticCapsAndDefaults( |
| 38 const std::string& printer_name, | 45 const std::string& printer_name, |
| 39 PrinterSemanticCapsAndDefaults* printer_info) { | 46 PrinterSemanticCapsAndDefaults* printer_info) { |
| 40 NOTREACHED(); | 47 NOTREACHED(); |
| 41 return false; | 48 return false; |
| 42 } | 49 } |
| 43 | 50 |
| 44 bool PrintBackendChromeOS::GetPrinterCapsAndDefaults( | 51 bool PrintBackendChromeOS::GetPrinterCapsAndDefaults( |
| 45 const std::string& printer_name, | 52 const std::string& printer_name, |
| 46 PrinterCapsAndDefaults* printer_info) { | 53 PrinterCapsAndDefaults* printer_info) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 63 return true; | 70 return true; |
| 64 } | 71 } |
| 65 | 72 |
| 66 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( | 73 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( |
| 67 const base::DictionaryValue* print_backend_settings) { | 74 const base::DictionaryValue* print_backend_settings) { |
| 68 return new PrintBackendChromeOS(); | 75 return new PrintBackendChromeOS(); |
| 69 } | 76 } |
| 70 | 77 |
| 71 } // namespace printing | 78 } // namespace printing |
| 72 | 79 |
| OLD | NEW |