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
25
26
#include " printing/buildflags/buildflags.h"
26
27
#include " printing/metafile.h"
27
28
#include " printing/mojom/print.mojom.h"
29
+ #if BUILDFLAG(USE_CUPS)
28
30
#include " printing/print_job_constants_cups.h"
31
+ #endif
29
32
#include " printing/print_settings_initializer_mac.h"
30
33
#include " printing/printing_features.h"
31
34
#include " printing/units.h"
@@ -82,6 +85,7 @@ PMPaper MatchPaper(CFArrayRef paper_list,
82
85
return best_matching_paper;
83
86
}
84
87
88
+ #if BUILDFLAG(USE_CUPS)
85
89
bool IsIppColorModelColorful (mojom::ColorModel color_model) {
86
90
// Accept `kUnknownColorModel` as it can occur with raw CUPS printers.
87
91
// Treat it similarly to the behavior in `GetColorModelForModel()`.
@@ -90,6 +94,7 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) {
90
94
}
91
95
return IsColorModelSelected (color_model).value ();
92
96
}
97
+ #endif
93
98
94
99
#if BUILDFLAG(ENABLE_OOP_PRINTING_NO_OOP_BASIC_PRINT_DIALOG)
95
100
@@ -672,8 +677,10 @@ void ApplySystemPrintDialogData(
672
677
}
673
678
674
679
bool PrintingContextMac::SetOutputColor (int color_mode) {
680
+ #if !BUILDFLAG(USE_CUPS)
681
+ return false ;
682
+ #else
675
683
const mojom::ColorModel color_model = ColorModeToColorModel (color_mode);
676
-
677
684
if (!base::FeatureList::IsEnabled (features::kCupsIppPrintingBackend )) {
678
685
std::string color_setting_name;
679
686
std::string color_value;
@@ -701,6 +708,7 @@ void ApplySystemPrintDialogData(
701
708
}
702
709
703
710
return true ;
711
+ #endif // BUILDFLAG(USE_CUPS)
704
712
}
705
713
706
714
bool PrintingContextMac::SetResolution (const gfx::Size& dpi_size) {
0 commit comments