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 #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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 PrinterCapsAndDefaults* printer_info) = 0; | 87 PrinterCapsAndDefaults* printer_info) = 0; |
88 | 88 |
89 // Gets the information about driver for a specific printer. | 89 // Gets the information about driver for a specific printer. |
90 virtual std::string GetPrinterDriverInfo( | 90 virtual std::string GetPrinterDriverInfo( |
91 const std::string& printer_name) = 0; | 91 const std::string& printer_name) = 0; |
92 | 92 |
93 // Returns true if printer_name points to a valid printer. | 93 // Returns true if printer_name points to a valid printer. |
94 virtual bool IsValidPrinter(const std::string& printer_name) = 0; | 94 virtual bool IsValidPrinter(const std::string& printer_name) = 0; |
95 | 95 |
96 // Simplify title to resolve issue with some drivers. | 96 // Simplify title to resolve issue with some drivers. |
97 static string16 SimplifyDocumentTitle(const string16& title); | 97 static base::string16 SimplifyDocumentTitle(const base::string16& title); |
98 | 98 |
99 // Allocate a print backend. If |print_backend_settings| is NULL, default | 99 // Allocate a print backend. If |print_backend_settings| is NULL, default |
100 // settings will be used. | 100 // settings will be used. |
101 // Return NULL if no print backend available. | 101 // Return NULL if no print backend available. |
102 static scoped_refptr<PrintBackend> CreateInstance( | 102 static scoped_refptr<PrintBackend> CreateInstance( |
103 const base::DictionaryValue* print_backend_settings); | 103 const base::DictionaryValue* print_backend_settings); |
104 | 104 |
105 protected: | 105 protected: |
106 friend class base::RefCountedThreadSafe<PrintBackend>; | 106 friend class base::RefCountedThreadSafe<PrintBackend>; |
107 virtual ~PrintBackend(); | 107 virtual ~PrintBackend(); |
108 }; | 108 }; |
109 | 109 |
110 } // namespace printing | 110 } // namespace printing |
111 | 111 |
112 #endif // PRINTING_BACKEND_PRINT_BACKEND_H_ | 112 #endif // PRINTING_BACKEND_PRINT_BACKEND_H_ |
OLD | NEW |