Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: printing/backend/print_backend.h

Issue 10905006: Get semantic capabilities from Print Backend. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: printing/backend/print_backend.h
===================================================================
--- printing/backend/print_backend.h (revision 153539)
+++ printing/backend/print_backend.h (working copy)
@@ -10,6 +10,7 @@
#include <vector>
#include "base/memory/ref_counted.h"
+#include "printing/print_job_constants.h"
#include "printing/printing_export.h"
namespace base {
@@ -32,6 +33,19 @@
typedef std::vector<PrinterBasicInfo> PrinterList;
+struct PRINTING_EXPORT PrinterSemanticCapsAndDefaults {
+ PrinterSemanticCapsAndDefaults();
+ ~PrinterSemanticCapsAndDefaults();
+
+ // Capabilities.
+ bool color_capable;
+ bool duplex_capable;
+
+ // Current defaults.
+ bool color_default;
+ DuplexMode duplex_default;
+};
+
struct PRINTING_EXPORT PrinterCapsAndDefaults {
PrinterCapsAndDefaults();
~PrinterCapsAndDefaults();
@@ -58,6 +72,14 @@
// Get the default printer name. Empty string if no default printer.
virtual std::string GetDefaultPrinterName() = 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)
+ // GetPrinterCapsAndDefaults() will fail, while this function will succeed.
+ virtual bool GetPrinterSemanticCapsAndDefaults(
+ const std::string& printer_name,
+ PrinterSemanticCapsAndDefaults* printer_info) = 0;
+
// Gets the capabilities and defaults for a specific printer.
virtual bool GetPrinterCapsAndDefaults(
const std::string& printer_name,

Powered by Google App Engine
This is Rietveld 408576698