From c006076f46c564f6f108aaee1e2ee930d72a552e Mon Sep 17 00:00:00 2001 From: Alan Screen Date: Fri, 22 Nov 2019 17:52:06 +0000 Subject: [PATCH] Correct feature flag for Windows printing with XPS Flag needed to be in printing/common, as flags in components are not accessible when building other DLLs (such as printing.dll). Bug: 1008222 Change-Id: I9233b01b7535621afc42f7b65b656ad541ab6a72 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929913 Reviewed-by: Lei Zhang Commit-Queue: Alan Screen Cr-Commit-Position: refs/heads/master@{#718194} --- components/printing/browser/features.cc | 6 ------ components/printing/browser/features.h | 4 ---- printing/common/printing_features.cc | 6 ++++++ printing/common/printing_features.h | 5 +++++ 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/components/printing/browser/features.cc b/components/printing/browser/features.cc index 59b8b02ea633f1..501987b3a846ad 100644 --- a/components/printing/browser/features.cc +++ b/components/printing/browser/features.cc @@ -7,12 +7,6 @@ namespace printing { namespace features { -#if defined(OS_WIN) -// Use XPS for printing instead of GDI. -const base::Feature kUseXpsForPrinting{"UseXpsForPrinting", - base::FEATURE_DISABLED_BY_DEFAULT}; -#endif - #if defined(OS_MACOSX) const base::Feature kEnableCustomMacPaperSizes{ "EnableCustomMacPaperSizes", base::FEATURE_DISABLED_BY_DEFAULT}; diff --git a/components/printing/browser/features.h b/components/printing/browser/features.h index d2d5a5cf2d2693..8d113ef2e2bb0b 100644 --- a/components/printing/browser/features.h +++ b/components/printing/browser/features.h @@ -11,10 +11,6 @@ namespace printing { namespace features { -#if defined(OS_WIN) -extern const base::Feature kUseXpsForPrinting; -#endif - #if defined(OS_MACOSX) extern const base::Feature kEnableCustomMacPaperSizes; #endif diff --git a/printing/common/printing_features.cc b/printing/common/printing_features.cc index 731f33d884cc3f..e6e71f040bad62 100644 --- a/printing/common/printing_features.cc +++ b/printing/common/printing_features.cc @@ -10,5 +10,11 @@ namespace features { const base::Feature kHarfBuzzPDFSubsetter{"HarfBuzzPDFSubsetter", base::FEATURE_ENABLED_BY_DEFAULT}; +#if defined(OS_WIN) +// Use XPS for printing instead of GDI. +const base::Feature kUseXpsForPrinting{"UseXpsForPrinting", + base::FEATURE_DISABLED_BY_DEFAULT}; +#endif + } // namespace features } // namespace printing diff --git a/printing/common/printing_features.h b/printing/common/printing_features.h index 22c62950896a78..b05ea5eb73cb96 100644 --- a/printing/common/printing_features.h +++ b/printing/common/printing_features.h @@ -6,6 +6,7 @@ #define PRINTING_COMMON_PRINTING_FEATURES_H_ #include "base/feature_list.h" +#include "build/build_config.h" #include "printing/printing_export.h" namespace printing { @@ -13,6 +14,10 @@ namespace features { PRINTING_EXPORT extern const base::Feature kHarfBuzzPDFSubsetter; +#if defined(OS_WIN) +PRINTING_EXPORT extern const base::Feature kUseXpsForPrinting; +#endif + } // namespace features } // namespace printing