OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 virtual ~PrintBackendChromeOS() {} | 15 virtual ~PrintBackendChromeOS() {} |
16 | 16 |
17 // PrintBackend implementation. | 17 // PrintBackend implementation. |
18 virtual bool EnumeratePrinters(PrinterList* printer_list); | 18 virtual bool EnumeratePrinters(PrinterList* printer_list); |
19 | 19 |
20 virtual std::string GetDefaultPrinterName(); | 20 virtual std::string GetDefaultPrinterName(); |
21 | 21 |
22 virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name, | 22 virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name, |
23 PrinterCapsAndDefaults* printer_info); | 23 PrinterCapsAndDefaults* printer_info); |
24 | 24 |
| 25 virtual bool GetPrinterDriverInfo(const std::string& printer_name, |
| 26 PrinterDriverInfo* driver_info); |
| 27 |
25 virtual bool IsValidPrinter(const std::string& printer_name); | 28 virtual bool IsValidPrinter(const std::string& printer_name); |
26 | 29 |
27 private: | 30 private: |
28 }; | 31 }; |
29 | 32 |
30 PrintBackendChromeOS::PrintBackendChromeOS() {} | 33 PrintBackendChromeOS::PrintBackendChromeOS() {} |
31 | 34 |
32 bool PrintBackendChromeOS::EnumeratePrinters(PrinterList* printer_list) { | 35 bool PrintBackendChromeOS::EnumeratePrinters(PrinterList* printer_list) { |
33 return true; | 36 return true; |
34 } | 37 } |
35 | 38 |
36 | 39 |
37 | 40 |
38 bool PrintBackendChromeOS::GetPrinterCapsAndDefaults( | 41 bool PrintBackendChromeOS::GetPrinterCapsAndDefaults( |
39 const std::string& printer_name, | 42 const std::string& printer_name, |
40 PrinterCapsAndDefaults* printer_info) { | 43 PrinterCapsAndDefaults* printer_info) { |
41 NOTREACHED(); | 44 NOTREACHED(); |
42 return false; | 45 return false; |
43 } | 46 } |
44 | 47 |
| 48 bool PrintBackendChromeOS::GetPrinterDriverInfo( |
| 49 const std::string& printer_name, |
| 50 PrinterDriverInfo* driver_info) { |
| 51 NOTREACHED(); |
| 52 return false; |
| 53 } |
| 54 |
45 std::string PrintBackendChromeOS::GetDefaultPrinterName() { | 55 std::string PrintBackendChromeOS::GetDefaultPrinterName() { |
46 return std::string(); | 56 return std::string(); |
47 } | 57 } |
48 | 58 |
49 bool PrintBackendChromeOS::IsValidPrinter(const std::string& printer_name) { | 59 bool PrintBackendChromeOS::IsValidPrinter(const std::string& printer_name) { |
50 NOTREACHED(); | 60 NOTREACHED(); |
51 return true; | 61 return true; |
52 } | 62 } |
53 | 63 |
54 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( | 64 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( |
55 const base::DictionaryValue* print_backend_settings) { | 65 const base::DictionaryValue* print_backend_settings) { |
56 return new PrintBackendChromeOS(); | 66 return new PrintBackendChromeOS(); |
57 } | 67 } |
58 | 68 |
59 } // namespace printing | 69 } // namespace printing |
60 | 70 |
OLD | NEW |