| # Copyright 2016 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/chromecast_build.gni") |
| import("//build/config/chromeos/args.gni") |
| import("//build/config/chromeos/ui_mode.gni") |
| import("//build/config/features.gni") |
| import("//build/config/sanitizers/sanitizers.gni") |
| import("//pdf/features.gni") |
| |
| declare_args() { |
| # Enables basic printing support and UI. |
| enable_basic_printing = !is_chromecast && !is_ios |
| } |
| |
| declare_args() { |
| # Enables printing with print preview. |
| # Print preview requires PDF per //printing/BUILD.gn. |
| # The is_android condition is currently redundant but left for clarity. |
| enable_print_preview = enable_basic_printing && enable_pdf && !is_android |
| |
| if (use_fuzzing_engine && (is_linux || is_chromeos)) { |
| # For fuzzing, just restrict to chromeos and linux. |
| use_cups = true |
| } else { |
| use_cups = (is_chromeos_device || is_linux || is_chromeos_lacros || |
| is_mac) && !is_chromecast && !is_fuchsia |
| } |
| |
| # Enables out-of-process printing. While this definition matches |
| # `enable_print_preview`, do not base this definition upon that. This |
| # feature could still be appropriate for some build configurations which |
| # explicitly disable print preview. |
| enable_oop_printing = enable_basic_printing && !is_android |
| |
| # Enable snapshotting a page when printing for its content to be analyzed for |
| # sensitive content by enterprise users. |
| enable_print_content_analysis = |
| is_chromeos_ash || is_chromeos_lacros || is_win || is_linux || is_mac |
| } |
| |
| declare_args() { |
| # Enables exporting to tagged PDF. |
| enable_tagged_pdf = enable_print_preview |
| } |
| |
| declare_args() { |
| # Enables the CUPS IPP printing backend. |
| # TODO(crbug.com/226176): Remove this after CUPS PPD API calls are removed. |
| use_cups_ipp = use_cups && !is_linux |
| } |