Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / printing / backend / print_backend_chromeos.cc
blobc206d51b0f1e52897f6a2ba923011d4ae0f4f003
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
3 // found in the LICENSE file.
5 #include "printing/backend/print_backend.h"
7 #include "base/logging.h"
9 namespace printing {
11 // Provides a stubbed out PrintBackend implementation for use on ChromeOS.
12 class PrintBackendChromeOS : public PrintBackend {
13 public:
14 PrintBackendChromeOS();
16 // PrintBackend implementation.
17 virtual bool EnumeratePrinters(PrinterList* printer_list) OVERRIDE;
18 virtual std::string GetDefaultPrinterName() OVERRIDE;
19 virtual bool GetPrinterSemanticCapsAndDefaults(
20 const std::string& printer_name,
21 PrinterSemanticCapsAndDefaults* printer_info) OVERRIDE;
22 virtual bool GetPrinterCapsAndDefaults(
23 const std::string& printer_name,
24 PrinterCapsAndDefaults* printer_info) OVERRIDE;
25 virtual std::string GetPrinterDriverInfo(
26 const std::string& printer_name) OVERRIDE;
27 virtual bool IsValidPrinter(const std::string& printer_name) OVERRIDE;
29 protected:
30 virtual ~PrintBackendChromeOS() {}
33 PrintBackendChromeOS::PrintBackendChromeOS() {}
35 bool PrintBackendChromeOS::EnumeratePrinters(PrinterList* printer_list) {
36 return true;
39 bool PrintBackendChromeOS::GetPrinterSemanticCapsAndDefaults(
40 const std::string& printer_name,
41 PrinterSemanticCapsAndDefaults* printer_info) {
42 NOTREACHED();
43 return false;
46 bool PrintBackendChromeOS::GetPrinterCapsAndDefaults(
47 const std::string& printer_name,
48 PrinterCapsAndDefaults* printer_info) {
49 NOTREACHED();
50 return false;
53 std::string PrintBackendChromeOS::GetPrinterDriverInfo(
54 const std::string& printer_name) {
55 NOTREACHED();
56 return std::string();
59 std::string PrintBackendChromeOS::GetDefaultPrinterName() {
60 return std::string();
63 bool PrintBackendChromeOS::IsValidPrinter(const std::string& printer_name) {
64 NOTREACHED();
65 return true;
68 scoped_refptr<PrintBackend> PrintBackend::CreateInstance(
69 const base::DictionaryValue* print_backend_settings) {
70 return new PrintBackendChromeOS();
73 } // namespace printing