printing_features.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef PRINTING_PRINTING_FEATURES_H_
  5. #define PRINTING_PRINTING_FEATURES_H_
  6. #include "base/component_export.h"
  7. #include "base/feature_list.h"
  8. #include "base/metrics/field_trial_params.h"
  9. #include "build/build_config.h"
  10. #include "printing/buildflags/buildflags.h"
  11. namespace printing {
  12. namespace features {
  13. // The following features are declared alphabetically. The features should be
  14. // documented with descriptions of their behaviors in the .cc file.
  15. #if BUILDFLAG(IS_MAC)
  16. COMPONENT_EXPORT(PRINTING_BASE)
  17. extern const base::Feature kCupsIppPrintingBackend;
  18. #endif // BUILDFLAG(IS_MAC)
  19. #if BUILDFLAG(IS_WIN)
  20. COMPONENT_EXPORT(PRINTING_BASE)
  21. extern const base::Feature kPrintWithPostScriptType42Fonts;
  22. COMPONENT_EXPORT(PRINTING_BASE)
  23. extern const base::Feature kPrintWithReducedRasterization;
  24. COMPONENT_EXPORT(PRINTING_BASE)
  25. extern const base::Feature kReadPrinterCapabilitiesWithXps;
  26. COMPONENT_EXPORT(PRINTING_BASE)
  27. extern const base::Feature kUseXpsForPrinting;
  28. COMPONENT_EXPORT(PRINTING_BASE)
  29. extern const base::Feature kUseXpsForPrintingFromPdf;
  30. // Helper function to determine if there is any print path which could require
  31. // the use of XPS print capabilities.
  32. COMPONENT_EXPORT(PRINTING_BASE) bool IsXpsPrintCapabilityRequired();
  33. // Helper function to determine if printing of a document from a particular
  34. // source should be done using XPS printing API instead of with GDI.
  35. COMPONENT_EXPORT(PRINTING_BASE)
  36. bool ShouldPrintUsingXps(bool source_is_pdf);
  37. #endif // BUILDFLAG(IS_WIN)
  38. #if BUILDFLAG(ENABLE_OOP_PRINTING)
  39. COMPONENT_EXPORT(PRINTING_BASE)
  40. extern const base::Feature kEnableOopPrintDrivers;
  41. COMPONENT_EXPORT(PRINTING_BASE)
  42. extern const base::FeatureParam<bool> kEnableOopPrintDriversJobPrint;
  43. COMPONENT_EXPORT(PRINTING_BASE)
  44. extern const base::FeatureParam<bool> kEnableOopPrintDriversSandbox;
  45. #endif // BUILDFLAG(ENABLE_OOP_PRINTING)
  46. #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
  47. COMPONENT_EXPORT(PRINTING_BASE)
  48. extern const base::Feature kEnablePrintContentAnalysis;
  49. #endif // BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
  50. } // namespace features
  51. } // namespace printing
  52. #endif // PRINTING_PRINTING_FEATURES_H_