diff options
author | ckocagil@chromium.org <ckocagil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-08 07:56:36 +0000 |
---|---|---|
committer | ckocagil@chromium.org <ckocagil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-08 07:56:36 +0000 |
commit | 1e4771760a9244d2cef1c544299b976b9f940d12 (patch) | |
tree | f65bb82fa126279d7a6bb47d24205185e5dbfc62 /printing | |
parent | 64bb94fdffc91abd7ab5c2ba8a1054ff445f1467 (diff) | |
download | chromium_src-1e4771760a9244d2cef1c544299b976b9f940d12.zip chromium_src-1e4771760a9244d2cef1c544299b976b9f940d12.tar.gz chromium_src-1e4771760a9244d2cef1c544299b976b9f940d12.tar.bz2 |
Revert of Generalize printer color model handling, get rid of CUPS specific case. Enable supported paper szes… (https://codereview.chromium.org/324523002/)
Reason for revert:
Breaks Linux ASAN http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%281%29/builds/2865
Original issue's description:
> Generalize printer color model handling, get rid of CUPS specific case. Enable supported paper szes reporting for all platforms.
>
> BUG=239879
> NOTRY=true
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=275646
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=275716
TBR=vitalybuka@chromium.org,jschuh@chromium.org,alekseys@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=239879
Review URL: https://codereview.chromium.org/321703002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r-- | printing/backend/print_backend.cc | 5 | ||||
-rw-r--r-- | printing/backend/print_backend.h | 10 | ||||
-rw-r--r-- | printing/backend/print_backend_win.cc | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/printing/backend/print_backend.cc b/printing/backend/print_backend.cc index fefa789..d071201 100644 --- a/printing/backend/print_backend.cc +++ b/printing/backend/print_backend.cc @@ -19,9 +19,12 @@ PrinterSemanticCapsAndDefaults::PrinterSemanticCapsAndDefaults() duplex_capable(false), duplex_default(UNKNOWN_DUPLEX_MODE), color_changeable(false), - color_default(false), + color_default(false) +#if defined (OS_POSIX) + , color_model(UNKNOWN_COLOR_MODEL), bw_model(UNKNOWN_COLOR_MODEL) +#endif {} PrinterSemanticCapsAndDefaults::~PrinterSemanticCapsAndDefaults() {} diff --git a/printing/backend/print_backend.h b/printing/backend/print_backend.h index 3b307f1..30e4512 100644 --- a/printing/backend/print_backend.h +++ b/printing/backend/print_backend.h @@ -48,18 +48,28 @@ struct PRINTING_EXPORT PrinterSemanticCapsAndDefaults { bool color_changeable; bool color_default; + + // These are CUPS specific data, which soon be removed altogether. They are + // not defined under USE_CUPS to do not pull CUPS dependency into common code. +#if defined(OS_POSIX) + // TODO(alekseys): Resolve color model within printing context, do not expose + // it outside of the context. ColorModel color_model; ColorModel bw_model; +#endif +#if defined(OS_WIN) struct Paper { std::string name; gfx::Size size_um; }; + std::vector<Paper> papers; Paper default_paper; std::vector<gfx::Size> dpis; gfx::Size default_dpi; +#endif }; struct PRINTING_EXPORT PrinterCapsAndDefaults { diff --git a/printing/backend/print_backend_win.cc b/printing/backend/print_backend_win.cc index 87c69ee..75c562a 100644 --- a/printing/backend/print_backend_win.cc +++ b/printing/backend/print_backend_win.cc @@ -267,8 +267,6 @@ bool PrintBackendWin::GetPrinterSemanticCapsAndDefaults( // http://msdn.microsoft.com/en-us/library/windows/desktop/dd183552(v=vs.85).aspx caps.color_changeable = (DeviceCapabilities(name, port, DC_COLORDEVICE, NULL, NULL) == 1); - caps.color_model = printing::COLOR; - caps.bw_model = printing::GRAY; caps.duplex_capable = (DeviceCapabilities(name, port, DC_DUPLEX, NULL, NULL) == 1); |