7
7
#import < AppKit/AppKit.h>
8
8
#include < CoreFoundation/CoreFoundation.h>
9
9
#import < QuartzCore/QuartzCore.h>
10
+ #if BUILDFLAG(USE_CUPS)
10
11
#include < cups/cups.h>
11
-
12
+ # endif
12
13
#import < iomanip>
13
14
#import < numeric>
14
15
26
27
#include " printing/buildflags/buildflags.h"
27
28
#include " printing/metafile.h"
28
29
#include " printing/mojom/print.mojom.h"
30
+ #if BUILDFLAG(USE_CUPS)
29
31
#include " printing/print_job_constants_cups.h"
32
+ #endif
30
33
#include " printing/print_settings_initializer_mac.h"
31
34
#include " printing/printing_features.h"
32
35
#include " printing/units.h"
@@ -96,6 +99,7 @@ PMPaper MatchPaper(CFArrayRef paper_list,
96
99
return best_matching_paper;
97
100
}
98
101
102
+ #if BUILDFLAG(USE_CUPS)
99
103
bool IsIppColorModelColorful (mojom::ColorModel color_model) {
100
104
// Accept `kUnknownColorModel` as it can occur with raw CUPS printers.
101
105
// Treat it similarly to the behavior in `GetColorModelForModel()`.
@@ -104,6 +108,7 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) {
104
108
}
105
109
return IsColorModelSelected (color_model).value ();
106
110
}
111
+ #endif
107
112
108
113
#if BUILDFLAG(ENABLE_OOP_PRINTING_NO_OOP_BASIC_PRINT_DIALOG)
109
114
@@ -685,8 +690,10 @@ void ApplySystemPrintDialogData(
685
690
}
686
691
687
692
bool PrintingContextMac::SetOutputColor (int color_mode) {
693
+ #if !BUILDFLAG(USE_CUPS)
694
+ return false ;
695
+ #else
688
696
const mojom::ColorModel color_model = ColorModeToColorModel (color_mode);
689
-
690
697
if (!base::FeatureList::IsEnabled (features::kCupsIppPrintingBackend )) {
691
698
std::string color_setting_name;
692
699
std::string color_value;
@@ -714,6 +721,7 @@ void ApplySystemPrintDialogData(
714
721
}
715
722
716
723
return true ;
724
+ #endif // BUILDFLAG(USE_CUPS)
717
725
}
718
726
719
727
bool PrintingContextMac::SetResolution (const gfx::Size& dpi_size) {
0 commit comments