chromium/printing/mojom/printing_context_mojom_traits.h

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PRINTING_MOJOM_PRINTING_CONTEXT_MOJOM_TRAITS_H_
#define PRINTING_MOJOM_PRINTING_CONTEXT_MOJOM_TRAITS_H_

#include <string>

#include "build/build_config.h"
#include "printing/mojom/print.mojom.h"
#include "printing/mojom/printing_context.mojom-shared.h"
#include "printing/page_setup.h"
#include "printing/print_settings.h"
#include "ui/gfx/geometry/size.h"

#if BUILDFLAG(ENABLE_OOP_PRINTING_NO_OOP_BASIC_PRINT_DIALOG)
#include "base/values.h"
#include "mojo/public/cpp/base/values_mojom_traits.h"
#endif

namespace mojo {

template <>
struct StructTraits<printing::mojom::PageMarginsDataView,
                    printing::PageMargins> {};

template <>
struct StructTraits<printing::mojom::PageSetupDataView, printing::PageSetup> {};

template <>
struct StructTraits<printing::mojom::RequestedMediaDataView,
                    printing::PrintSettings::RequestedMedia> {};

template <>
struct StructTraits<printing::mojom::PrintSettingsDataView,
                    printing::PrintSettings> {};

}  // namespace mojo

#endif  // PRINTING_MOJOM_PRINTING_CONTEXT_MOJOM_TRAITS_H_