| 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 #ifndef PRINTING_BACKEND_PRINT_BACKEND_H_ | 5 #ifndef PRINTING_BACKEND_PRINT_BACKEND_H_ |
| 6 #define PRINTING_BACKEND_PRINT_BACKEND_H_ | 6 #define PRINTING_BACKEND_PRINT_BACKEND_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 | 14 |
| 15 namespace base { |
| 15 class DictionaryValue; | 16 class DictionaryValue; |
| 17 } |
| 16 | 18 |
| 17 // This is the interface for platform-specific code for a print backend | 19 // This is the interface for platform-specific code for a print backend |
| 18 namespace printing { | 20 namespace printing { |
| 19 | 21 |
| 20 struct PrinterBasicInfo { | 22 struct PrinterBasicInfo { |
| 21 PrinterBasicInfo(); | 23 PrinterBasicInfo(); |
| 22 ~PrinterBasicInfo(); | 24 ~PrinterBasicInfo(); |
| 23 | 25 |
| 24 std::string printer_name; | 26 std::string printer_name; |
| 25 std::string printer_description; | 27 std::string printer_description; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 const std::string& printer_name, | 64 const std::string& printer_name, |
| 63 PrinterCapsAndDefaults* printer_info) = 0; | 65 PrinterCapsAndDefaults* printer_info) = 0; |
| 64 | 66 |
| 65 // Returns true if printer_name points to a valid printer. | 67 // Returns true if printer_name points to a valid printer. |
| 66 virtual bool IsValidPrinter(const std::string& printer_name) = 0; | 68 virtual bool IsValidPrinter(const std::string& printer_name) = 0; |
| 67 | 69 |
| 68 // Allocate a print backend. If |print_backend_settings| is NULL, default | 70 // Allocate a print backend. If |print_backend_settings| is NULL, default |
| 69 // settings will be used. | 71 // settings will be used. |
| 70 // Return NULL if no print backend available. | 72 // Return NULL if no print backend available. |
| 71 static scoped_refptr<PrintBackend> CreateInstance( | 73 static scoped_refptr<PrintBackend> CreateInstance( |
| 72 const DictionaryValue* print_backend_settings); | 74 const base::DictionaryValue* print_backend_settings); |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace printing | 77 } // namespace printing |
| 76 | 78 |
| 77 #endif // PRINTING_BACKEND_PRINT_BACKEND_H_ | 79 #endif // PRINTING_BACKEND_PRINT_BACKEND_H_ |
| OLD | NEW |