[M120 Migration][VD] Remove accessing oom_score_adj in zygote process
[platform/framework/web/chromium-efl.git] / printing / printing_features.h
1 // Copyright 2019 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PRINTING_PRINTING_FEATURES_H_
6 #define PRINTING_PRINTING_FEATURES_H_
7
8 #include "base/component_export.h"
9 #include "base/feature_list.h"
10 #include "base/metrics/field_trial_params.h"
11 #include "build/build_config.h"
12 #include "printing/buildflags/buildflags.h"
13
14 namespace printing {
15 namespace features {
16
17 // The following features are declared alphabetically. The features should be
18 // documented with descriptions of their behaviors in the .cc file.
19
20 #if BUILDFLAG(IS_CHROMEOS)
21 COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kEnableBorderlessPrinting);
22 #endif  // BUILDFLAG(IS_CHROMEOS)
23
24 #if BUILDFLAG(IS_MAC)
25 COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kCupsIppPrintingBackend);
26 #endif  // BUILDFLAG(IS_MAC)
27
28 #if BUILDFLAG(IS_WIN)
29 COMPONENT_EXPORT(PRINTING_BASE)
30 BASE_DECLARE_FEATURE(kPrintWithPostScriptType42Fonts);
31 COMPONENT_EXPORT(PRINTING_BASE)
32 BASE_DECLARE_FEATURE(kPrintWithReducedRasterization);
33 COMPONENT_EXPORT(PRINTING_BASE)
34 BASE_DECLARE_FEATURE(kReadPrinterCapabilitiesWithXps);
35 COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kUseXpsForPrinting);
36 COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kUseXpsForPrintingFromPdf);
37
38 // Helper function to determine if there is any print path which could require
39 // the use of XPS print capabilities.
40 COMPONENT_EXPORT(PRINTING_BASE) bool IsXpsPrintCapabilityRequired();
41
42 // Helper function to determine if printing of a document from a particular
43 // source should be done using XPS printing API instead of with GDI.
44 COMPONENT_EXPORT(PRINTING_BASE)
45 bool ShouldPrintUsingXps(bool source_is_pdf);
46 #endif  // BUILDFLAG(IS_WIN)
47
48 #if BUILDFLAG(ENABLE_OOP_PRINTING)
49 COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kEnableOopPrintDrivers);
50 COMPONENT_EXPORT(PRINTING_BASE)
51 extern const base::FeatureParam<bool> kEnableOopPrintDriversJobPrint;
52 COMPONENT_EXPORT(PRINTING_BASE)
53 extern const base::FeatureParam<bool> kEnableOopPrintDriversSandbox;
54 #if BUILDFLAG(IS_WIN)
55 COMPONENT_EXPORT(PRINTING_BASE)
56 extern const base::FeatureParam<bool> kEnableOopPrintDriversSingleProcess;
57 #endif
58
59 // Helper function to determine if a printing of a document should be made OOP
60 // using a Print Backend service.
61 COMPONENT_EXPORT(PRINTING_BASE) bool ShouldPrintJobOop();
62 #endif  // BUILDFLAG(ENABLE_OOP_PRINTING)
63
64 #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
65 // Enterprise code gated by the following two features is handled almost
66 // identically through the print stack, but the underlying enterprise behavior
67 // changes significantly depending on which service provider is set by the
68 // OnPrintEnterpriseConnector policy. As such, using two features allows both
69 // workflows to be tested and ramped up/down independently.
70 //
71 // Since the policy can only ever be enabled with a cloud provider or a local
72 // provider, both flags being enabled at once shouldn't impact either workflows
73 // in an unexpected way since administrators will select a policy value that
74 // interacts with at most one of these two features.
75
76 // Allows the scanning to happen post-print-preview when
77 // OnPrintEnterpriseConnector has the "google" service_provider instead of doing
78 // a pre-print-preview snapshot and sending it to the cloud for analysis.
79 COMPONENT_EXPORT(PRINTING_BASE)
80 BASE_DECLARE_FEATURE(kEnableCloudScanAfterPreview);
81
82 // Allows the scanning to happen post-print-preview when
83 // OnPrintEnterpriseConnector has a local agent service_provider instead of
84 // doing a pre-print-preview snapshot and sending it to a local agent for
85 // analysis. This applies to the following service_provider values:
86 //  - local_user_agent
87 //  - local_system_agent
88 //  - brcm_chrm_cas
89 //
90 // TODO(b/216105729): Remove once the local content scanning post-preview UX is
91 // officially supported.
92 COMPONENT_EXPORT(PRINTING_BASE)
93 BASE_DECLARE_FEATURE(kEnableLocalScanAfterPreview);
94 #endif  // BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
95
96 }  // namespace features
97 }  // namespace printing
98
99 #endif  // PRINTING_PRINTING_FEATURES_H_