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 virtual bool EnumeratePrinters(PrinterList* printer_list) override; | 17 bool EnumeratePrinters(PrinterList* printer_list) override; |
18 virtual std::string GetDefaultPrinterName() override; | 18 std::string GetDefaultPrinterName() override; |
19 virtual bool GetPrinterSemanticCapsAndDefaults( | 19 bool GetPrinterSemanticCapsAndDefaults( |
20 const std::string& printer_name, | 20 const std::string& printer_name, |
21 PrinterSemanticCapsAndDefaults* printer_info) override; | 21 PrinterSemanticCapsAndDefaults* printer_info) override; |
22 virtual bool GetPrinterCapsAndDefaults( | 22 bool GetPrinterCapsAndDefaults(const std::string& printer_name, |
23 const std::string& printer_name, | 23 PrinterCapsAndDefaults* printer_info) override; |
24 PrinterCapsAndDefaults* printer_info) override; | 24 std::string GetPrinterDriverInfo(const std::string& printer_name) override; |
25 virtual std::string GetPrinterDriverInfo( | 25 bool IsValidPrinter(const std::string& printer_name) override; |
26 const std::string& printer_name) override; | |
27 virtual bool IsValidPrinter(const std::string& printer_name) override; | |
28 | 26 |
29 protected: | 27 protected: |
30 virtual ~PrintBackendChromeOS() {} | 28 ~PrintBackendChromeOS() override {} |
31 }; | 29 }; |
32 | 30 |
33 PrintBackendChromeOS::PrintBackendChromeOS() {} | 31 PrintBackendChromeOS::PrintBackendChromeOS() {} |
34 | 32 |
35 bool PrintBackendChromeOS::EnumeratePrinters(PrinterList* printer_list) { | 33 bool PrintBackendChromeOS::EnumeratePrinters(PrinterList* printer_list) { |
36 return true; | 34 return true; |
37 } | 35 } |
38 | 36 |
39 bool PrintBackendChromeOS::GetPrinterSemanticCapsAndDefaults( | 37 bool PrintBackendChromeOS::GetPrinterSemanticCapsAndDefaults( |
40 const std::string& printer_name, | 38 const std::string& printer_name, |
(...skipping 24 matching lines...) Expand all Loading... |
65 return true; | 63 return true; |
66 } | 64 } |
67 | 65 |
68 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( | 66 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( |
69 const base::DictionaryValue* print_backend_settings) { | 67 const base::DictionaryValue* print_backend_settings) { |
70 return new PrintBackendChromeOS(); | 68 return new PrintBackendChromeOS(); |
71 } | 69 } |
72 | 70 |
73 } // namespace printing | 71 } // namespace printing |
74 | 72 |
OLD | NEW |