summaryrefslogtreecommitdiff
path: root/chromium/printing/backend/print_backend.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/printing/backend/print_backend.h')
-rw-r--r--chromium/printing/backend/print_backend.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/chromium/printing/backend/print_backend.h b/chromium/printing/backend/print_backend.h
index 621278bfc68..4fa8215084c 100644
--- a/chromium/printing/backend/print_backend.h
+++ b/chromium/printing/backend/print_backend.h
@@ -21,6 +21,8 @@ class DictionaryValue;
// This is the interface for platform-specific code for a print backend
namespace printing {
+// Note: There are raw values. The |printer_name| and |printer_description|
+// require further interpretation on Mac. See existing callers for examples.
struct PRINTING_EXPORT PrinterBasicInfo {
PrinterBasicInfo();
PrinterBasicInfo(const PrinterBasicInfo& other);
@@ -33,7 +35,7 @@ struct PRINTING_EXPORT PrinterBasicInfo {
std::map<std::string, std::string> options;
};
-typedef std::vector<PrinterBasicInfo> PrinterList;
+using PrinterList = std::vector<PrinterBasicInfo>;
struct PRINTING_EXPORT PrinterSemanticCapsAndDefaults {
PrinterSemanticCapsAndDefaults();
@@ -88,9 +90,13 @@ class PRINTING_EXPORT PrintBackend
// Enumerates the list of installed local and network printers.
virtual bool EnumeratePrinters(PrinterList* printer_list) = 0;
- // Get the default printer name. Empty string if no default printer.
+ // Gets the default printer name. Empty string if no default printer.
virtual std::string GetDefaultPrinterName() = 0;
+ // Gets the basic printer info for a specific printer.
+ virtual bool GetPrinterBasicInfo(const std::string& printer_name,
+ PrinterBasicInfo* printer_info) = 0;
+
// Gets the semantic capabilities and defaults for a specific printer.
// This is usually a lighter implementation than GetPrinterCapsAndDefaults().
// NOTE: on some old platforms (WinXP without XPS pack)
@@ -111,7 +117,7 @@ class PRINTING_EXPORT PrintBackend
// Returns true if printer_name points to a valid printer.
virtual bool IsValidPrinter(const std::string& printer_name) = 0;
- // Allocate a print backend. If |print_backend_settings| is NULL, default
+ // Allocates a print backend. If |print_backend_settings| is nullptr, default
// settings will be used.
static scoped_refptr<PrintBackend> CreateInstance(
const base::DictionaryValue* print_backend_settings);