#include "printing/print_settings_conversion.h"
#include <stddef.h>
#include <algorithm>
#include <cmath>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include "base/containers/contains.h"
#include "base/containers/fixed_flat_set.h"
#include "base/containers/to_value_list.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "base/values.h"
#include "build/build_config.h"
#include "printing/buildflags/buildflags.h"
#include "printing/mojom/print.mojom.h"
#include "printing/print_job_constants.h"
#include "printing/print_settings.h"
#include "printing/units.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/crosapi/mojom/local_printer.mojom.h"
#include "print_settings_conversion_chromeos.h"
#endif
namespace printing {
namespace {
PageMargins GetCustomMarginsFromJobSettings(const base::Value::Dict& settings) { … }
void SetMarginsToJobSettings(const std::string& json_path,
const PageMargins& margins,
base::Value::Dict& job_settings) { … }
void SetSizeToJobSettings(const std::string& json_path,
const gfx::Size& size,
base::Value::Dict& job_settings) { … }
void SetRectToJobSettings(const std::string& json_path,
const gfx::Rect& rect,
base::Value::Dict& job_settings) { … }
void SetPrintableAreaIfValid(PrintSettings& settings,
const gfx::Size& size_microns,
const base::Value::Dict& media_size) { … }
}
PageRanges GetPageRangesFromJobSettings(const base::Value::Dict& job_settings) { … }
std::unique_ptr<PrintSettings> PrintSettingsFromJobSettings(
const base::Value::Dict& job_settings) { … }
base::Value::Dict PrintSettingsToJobSettingsDebug(
const PrintSettings& settings) { … }
}