chromium/services/media_session/public/cpp/media_session_mojom_traits.h

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

#ifndef SERVICES_MEDIA_SESSION_PUBLIC_CPP_MEDIA_SESSION_MOJOM_TRAITS_H_
#define SERVICES_MEDIA_SESSION_PUBLIC_CPP_MEDIA_SESSION_MOJOM_TRAITS_H_

#include <string>
#include <vector>

#include "base/containers/span.h"
#include "services/media_session/public/cpp/chapter_information.h"
#include "services/media_session/public/cpp/media_image.h"
#include "services/media_session/public/cpp/media_metadata.h"
#include "services/media_session/public/cpp/media_position.h"
#include "services/media_session/public/mojom/media_session.mojom-shared.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/geometry/size.h"

namespace mojo {

template <>
struct StructTraits<media_session::mojom::MediaImageDataView,
                    media_session::MediaImage> {};

template <>
struct StructTraits<media_session::mojom::MediaMetadataDataView,
                    media_session::MediaMetadata> {};

// TODO(beccahughes): de-dupe this with ArcBitmap.
template <>
struct StructTraits<media_session::mojom::MediaImageBitmapDataView, SkBitmap> {};

template <>
struct StructTraits<media_session::mojom::MediaPositionDataView,
                    media_session::MediaPosition> {};

template <>
struct StructTraits<media_session::mojom::ChapterInformationDataView,
                    media_session::ChapterInformation> {};

}  // namespace mojo

#endif  // SERVICES_MEDIA_SESSION_PUBLIC_CPP_MEDIA_SESSION_MOJOM_TRAITS_H_