diff options
author | gene@chromium.org <gene@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 04:21:21 +0000 |
---|---|---|
committer | gene@chromium.org <gene@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 04:21:21 +0000 |
commit | 8b6098e412722d5b34d6a085f8fc0fd5cb78c6f5 (patch) | |
tree | b4c7a2a65a49dbf5655b43a3a96394979847f7d5 /printing/backend/print_backend.h | |
parent | 58df36ac048af7d31edf3b7b1bf217853c8b3c20 (diff) | |
download | chromium_src-8b6098e412722d5b34d6a085f8fc0fd5cb78c6f5.zip chromium_src-8b6098e412722d5b34d6a085f8fc0fd5cb78c6f5.tar.gz chromium_src-8b6098e412722d5b34d6a085f8fc0fd5cb78c6f5.tar.bz2 |
Get semantic capabilities from Print Backend.
Moved OS specific code into OS specific print backends (vs. print_system_task_proxy.cc).
On Windows get capabilities using native API (vs. XPS parsing)
Some clean up on code and interfaces for Print Backend.
BUG=144031
TEST=Verify Print Preview on ALL platforms (Win XP, Win 7, Linux, Mac).
Review URL: https://chromiumcodereview.appspot.com/10905006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/backend/print_backend.h')
-rw-r--r-- | printing/backend/print_backend.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/printing/backend/print_backend.h b/printing/backend/print_backend.h index dfa4762..3cbf162 100644 --- a/printing/backend/print_backend.h +++ b/printing/backend/print_backend.h @@ -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 @@ struct PRINTING_EXPORT PrinterBasicInfo { 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 @@ class PRINTING_EXPORT PrintBackend // 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, |