chromium/printing/print_job_constants_cups.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "printing/print_job_constants_cups.h"

namespace printing {

// Variations of identifier used for specifying printer color model.
// New ways of specifying a color model should include an entry in
// `kKnownPpdColorSettings`.
const char kCUPSColorMode[] =;
const char kCUPSColorModel[] =;
const char kCUPSPrintoutMode[] =;
const char kCUPSProcessColorModel[] =;
const char kCUPSBrotherMonoColor[] =;
const char kCUPSBrotherPrintQuality[] =;
const char kCUPSCanonCNColorMode[] =;
const char kCUPSCanonCNIJGrayScale[] =;
const char kCUPSEpsonInk[] =;
const char kCUPSHpColorMode[] =;
const char kCUPSHpPjlColorAsGray[] =;
const char kCUPSKonicaMinoltaSelectColor[] =;
const char kCUPSLexmarkBLW[] =;
const char kCUPSOkiControl[] =;
const char kCUPSSharpARCMode[] =;
const char kCUPSXeroxXROutputColor[] =;
const char kCUPSXeroxXRXColor[] =;

// Variations of identifier used for specifying printer color model choice.
const char kAuto[] =;
const char kBlack[] =;
const char kCMYK[] =;
const char kKCMY[] =;
const char kCMY_K[] =;
const char kCMY[] =;
const char kColor[] =;
const char kDraftGray[] =;
const char kEpsonColor[] =;
const char kEpsonMono[] =;
const char kFullColor[] =;
const char kGray[] =;
const char kGrayscale[] =;
const char kGreyscale[] =;
const char kHighGray[] =;
const char kHpColorPrint[] =;
const char kHpGrayscalePrint[] =;
const char kHpPjlColorAsGrayNo[] =;
const char kHpPjlColorAsGrayYes[] =;
const char kLexmarkBLWFalse[] =;
const char kLexmarkBLWTrue[] =;
const char kMono[] =;
const char kMonochrome[] =;
const char kNormal[] =;
const char kNormalGray[] =;
const char kOne[] =;
const char kPrintAsColor[] =;
const char kPrintAsGrayscale[] =;
const char kRGB[] =;
const char kRGBA[] =;
const char kRGB16[] =;
const char kSamsungColorFalse[] =;
const char kSamsungColorTrue[] =;
const char kSharpCMColor[] =;
const char kSharpCMBW[] =;
const char kXeroxAutomatic[] =;
const char kXeroxBW[] =;
const char kZero[] =;

#if BUILDFLAG(IS_MAC)
base::span<const PpdColorSetting> GetKnownPpdColorSettings() {
  static const PpdColorSetting kKnownPpdColorSettings[] = {
      {kCUPSBrotherMonoColor, kMono, kFullColor},            // Brother
      {kCUPSBrotherPrintQuality, kBlack, kColor},            // Brother
      {kCUPSCanonCNColorMode, kMono, kColor},                // Canon
      {kCUPSCanonCNIJGrayScale, kOne, kZero},                // Canon
      {kCUPSColorMode, kMonochrome, kColor},                 // Samsung
      {kCUPSColorModel, kGray, kColor},                      // Generic
      {kCUPSEpsonInk, kEpsonMono, kEpsonColor},              // Epson
      {kCUPSHpColorMode, kHpGrayscalePrint, kHpColorPrint},  // HP
      {kCUPSHpPjlColorAsGray, kHpPjlColorAsGrayYes, kHpPjlColorAsGrayNo},  // HP
      {kCUPSKonicaMinoltaSelectColor, kGrayscale, kColor},   // Konica Minolta
      {kCUPSLexmarkBLW, kLexmarkBLWTrue, kLexmarkBLWFalse},  // Lexmark
      {kCUPSOkiControl, kGray, kAuto},                       // Oki
      {kCUPSPrintoutMode, kNormalGray, kNormal},             // Foomatic
      {kCUPSSharpARCMode, kSharpCMBW, kSharpCMColor},        // Sharp
      {kCUPSXeroxXROutputColor, kPrintAsGrayscale, kPrintAsColor},  // Xerox
      {kCUPSXeroxXRXColor, kXeroxBW, kXeroxAutomatic},              // Xerox
  };
  return base::make_span(kKnownPpdColorSettings);
}
#endif

}  // namespace printing