chromium/services/tracing/public/mojom/console_config_mojom_traits.h

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

// This defines mappings from mojom IPC representations to their native perfetto
// equivalents.

#ifndef SERVICES_TRACING_PUBLIC_MOJOM_CONSOLE_CONFIG_MOJOM_TRAITS_H_
#define SERVICES_TRACING_PUBLIC_MOJOM_CONSOLE_CONFIG_MOJOM_TRAITS_H_

#include "base/notreached.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "services/tracing/public/mojom/perfetto_service.mojom-shared.h"
#include "third_party/perfetto/protos/perfetto/config/interceptors/console_config.gen.h"

namespace mojo {

// perfetto::protos::gen::ConsoleConfig::Output
template <>
struct EnumTraits<tracing::mojom::ConsoleOutput,
                  perfetto::protos::gen::ConsoleConfig::Output> {};

template <>
class StructTraits<tracing::mojom::ConsoleConfigDataView,
                   perfetto::protos::gen::ConsoleConfig> {};

}  // namespace mojo

#endif  // SERVICES_TRACING_PUBLIC_MOJOM_CONSOLE_CONFIG_MOJOM_TRAITS_H_