Commit 504ae7b9 authored by Ken Rockot's avatar Ken Rockot Committed by Commit Bot

Remove remaining //components typemaps

The typemapping configs are merged into their respective mojom target
definitions.

Bug: 1059389
Change-Id: If0d82cb72977cd85186e7665a9bdeb7bc3b3da35
Tbr: mfoltz@chromium.org
Tbr: shik@chromium.org
Tbr: treib@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2406992
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Reviewed-by: default avatarmark a. foltz <mfoltz@chromium.org>
Reviewed-by: default avatarShik Chen <shik@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807219}
parent 11c26e5e
......@@ -16,4 +16,42 @@ mojom("common") {
"//mojo/public/mojom/base",
"//ui/gfx/geometry/mojom",
]
cpp_typemaps = [
{
types = [
{
mojom = "chromeos_camera.mojom.EncodeStatus"
cpp = "::chromeos_camera::JpegEncodeAccelerator::Status"
},
]
traits_headers = [ "jpeg_encode_accelerator_mojom_traits.h" ]
traits_sources = [ "jpeg_encode_accelerator_mojom_traits.cc" ]
traits_deps = [ "//base" ]
},
{
types = [
{
mojom = "chromeos_camera.mojom.BitstreamBuffer"
cpp = "::media::BitstreamBuffer"
move_only = true
},
{
mojom = "chromeos_camera.mojom.DecodeError"
cpp = "::chromeos_camera::MjpegDecodeAccelerator::Error"
},
]
traits_headers = [ "mjpeg_decode_accelerator_mojom_traits.h" ]
traits_sources = [ "mjpeg_decode_accelerator_mojom_traits.cc" ]
traits_public_deps = [
"//base",
"//media",
]
traits_deps = [
"//media/base/ipc",
"//mojo/public/cpp/base:typemap_traits",
"//mojo/public/cpp/system",
]
},
]
}
per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
# Copyright 2018 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.
mojom = "//components/chromeos_camera/common/jpeg_encode_accelerator.mojom"
public_headers = [ "//components/chromeos_camera/jpeg_encode_accelerator.h" ]
traits_headers = [
"//components/chromeos_camera/common/jpeg_encode_accelerator_mojom_traits.h",
]
sources = [
"//components/chromeos_camera/common/jpeg_encode_accelerator_mojom_traits.cc",
]
deps = [
"//base",
"//media",
"//media/base/ipc",
]
type_mappings = [ "chromeos_camera.mojom.EncodeStatus=::chromeos_camera::JpegEncodeAccelerator::Status" ]
......@@ -5,7 +5,7 @@
#ifndef COMPONENTS_CHROMEOS_CAMERA_COMMON_JPEG_ENCODE_ACCELERATOR_MOJOM_TRAITS_H_
#define COMPONENTS_CHROMEOS_CAMERA_COMMON_JPEG_ENCODE_ACCELERATOR_MOJOM_TRAITS_H_
#include "components/chromeos_camera/common/jpeg_encode_accelerator.mojom.h"
#include "components/chromeos_camera/common/jpeg_encode_accelerator.mojom-shared.h"
#include "components/chromeos_camera/jpeg_encode_accelerator.h"
namespace mojo {
......
# Copyright 2017 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.
mojom = "//components/chromeos_camera/common/mjpeg_decode_accelerator.mojom"
public_headers = [
"//components/chromeos_camera/mjpeg_decode_accelerator.h",
"//media/base/bitstream_buffer.h",
]
traits_headers = [
"//components/chromeos_camera/common/mjpeg_decode_accelerator_mojom_traits.h",
]
sources = [
"//components/chromeos_camera/common/mjpeg_decode_accelerator_mojom_traits.cc",
]
deps = [
"//base",
"//media",
"//media/base/ipc",
]
type_mappings = [
"chromeos_camera.mojom.BitstreamBuffer=::media::BitstreamBuffer[move_only]",
"chromeos_camera.mojom.DecodeError=::chromeos_camera::MjpegDecodeAccelerator::Error",
]
......@@ -6,7 +6,7 @@
#define COMPONENTS_CHROMEOS_CAMERA_COMMON_MJPEG_DECODE_ACCELERATOR_MOJOM_TRAITS_H_
#include "base/numerics/safe_conversions.h"
#include "components/chromeos_camera/common/mjpeg_decode_accelerator.mojom.h"
#include "components/chromeos_camera/common/mjpeg_decode_accelerator.mojom-shared.h"
#include "components/chromeos_camera/mjpeg_decode_accelerator.h"
#include "media/base/bitstream_buffer.h"
......
# Copyright 2019 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.
typemaps = [
"//components/chromeos_camera/common/jpeg_encode_accelerator.typemap",
"//components/chromeos_camera/common/mjpeg_decode_accelerator.typemap",
]
......@@ -43,6 +43,52 @@ mojom("media_router") {
}
disable_variants = true
cpp_typemaps = [
{
types = [
{
mojom = "media_router.mojom.Issue"
cpp = "::media_router::IssueInfo"
},
{
mojom = "media_router.mojom.Issue.ActionType"
cpp = "::media_router::IssueInfo::Action"
},
{
mojom = "media_router.mojom.Issue.Severity"
cpp = "::media_router::IssueInfo::Severity"
},
{
mojom = "media_router.mojom.MediaRoute"
cpp = "::media_router::MediaRoute"
},
{
mojom = "media_router.mojom.MediaRouteProvider.Id"
cpp = "::media_router::MediaRouteProviderId"
},
{
mojom = "media_router.mojom.MediaSink"
cpp = "::media_router::MediaSinkInternal"
},
{
mojom = "media_router.mojom.RouteRequestResultCode"
cpp = "::media_router::RouteRequestResult::ResultCode"
},
]
traits_headers = [ "media_router_mojom_traits.h" ]
traits_sources = [ "media_router_mojom_traits.cc" ]
traits_public_deps = [
"//components/media_router/common",
"//net",
]
traits_deps = [
"//services/network/public/cpp",
"//url/mojom:url_mojom_gurl",
]
},
]
}
mojom("media_router_test_interfaces") {
......
......@@ -2,5 +2,3 @@ per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS
per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
# 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.
mojom = "//components/media_router/common/mojom/media_router.mojom"
public_headers = [
"//components/media_router/common/discovery/media_sink_internal.h",
"//components/media_router/common/issue.h",
"//components/media_router/common/media_route.h",
"//components/media_router/common/media_route_provider_helper.h",
"//components/media_router/common/media_sink.h",
"//components/media_router/common/media_source.h",
"//components/media_router/common/route_request_result.h",
]
public_deps = [
"//components/media_router/common",
"//content/public/common",
]
deps = [
"//net",
"//third_party/icu", # For issue.h
"//url",
]
traits_headers =
[ "//components/media_router/common/mojom/media_router_mojom_traits.h" ]
sources =
[ "//components/media_router/common/mojom/media_router_mojom_traits.cc" ]
type_mappings = [
"media_router.mojom.Issue=::media_router::IssueInfo",
"media_router.mojom.Issue.ActionType=::media_router::IssueInfo::Action",
"media_router.mojom.Issue.Severity=::media_router::IssueInfo::Severity",
"media_router.mojom.MediaRoute=::media_router::MediaRoute",
"media_router.mojom.MediaRouteProvider.Id=::media_router::MediaRouteProviderId",
"media_router.mojom.MediaSink=::media_router::MediaSinkInternal",
"media_router.mojom.RouteRequestResultCode=::media_router::RouteRequestResult::ResultCode",
]
......@@ -5,6 +5,7 @@
#include "components/media_router/common/mojom/media_router_mojom_traits.h"
#include "components/media_router/common/media_source.h"
#include "components/media_router/common/mojom/media_router.mojom.h"
#include "services/network/public/cpp/ip_address_mojom_traits.h"
#include "services/network/public/cpp/ip_endpoint_mojom_traits.h"
#include "url/mojom/url_gurl_mojom_traits.h"
......
......@@ -9,7 +9,7 @@
#include "components/media_router/common/discovery/media_sink_internal.h"
#include "components/media_router/common/issue.h"
#include "components/media_router/common/mojom/media_router.mojom.h"
#include "components/media_router/common/mojom/media_router.mojom-shared.h"
#include "components/media_router/common/route_request_result.h"
#include "net/base/ip_endpoint.h"
......@@ -18,27 +18,27 @@ namespace mojo {
// Issue
template <>
struct EnumTraits<media_router::mojom::Issue::ActionType,
struct EnumTraits<media_router::mojom::Issue_ActionType,
media_router::IssueInfo::Action> {
static media_router::mojom::Issue::ActionType ToMojom(
static media_router::mojom::Issue_ActionType ToMojom(
media_router::IssueInfo::Action action) {
switch (action) {
case media_router::IssueInfo::Action::DISMISS:
return media_router::mojom::Issue::ActionType::DISMISS;
return media_router::mojom::Issue_ActionType::DISMISS;
case media_router::IssueInfo::Action::LEARN_MORE:
return media_router::mojom::Issue::ActionType::LEARN_MORE;
return media_router::mojom::Issue_ActionType::LEARN_MORE;
}
NOTREACHED() << "Unknown issue action type " << static_cast<int>(action);
return media_router::mojom::Issue::ActionType::DISMISS;
return media_router::mojom::Issue_ActionType::DISMISS;
}
static bool FromMojom(media_router::mojom::Issue::ActionType input,
static bool FromMojom(media_router::mojom::Issue_ActionType input,
media_router::IssueInfo::Action* output) {
switch (input) {
case media_router::mojom::Issue::ActionType::DISMISS:
case media_router::mojom::Issue_ActionType::DISMISS:
*output = media_router::IssueInfo::Action::DISMISS;
return true;
case media_router::mojom::Issue::ActionType::LEARN_MORE:
case media_router::mojom::Issue_ActionType::LEARN_MORE:
*output = media_router::IssueInfo::Action::LEARN_MORE;
return true;
}
......@@ -47,32 +47,32 @@ struct EnumTraits<media_router::mojom::Issue::ActionType,
};
template <>
struct EnumTraits<media_router::mojom::Issue::Severity,
struct EnumTraits<media_router::mojom::Issue_Severity,
media_router::IssueInfo::Severity> {
static media_router::mojom::Issue::Severity ToMojom(
static media_router::mojom::Issue_Severity ToMojom(
media_router::IssueInfo::Severity severity) {
switch (severity) {
case media_router::IssueInfo::Severity::FATAL:
return media_router::mojom::Issue::Severity::FATAL;
return media_router::mojom::Issue_Severity::FATAL;
case media_router::IssueInfo::Severity::WARNING:
return media_router::mojom::Issue::Severity::WARNING;
return media_router::mojom::Issue_Severity::WARNING;
case media_router::IssueInfo::Severity::NOTIFICATION:
return media_router::mojom::Issue::Severity::NOTIFICATION;
return media_router::mojom::Issue_Severity::NOTIFICATION;
}
NOTREACHED() << "Unknown issue severity " << static_cast<int>(severity);
return media_router::mojom::Issue::Severity::WARNING;
return media_router::mojom::Issue_Severity::WARNING;
}
static bool FromMojom(media_router::mojom::Issue::Severity input,
static bool FromMojom(media_router::mojom::Issue_Severity input,
media_router::IssueInfo::Severity* output) {
switch (input) {
case media_router::mojom::Issue::Severity::FATAL:
case media_router::mojom::Issue_Severity::FATAL:
*output = media_router::IssueInfo::Severity::FATAL;
return true;
case media_router::mojom::Issue::Severity::WARNING:
case media_router::mojom::Issue_Severity::WARNING:
*output = media_router::IssueInfo::Severity::WARNING;
return true;
case media_router::mojom::Issue::Severity::NOTIFICATION:
case media_router::mojom::Issue_Severity::NOTIFICATION:
*output = media_router::IssueInfo::Severity::NOTIFICATION;
return true;
}
......@@ -491,40 +491,40 @@ struct EnumTraits<media_router::mojom::RouteRequestResultCode,
// MediaRouteProvider
template <>
struct EnumTraits<media_router::mojom::MediaRouteProvider::Id,
struct EnumTraits<media_router::mojom::MediaRouteProvider_Id,
media_router::MediaRouteProviderId> {
static media_router::mojom::MediaRouteProvider::Id ToMojom(
static media_router::mojom::MediaRouteProvider_Id ToMojom(
media_router::MediaRouteProviderId provider_id) {
switch (provider_id) {
case media_router::MediaRouteProviderId::EXTENSION:
return media_router::mojom::MediaRouteProvider::Id::EXTENSION;
return media_router::mojom::MediaRouteProvider_Id::EXTENSION;
case media_router::MediaRouteProviderId::WIRED_DISPLAY:
return media_router::mojom::MediaRouteProvider::Id::WIRED_DISPLAY;
return media_router::mojom::MediaRouteProvider_Id::WIRED_DISPLAY;
case media_router::MediaRouteProviderId::CAST:
return media_router::mojom::MediaRouteProvider::Id::CAST;
return media_router::mojom::MediaRouteProvider_Id::CAST;
case media_router::MediaRouteProviderId::DIAL:
return media_router::mojom::MediaRouteProvider::Id::DIAL;
return media_router::mojom::MediaRouteProvider_Id::DIAL;
case media_router::MediaRouteProviderId::UNKNOWN:
break;
}
NOTREACHED() << "Invalid MediaRouteProvider::Id: "
NOTREACHED() << "Invalid MediaRouteProvider_Id: "
<< static_cast<int>(provider_id);
return media_router::mojom::MediaRouteProvider::Id::EXTENSION;
return media_router::mojom::MediaRouteProvider_Id::EXTENSION;
}
static bool FromMojom(media_router::mojom::MediaRouteProvider::Id input,
static bool FromMojom(media_router::mojom::MediaRouteProvider_Id input,
media_router::MediaRouteProviderId* provider_id) {
switch (input) {
case media_router::mojom::MediaRouteProvider::Id::EXTENSION:
case media_router::mojom::MediaRouteProvider_Id::EXTENSION:
*provider_id = media_router::MediaRouteProviderId::EXTENSION;
return true;
case media_router::mojom::MediaRouteProvider::Id::WIRED_DISPLAY:
case media_router::mojom::MediaRouteProvider_Id::WIRED_DISPLAY:
*provider_id = media_router::MediaRouteProviderId::WIRED_DISPLAY;
return true;
case media_router::mojom::MediaRouteProvider::Id::CAST:
case media_router::mojom::MediaRouteProvider_Id::CAST:
*provider_id = media_router::MediaRouteProviderId::CAST;
return true;
case media_router::mojom::MediaRouteProvider::Id::DIAL:
case media_router::mojom::MediaRouteProvider_Id::DIAL:
*provider_id = media_router::MediaRouteProviderId::DIAL;
return true;
}
......
# 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.
typemaps = [ "//components/media_router/common/mojom/media_router.typemap" ]
per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
# Copyright 2020 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.
mojom = "//components/services/storage/public/mojom/filesystem/directory.mojom"
public_headers = [ "//base/files/file_path.h" ]
traits_headers = [ "//components/services/storage/public/cpp/filesystem/strict_relative_path_mojom_traits.h" ]
public_deps =
[ "//components/services/storage/public/cpp/filesystem:typemap_traits" ]
type_mappings = [ "storage.mojom.StrictRelativePath=::base::FilePath" ]
# Copyright 2020 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.
typemaps = [ "//components/services/storage/public/cpp/filesystem/strict_relative_path.typemap" ]
......@@ -11,4 +11,19 @@ mojom_component("filesystem") {
sources = [ "directory.mojom" ]
public_deps = [ "//mojo/public/mojom/base" ]
cpp_typemaps = [
{
types = [
{
mojom = "storage.mojom.StrictRelativePath"
cpp = "::base::FilePath"
},
]
traits_headers = [ "//components/services/storage/public/cpp/filesystem/strict_relative_path_mojom_traits.h" ]
traits_public_deps = [
"//components/services/storage/public/cpp/filesystem:typemap_traits",
]
},
]
}
......@@ -6,4 +6,16 @@ import("//mojo/public/tools/bindings/mojom.gni")
mojom("mojom") {
sources = [ "syncer.mojom" ]
cpp_typemaps = [
{
types = [
{
mojom = "syncer.mojom.StringOrdinal"
cpp = "::syncer::StringOrdinal"
},
]
traits_headers = [ "syncer_mojom_traits.h" ]
traits_public_deps = [ "//components/sync" ]
},
]
}
......@@ -2,5 +2,3 @@ per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS
per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
# Copyright 2017 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.
mojom = "//components/sync/mojom/syncer.mojom"
public_headers = [ "//components/sync/model/string_ordinal.h" ]
traits_headers = [ "//components/sync/mojom/syncer_mojom_traits.h" ]
deps = [
"//components/sync:sync",
]
type_mappings = [ "syncer.mojom.StringOrdinal=::syncer::StringOrdinal" ]
# Copyright 2017 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.
typemaps = [ "//components/sync/mojom/syncer.typemap" ]
......@@ -13,10 +13,6 @@ _typemap_imports = [
"//chromeos/services/device_sync/public/mojom/typemaps.gni",
"//chromeos/services/network_config/public/mojom/typemaps.gni",
"//chromeos/services/secure_channel/public/mojom/typemaps.gni",
"//components/chromeos_camera/common/typemaps.gni",
"//components/media_router/common/mojom/typemaps.gni",
"//components/services/storage/public/cpp/filesystem/typemaps.gni",
"//components/sync/mojom/typemaps.gni",
"//content/browser/typemaps.gni",
"//content/public/common/typemaps.gni",
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment