Commit 8a9ff94f authored by Ken Rockot's avatar Ken Rockot Committed by Commit Bot

Migrate //sandbox and //services typemaps to GN

Bug: 1059389
Change-Id: Ifcd3c119d779503d4a2f8a9bd8046b6ce7272951
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339205Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#795153}
parent 45ad41b2
...@@ -21,12 +21,6 @@ _typemap_imports = [ ...@@ -21,12 +21,6 @@ _typemap_imports = [
"//components/typemaps.gni", "//components/typemaps.gni",
"//content/browser/typemaps.gni", "//content/browser/typemaps.gni",
"//content/public/common/typemaps.gni", "//content/public/common/typemaps.gni",
"//sandbox/mac/mojom/typemaps.gni",
"//services/media_session/public/cpp/typemaps.gni",
"//services/proxy_resolver/public/cpp/typemaps.gni",
"//services/resource_coordinator/public/cpp/typemaps.gni",
"//services/service_manager/public/cpp/typemaps.gni",
"//services/tracing/public/mojom/typemaps.gni",
] ]
_typemaps = [] _typemaps = []
......
...@@ -6,6 +6,21 @@ import("//mojo/public/tools/bindings/mojom.gni") ...@@ -6,6 +6,21 @@ import("//mojo/public/tools/bindings/mojom.gni")
mojom("mojom") { mojom("mojom") {
sources = [ "seatbelt_extension_token.mojom" ] sources = [ "seatbelt_extension_token.mojom" ]
cpp_typemaps = [
{
types = [
{
mojom = "sandbox.mac.mojom.SeatbeltExtensionToken"
cpp = "::sandbox::SeatbeltExtensionToken"
move_only = true
},
]
traits_headers = [ "seatbelt_extension_token_mojom_traits.h" ]
traits_sources = [ "seatbelt_extension_token_mojom_traits.cc" ]
traits_public_deps = [ "//sandbox/mac:seatbelt_extension" ]
},
]
} }
mojom("test_interfaces") { mojom("test_interfaces") {
......
...@@ -2,5 +2,3 @@ per-file *.mojom=set noparent ...@@ -2,5 +2,3 @@ per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS per-file *.mojom=file://ipc/SECURITY_OWNERS
per-file *_mojom_traits*.*=set noparent per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
\ No newline at end of file
# 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 = "//sandbox/mac/mojom/seatbelt_extension_token.mojom"
public_headers = [ "//sandbox/mac/seatbelt_extension_token.h" ]
traits_headers =
[ "//sandbox/mac/mojom/seatbelt_extension_token_mojom_traits.h" ]
sources = [
"//sandbox/mac/mojom/seatbelt_extension_token_mojom_traits.cc",
]
deps = [
"//sandbox/mac:seatbelt_extension",
]
type_mappings = [ "sandbox.mac.mojom.SeatbeltExtensionToken=::sandbox::SeatbeltExtensionToken[move_only]" ]
# 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 = [ "//sandbox/mac/mojom/seatbelt_extension_token.typemap" ]
per-file *_mojom_traits*.*=set noparent per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=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 = "//services/media_session/public/mojom/media_session.mojom"
public_headers = [
"//services/media_session/public/cpp/media_image.h",
"//services/media_session/public/cpp/media_metadata.h",
"//services/media_session/public/cpp/media_position.h",
"//third_party/skia/include/core/SkBitmap.h",
]
traits_headers =
[ "//services/media_session/public/cpp/media_session_mojom_traits.h" ]
public_deps = [
"//services/media_session/public/cpp:base_cpp",
"//skia",
]
deps = [
"//ui/gfx/geometry/mojom:mojom_traits",
]
type_mappings = [
"media_session.mojom.MediaImage=::media_session::MediaImage",
"media_session.mojom.MediaImageBitmap=::SkBitmap[nullable_is_same_type]",
"media_session.mojom.MediaMetadata=::media_session::MediaMetadata",
"media_session.mojom.MediaPosition=::media_session::MediaPosition",
]
sources = [
"//services/media_session/public/cpp/media_session_mojom_traits.cc",
"//services/media_session/public/cpp/media_session_mojom_traits.h",
]
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "mojo/public/cpp/base/string16_mojom_traits.h" #include "mojo/public/cpp/base/string16_mojom_traits.h"
#include "mojo/public/cpp/base/time_mojom_traits.h" #include "mojo/public/cpp/base/time_mojom_traits.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/geometry/mojom/geometry_mojom_traits.h" #include "ui/gfx/geometry/mojom/geometry_mojom_traits.h"
#include "url/mojom/url_gurl_mojom_traits.h" #include "url/mojom/url_gurl_mojom_traits.h"
......
...@@ -8,7 +8,13 @@ ...@@ -8,7 +8,13 @@
#include <vector> #include <vector>
#include "base/containers/span.h" #include "base/containers/span.h"
#include "services/media_session/public/mojom/media_session.mojom.h" #include "base/strings/string16.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 { namespace mojo {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "mojo/public/cpp/test_support/test_utils.h" #include "mojo/public/cpp/test_support/test_utils.h"
#include "services/media_session/public/cpp/media_session_mojom_traits.h" #include "services/media_session/public/cpp/media_session_mojom_traits.h"
#include "services/media_session/public/mojom/media_session.mojom.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
using media_session::mojom::MediaImageBitmap; using media_session::mojom::MediaImageBitmap;
......
# 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.
typemaps = [ "//services/media_session/public/cpp/media_session.typemap" ]
...@@ -27,4 +27,42 @@ mojom("mojom") { ...@@ -27,4 +27,42 @@ mojom("mojom") {
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT" export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h" export_header_blink = "third_party/blink/public/platform/web_common.h"
cpp_typemaps = [
{
types = [
{
mojom = "media_session.mojom.MediaImage"
cpp = "::media_session::MediaImage"
},
{
mojom = "media_session.mojom.MediaImageBitmap"
cpp = "::SkBitmap"
nullable_is_same_type = true
},
{
mojom = "media_session.mojom.MediaMetadata"
cpp = "::media_session::MediaMetadata"
},
{
mojom = "media_session.mojom.MediaPosition"
cpp = "::media_session::MediaPosition"
},
]
traits_headers =
[ "//services/media_session/public/cpp/media_session_mojom_traits.h" ]
traits_sources = [
"//services/media_session/public/cpp/media_session_mojom_traits.cc",
]
traits_public_deps = [
"//base",
"//services/media_session/public/cpp:base_cpp",
"//skia",
]
traits_deps = [
"//mojo/public/mojom/base",
"//ui/gfx/geometry/mojom",
]
},
]
} }
per-file *_mojom_traits*.*=set noparent per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
per-file manifest.cc=set noparent
per-file manifest.cc=file://ipc/SECURITY_OWNERS
per-file manifest.h=set noparent
per-file manifest.h=file://ipc/SECURITY_OWNERS
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "base/strings/string_piece.h" #include "base/strings/string_piece.h"
#include "mojo/public/cpp/bindings/enum_traits.h" #include "mojo/public/cpp/bindings/enum_traits.h"
#include "net/proxy_resolution/proxy_resolve_dns_operation.h" #include "net/proxy_resolution/proxy_resolve_dns_operation.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h" #include "services/proxy_resolver/public/mojom/proxy_resolver.mojom-shared.h"
namespace mojo { namespace mojo {
......
# 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 = "//services/proxy_resolver/public/mojom/proxy_resolver.mojom"
public_headers = [
"//net/base/proxy_server.h",
"//net/proxy_resolution/proxy_info.h",
"//net/proxy_resolution/proxy_resolve_dns_operation.h",
]
traits_headers = [
"//services/proxy_resolver/public/cpp/mojo_host_mojom_traits.h",
"//services/proxy_resolver/public/cpp/proxy_resolver_mojom_traits.h",
]
sources = [
"//services/proxy_resolver/public/cpp/mojo_host_mojom_traits.cc",
"//services/proxy_resolver/public/cpp/proxy_resolver_mojom_traits.cc",
]
type_mappings = [
"proxy_resolver.mojom.HostResolveOperation=::net::ProxyResolveDnsOperation",
"proxy_resolver.mojom.ProxyInfo=::net::ProxyInfo",
"proxy_resolver.mojom.ProxyServer=::net::ProxyServer",
"proxy_resolver.mojom.ProxyServer::Scheme=::net::ProxyScheme",
]
public_deps = [
"//net",
]
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "net/base/proxy_server.h" #include "net/base/proxy_server.h"
#include "net/proxy_resolution/proxy_info.h" #include "net/proxy_resolution/proxy_info.h"
#include "net/proxy_resolution/proxy_list.h" #include "net/proxy_resolution/proxy_list.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h" #include "services/proxy_resolver/public/mojom/proxy_resolver.mojom-shared.h"
namespace net { namespace net {
class ProxyInfo; class ProxyInfo;
......
# 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 = [ "//services/proxy_resolver/public/cpp/proxy_resolver.typemap" ]
...@@ -18,4 +18,38 @@ mojom("mojom") { ...@@ -18,4 +18,38 @@ mojom("mojom") {
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h" export_header_blink = "third_party/blink/public/platform/web_common.h"
} }
cpp_typemaps = [
{
types = [
{
mojom = "proxy_resolver.mojom.HostResolveOperation"
cpp = "::net::ProxyResolveDnsOperation"
},
{
mojom = "proxy_resolver.mojom.ProxyInfo"
cpp = "::net::ProxyInfo"
},
{
mojom = "proxy_resolver.mojom.ProxyServer"
cpp = "::net::ProxyServer"
},
{
mojom = "proxy_resolver.mojom.ProxyServer::Scheme"
cpp = "::net::ProxyScheme"
},
]
traits_headers = [
"//services/proxy_resolver/public/cpp/mojo_host_mojom_traits.h",
"//services/proxy_resolver/public/cpp/proxy_resolver_mojom_traits.h",
]
traits_sources = [
"//services/proxy_resolver/public/cpp/mojo_host_mojom_traits.cc",
"//services/proxy_resolver/public/cpp/proxy_resolver_mojom_traits.cc",
]
},
]
} }
per-file BUILD.gn=file://services/resource_coordinator/memory_instrumentation/OWNERS per-file BUILD.gn=file://services/resource_coordinator/memory_instrumentation/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
file://services/resource_coordinator/memory_instrumentation/OWNERS file://services/resource_coordinator/memory_instrumentation/OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
per-file *_mojom_traits*.*=set noparent per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS per-file *_mojom_traits*.*=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 = "//services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom"
public_headers = [
"//base/trace_event/memory_dump_request_args.h",
"//base/trace_event/process_memory_dump.h",
"//base/trace_event/memory_allocator_dump.h",
"//base/trace_event/memory_dump_manager.h",
]
traits_headers = [ "//services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation_mojom_traits.h" ]
sources = [
"//services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation_mojom_traits.cc",
"//services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation_mojom_traits.h",
]
deps = [
"//base",
]
type_mappings = [
"memory_instrumentation.mojom.DumpType=::base::trace_event::MemoryDumpType",
"memory_instrumentation.mojom.LevelOfDetail=::base::trace_event::MemoryDumpLevelOfDetail",
"memory_instrumentation.mojom.Determinism=::base::trace_event::MemoryDumpDeterminism",
"memory_instrumentation.mojom.RequestArgs=::base::trace_event::MemoryDumpRequestArgs",
"memory_instrumentation.mojom.RawAllocatorDumpEdge=::base::trace_event::ProcessMemoryDump::MemoryAllocatorDumpEdge",
"memory_instrumentation.mojom.RawAllocatorDumpEntry=::base::trace_event::MemoryAllocatorDump::Entry[move_only]",
"memory_instrumentation.mojom.RawAllocatorDump=::std::unique_ptr<::base::trace_event::MemoryAllocatorDump>[move_only]",
"memory_instrumentation.mojom.RawProcessMemoryDump=::std::unique_ptr<::base::trace_event::ProcessMemoryDump>[move_only,nullable_is_same_type]",
]
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation_mojom_traits.h" #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation_mojom_traits.h"
#include "services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom.h"
namespace mojo { namespace mojo {
// static // static
......
...@@ -7,9 +7,11 @@ ...@@ -7,9 +7,11 @@
#include "base/component_export.h" #include "base/component_export.h"
#include "base/process/process_handle.h" #include "base/process/process_handle.h"
#include "base/trace_event/memory_allocator_dump.h"
#include "base/trace_event/memory_dump_manager.h" #include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/memory_dump_request_args.h" #include "base/trace_event/memory_dump_request_args.h"
#include "services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom.h" #include "base/trace_event/process_memory_dump.h"
#include "services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom-shared.h"
namespace mojo { namespace mojo {
...@@ -100,19 +102,19 @@ template <> ...@@ -100,19 +102,19 @@ template <>
struct COMPONENT_EXPORT(RESOURCE_COORDINATOR_PUBLIC_MOJOM) UnionTraits< struct COMPONENT_EXPORT(RESOURCE_COORDINATOR_PUBLIC_MOJOM) UnionTraits<
memory_instrumentation::mojom::RawAllocatorDumpEntryValueDataView, memory_instrumentation::mojom::RawAllocatorDumpEntryValueDataView,
base::trace_event::MemoryAllocatorDump::Entry> { base::trace_event::MemoryAllocatorDump::Entry> {
static memory_instrumentation::mojom::RawAllocatorDumpEntryValue::Tag GetTag( static memory_instrumentation::mojom::RawAllocatorDumpEntryValueDataView::Tag
const base::trace_event::MemoryAllocatorDump::Entry& args) { GetTag(const base::trace_event::MemoryAllocatorDump::Entry& args) {
switch (args.entry_type) { switch (args.entry_type) {
case base::trace_event::MemoryAllocatorDump::Entry::EntryType::kUint64: case base::trace_event::MemoryAllocatorDump::Entry::EntryType::kUint64:
return memory_instrumentation::mojom::RawAllocatorDumpEntryValue::Tag:: return memory_instrumentation::mojom::
VALUE_UINT64; RawAllocatorDumpEntryValueDataView::Tag::VALUE_UINT64;
case base::trace_event::MemoryAllocatorDump::Entry::EntryType::kString: case base::trace_event::MemoryAllocatorDump::Entry::EntryType::kString:
return memory_instrumentation::mojom::RawAllocatorDumpEntryValue::Tag:: return memory_instrumentation::mojom::
VALUE_STRING; RawAllocatorDumpEntryValueDataView::Tag::VALUE_STRING;
} }
NOTREACHED(); NOTREACHED();
return memory_instrumentation::mojom::RawAllocatorDumpEntryValue::Tag:: return memory_instrumentation::mojom::RawAllocatorDumpEntryValueDataView::
VALUE_UINT64; Tag::VALUE_UINT64;
} }
static uint64_t value_uint64( static uint64_t value_uint64(
......
# 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 = [ "//services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.typemap" ]
...@@ -23,4 +23,51 @@ mojom_component("mojom") { ...@@ -23,4 +23,51 @@ mojom_component("mojom") {
if (is_linux || is_chromeos || is_android) { if (is_linux || is_chromeos || is_android) {
enabled_features += [ "private_swap_info" ] enabled_features += [ "private_swap_info" ]
} }
cpp_typemaps = [
{
types = [
{
mojom = "memory_instrumentation.mojom.DumpType"
cpp = "::base::trace_event::MemoryDumpType"
},
{
mojom = "memory_instrumentation.mojom.LevelOfDetail"
cpp = "::base::trace_event::MemoryDumpLevelOfDetail"
},
{
mojom = "memory_instrumentation.mojom.Determinism"
cpp = "::base::trace_event::MemoryDumpDeterminism"
},
{
mojom = "memory_instrumentation.mojom.RequestArgs"
cpp = "::base::trace_event::MemoryDumpRequestArgs"
},
{
mojom = "memory_instrumentation.mojom.RawAllocatorDumpEdge"
cpp =
"::base::trace_event::ProcessMemoryDump::MemoryAllocatorDumpEdge"
},
{
mojom = "memory_instrumentation.mojom.RawAllocatorDumpEntry"
cpp = "::base::trace_event::MemoryAllocatorDump::Entry"
move_only = true
},
{
mojom = "memory_instrumentation.mojom.RawAllocatorDump"
cpp = "::std::unique_ptr<::base::trace_event::MemoryAllocatorDump>"
move_only = true
},
{
mojom = "memory_instrumentation.mojom.RawProcessMemoryDump"
cpp = "::std::unique_ptr<::base::trace_event::ProcessMemoryDump>"
move_only = true
nullable_is_same_type = true
},
]
traits_headers = [ "//services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation_mojom_traits.h" ]
traits_sources = [ "//services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation_mojom_traits.cc" ]
traits_public_deps = [ "//base" ]
},
]
} }
per-file *_mojom_traits*.*=set noparent per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS 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 = "//services/service_manager/public/mojom/service.mojom"
public_headers = [ "//services/service_manager/public/cpp/bind_source_info.h" ]
traits_headers =
[ "//services/service_manager/public/cpp/bind_source_info_mojom_traits.h" ]
public_deps = [
"//services/service_manager/public/cpp:cpp_types",
]
type_mappings =
[ "service_manager.mojom.BindSourceInfo=::service_manager::BindSourceInfo" ]
...@@ -6,13 +6,15 @@ ...@@ -6,13 +6,15 @@
#define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_BIND_SOURCE_INFO_MOJOM_TRAITS_H_ #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_BIND_SOURCE_INFO_MOJOM_TRAITS_H_
#include "services/service_manager/public/cpp/bind_source_info.h" #include "services/service_manager/public/cpp/bind_source_info.h"
#include "services/service_manager/public/mojom/service.mojom.h" #include "services/service_manager/public/cpp/identity_mojom_traits.h"
#include "services/service_manager/public/cpp/interface_provider_spec_mojom_traits.h"
#include "services/service_manager/public/mojom/service.mojom-shared.h"
namespace mojo { namespace mojo {
template <> template <>
struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM) struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM)
StructTraits<service_manager::mojom::BindSourceInfo::DataView, StructTraits<service_manager::mojom::BindSourceInfoDataView,
service_manager::BindSourceInfo> { service_manager::BindSourceInfo> {
static const service_manager::Identity& identity( static const service_manager::Identity& identity(
const service_manager::BindSourceInfo& source) { const service_manager::BindSourceInfo& source) {
......
# 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 = "//services/service_manager/public/mojom/connector.mojom"
public_headers = [ "//services/service_manager/public/cpp/identity.h" ]
traits_headers =
[ "//services/service_manager/public/cpp/identity_mojom_traits.h" ]
public_deps = [
"//services/service_manager/public/cpp:cpp_types",
"//services/service_manager/public/cpp:mojom_traits",
]
type_mappings = [ "service_manager.mojom.Identity=::service_manager::Identity" ]
# 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 = "//services/service_manager/public/mojom/interface_provider_spec.mojom"
public_headers =
[ "//services/service_manager/public/cpp/interface_provider_spec.h" ]
traits_headers = [ "//services/service_manager/public/cpp/interface_provider_spec_mojom_traits.h" ]
public_deps = [
"//services/service_manager/public/cpp:cpp_types",
]
type_mappings = [
"service_manager.mojom.InterfaceProviderSpec=::service_manager::InterfaceProviderSpec",
"service_manager.mojom.InterfaceSet=::service_manager::InterfaceSet",
"service_manager.mojom.CapabilitySet=::service_manager::CapabilitySet",
]
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
#define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_INTERFACE_PROVIDER_SPEC_MOJOM_TRAITS_H_ #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_INTERFACE_PROVIDER_SPEC_MOJOM_TRAITS_H_
#include "services/service_manager/public/cpp/interface_provider_spec.h" #include "services/service_manager/public/cpp/interface_provider_spec.h"
#include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" #include "services/service_manager/public/mojom/interface_provider_spec.mojom-shared.h"
namespace mojo { namespace mojo {
template <> template <>
struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM) struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM)
StructTraits<service_manager::mojom::InterfaceProviderSpec::DataView, StructTraits<service_manager::mojom::InterfaceProviderSpecDataView,
service_manager::InterfaceProviderSpec> { service_manager::InterfaceProviderSpec> {
static const std::map<service_manager::Capability, static const std::map<service_manager::Capability,
service_manager::InterfaceSet>& service_manager::InterfaceSet>&
...@@ -32,7 +32,7 @@ struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM) ...@@ -32,7 +32,7 @@ struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM)
template <> template <>
struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM) struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM)
StructTraits<service_manager::mojom::InterfaceSet::DataView, StructTraits<service_manager::mojom::InterfaceSetDataView,
service_manager::InterfaceSet> { service_manager::InterfaceSet> {
static std::vector<std::string> interfaces( static std::vector<std::string> interfaces(
const service_manager::InterfaceSet& spec) { const service_manager::InterfaceSet& spec) {
...@@ -57,7 +57,7 @@ struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM) ...@@ -57,7 +57,7 @@ struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM)
template <> template <>
struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM) struct COMPONENT_EXPORT(SERVICE_MANAGER_MOJOM)
StructTraits<service_manager::mojom::CapabilitySet::DataView, StructTraits<service_manager::mojom::CapabilitySetDataView,
service_manager::CapabilitySet> { service_manager::CapabilitySet> {
static std::vector<std::string> capabilities( static std::vector<std::string> capabilities(
const service_manager::CapabilitySet& spec) { const service_manager::CapabilitySet& spec) {
......
# 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 = "//services/service_manager/public/mojom/service_filter.mojom"
public_headers = [ "//services/service_manager/public/cpp/service_filter.h" ]
traits_headers =
[ "//services/service_manager/public/cpp/service_filter_mojom_traits.h" ]
public_deps = [
"//services/service_manager/public/cpp:cpp_types",
"//services/service_manager/public/cpp:mojom_traits",
]
type_mappings =
[ "service_manager.mojom.ServiceFilter=::service_manager::ServiceFilter" ]
typemaps = [
"//services/service_manager/public/cpp/bind_source_info.typemap",
"//services/service_manager/public/cpp/identity.typemap",
"//services/service_manager/public/cpp/interface_provider_spec.typemap",
"//services/service_manager/public/cpp/service_filter.typemap",
]
...@@ -23,6 +23,72 @@ mojom_component("mojom") { ...@@ -23,6 +23,72 @@ mojom_component("mojom") {
":constants", ":constants",
"//mojo/public/mojom/base", "//mojo/public/mojom/base",
] ]
cpp_typemaps = [
{
types = [
{
mojom = "service_manager.mojom.BindSourceInfo"
cpp = "::service_manager::BindSourceInfo"
},
]
traits_headers = [
"//services/service_manager/public/cpp/bind_source_info_mojom_traits.h",
]
traits_public_deps = [
"//services/service_manager/public/cpp:cpp_types",
"//services/service_manager/public/cpp:mojom_traits",
]
},
{
types = [
{
mojom = "service_manager.mojom.Identity"
cpp = "::service_manager::Identity"
},
]
traits_headers =
[ "//services/service_manager/public/cpp/identity_mojom_traits.h" ]
traits_public_deps = [
"//services/service_manager/public/cpp:cpp_types",
"//services/service_manager/public/cpp:mojom_traits",
]
},
{
types = [
{
mojom = "service_manager.mojom.InterfaceProviderSpec"
cpp = "::service_manager::InterfaceProviderSpec"
},
{
mojom = "service_manager.mojom.InterfaceSet"
cpp = "::service_manager::InterfaceSet"
},
{
mojom = "service_manager.mojom.CapabilitySet"
cpp = "::service_manager::CapabilitySet"
},
]
traits_headers = [ "//services/service_manager/public/cpp/interface_provider_spec_mojom_traits.h" ]
traits_public_deps = [ "//services/service_manager/public/cpp:cpp_types" ]
},
{
types = [
{
mojom = "service_manager.mojom.ServiceFilter"
cpp = "::service_manager::ServiceFilter"
},
]
traits_headers = [
"//services/service_manager/public/cpp/service_filter_mojom_traits.h",
]
traits_public_deps = [
"//services/service_manager/public/cpp:cpp_types",
"//services/service_manager/public/cpp:mojom_traits",
]
},
]
} }
mojom_component("constants") { mojom_component("constants") {
......
...@@ -14,13 +14,86 @@ mojom_component("mojom") { ...@@ -14,13 +14,86 @@ mojom_component("mojom") {
"tracing_service.mojom", "tracing_service.mojom",
] ]
public_deps = [ "//mojo/public/mojom/base" ]
if (!is_nacl && !is_ios) { if (!is_nacl && !is_ios) {
enabled_features = [ "is_perfetto_supported_os" ] enabled_features = [ "is_perfetto_supported_os" ]
sources += [ sources += [
"constants.mojom", "constants.mojom",
"perfetto_service.mojom", "perfetto_service.mojom",
] ]
}
public_deps = [ "//mojo/public/mojom/base" ] cpp_typemaps = [
{
types = [
{
mojom = "tracing.mojom.BufferFillPolicy"
cpp = "::perfetto::TraceConfig::BufferConfig::FillPolicy"
},
{
mojom = "tracing.mojom.CommitDataRequest"
cpp = "::perfetto::CommitDataRequest"
},
{
mojom = "tracing.mojom.ChunksToMove"
cpp = "::perfetto::CommitDataRequest::ChunksToMove"
},
{
mojom = "tracing.mojom.ChunkPatch"
cpp = "::perfetto::CommitDataRequest::ChunkToPatch::Patch"
},
{
mojom = "tracing.mojom.ChunkToPatch"
cpp = "::perfetto::CommitDataRequest::ChunkToPatch"
},
{
mojom = "tracing.mojom.DataSourceConfig"
cpp = "::perfetto::DataSourceConfig"
},
{
mojom = "tracing.mojom.ChromeConfig"
cpp = "::perfetto::ChromeConfig"
},
{
mojom = "tracing.mojom.DataSourceRegistration"
cpp = "::perfetto::DataSourceDescriptor"
},
{
mojom = "tracing.mojom.PerfettoBuiltinDataSource"
cpp = "::perfetto::TraceConfig::BuiltinDataSource"
},
{
mojom = "tracing.mojom.IncrementalStateConfig"
cpp = "::perfetto::TraceConfig::IncrementalStateConfig"
},
{
mojom = "tracing.mojom.TraceConfig"
cpp = "::perfetto::TraceConfig"
},
]
traits_headers = [
"//third_party/perfetto/include/perfetto/ext/tracing/core/commit_data_request.h",
"//third_party/perfetto/include/perfetto/tracing/core/data_source_config.h",
"//third_party/perfetto/include/perfetto/tracing/core/data_source_descriptor.h",
"//third_party/perfetto/include/perfetto/tracing/core/chrome_config.h",
"//third_party/perfetto/include/perfetto/tracing/core/trace_config.h",
]
traits_private_headers = [
"chrome_config_mojom_traits.h",
"commit_data_request_mojom_traits.h",
"data_source_config_mojom_traits.h",
"data_source_descriptor_mojom_traits.h",
"trace_config_mojom_traits.h",
]
traits_sources = [
"chrome_config_mojom_traits.cc",
"commit_data_request_mojom_traits.cc",
"data_source_config_mojom_traits.cc",
"data_source_descriptor_mojom_traits.cc",
"trace_config_mojom_traits.cc",
]
traits_public_deps = [ "//third_party/perfetto:libperfetto" ]
},
]
}
} }
...@@ -2,5 +2,3 @@ per-file *.mojom=set noparent ...@@ -2,5 +2,3 @@ per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS per-file *.mojom=file://ipc/SECURITY_OWNERS
per-file *_mojom_traits*.*=set noparent per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <string> #include <string>
#include "mojo/public/cpp/bindings/struct_traits.h" #include "mojo/public/cpp/bindings/struct_traits.h"
#include "services/tracing/public/mojom/perfetto_service.mojom.h" #include "services/tracing/public/mojom/perfetto_service.mojom-shared.h"
#include "third_party/perfetto/include/perfetto/tracing/core/chrome_config.h" #include "third_party/perfetto/include/perfetto/tracing/core/chrome_config.h"
namespace mojo { namespace mojo {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <vector> #include <vector>
#include "mojo/public/cpp/bindings/struct_traits.h" #include "mojo/public/cpp/bindings/struct_traits.h"
#include "services/tracing/public/mojom/perfetto_service.mojom.h" #include "services/tracing/public/mojom/perfetto_service.mojom-shared.h"
#include "third_party/perfetto/include/perfetto/ext/tracing/core/commit_data_request.h" #include "third_party/perfetto/include/perfetto/ext/tracing/core/commit_data_request.h"
namespace mojo { namespace mojo {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <string> #include <string>
#include "mojo/public/cpp/bindings/struct_traits.h" #include "mojo/public/cpp/bindings/struct_traits.h"
#include "services/tracing/public/mojom/perfetto_service.mojom.h" #include "services/tracing/public/mojom/perfetto_service.mojom-shared.h"
#include "third_party/perfetto/include/perfetto/tracing/core/chrome_config.h" #include "third_party/perfetto/include/perfetto/tracing/core/chrome_config.h"
#include "third_party/perfetto/include/perfetto/tracing/core/data_source_config.h" #include "third_party/perfetto/include/perfetto/tracing/core/data_source_config.h"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <string> #include <string>
#include "mojo/public/cpp/bindings/struct_traits.h" #include "mojo/public/cpp/bindings/struct_traits.h"
#include "services/tracing/public/mojom/perfetto_service.mojom.h" #include "services/tracing/public/mojom/perfetto_service.mojom-shared.h"
#include "third_party/perfetto/include/perfetto/tracing/core/data_source_descriptor.h" #include "third_party/perfetto/include/perfetto/tracing/core/data_source_descriptor.h"
namespace mojo { namespace mojo {
......
mojom = "//services/tracing/public/mojom/perfetto_service.mojom"
public_headers = [
"//third_party/perfetto/include/perfetto/ext/tracing/core/commit_data_request.h",
"//third_party/perfetto/include/perfetto/tracing/core/data_source_config.h",
"//third_party/perfetto/include/perfetto/tracing/core/data_source_descriptor.h",
"//third_party/perfetto/include/perfetto/tracing/core/chrome_config.h",
"//third_party/perfetto/include/perfetto/tracing/core/trace_config.h",
]
traits_headers = [
"//services/tracing/public/mojom/commit_data_request_mojom_traits.h",
"//services/tracing/public/mojom/data_source_config_mojom_traits.h",
"//services/tracing/public/mojom/data_source_descriptor_mojom_traits.h",
"//services/tracing/public/mojom/chrome_config_mojom_traits.h",
"//services/tracing/public/mojom/trace_config_mojom_traits.h",
]
sources = [
"//services/tracing/public/mojom/chrome_config_mojom_traits.cc",
"//services/tracing/public/mojom/chrome_config_mojom_traits.h",
"//services/tracing/public/mojom/commit_data_request_mojom_traits.cc",
"//services/tracing/public/mojom/commit_data_request_mojom_traits.h",
"//services/tracing/public/mojom/data_source_config_mojom_traits.cc",
"//services/tracing/public/mojom/data_source_config_mojom_traits.h",
"//services/tracing/public/mojom/data_source_descriptor_mojom_traits.cc",
"//services/tracing/public/mojom/data_source_descriptor_mojom_traits.h",
"//services/tracing/public/mojom/trace_config_mojom_traits.cc",
"//services/tracing/public/mojom/trace_config_mojom_traits.h",
]
public_deps = [
"//third_party/perfetto:libperfetto",
]
type_mappings = [
"tracing.mojom.BufferFillPolicy=::perfetto::TraceConfig::BufferConfig::FillPolicy",
"tracing.mojom.CommitDataRequest=::perfetto::CommitDataRequest",
"tracing.mojom.ChunksToMove=::perfetto::CommitDataRequest::ChunksToMove",
"tracing.mojom.ChunkPatch=::perfetto::CommitDataRequest::ChunkToPatch::Patch",
"tracing.mojom.ChunkToPatch=::perfetto::CommitDataRequest::ChunkToPatch",
"tracing.mojom.DataSourceConfig=::perfetto::DataSourceConfig",
"tracing.mojom.ChromeConfig=::perfetto::ChromeConfig",
"tracing.mojom.DataSourceRegistration=::perfetto::DataSourceDescriptor",
"tracing.mojom.PerfettoBuiltinDataSource=::perfetto::TraceConfig::BuiltinDataSource",
"tracing.mojom.IncrementalStateConfig=::perfetto::TraceConfig::IncrementalStateConfig",
"tracing.mojom.TraceConfig=::perfetto::TraceConfig",
]
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "mojo/public/cpp/bindings/enum_traits.h" #include "mojo/public/cpp/bindings/enum_traits.h"
#include "mojo/public/cpp/bindings/struct_traits.h" #include "mojo/public/cpp/bindings/struct_traits.h"
#include "services/tracing/public/mojom/perfetto_service.mojom.h" #include "services/tracing/public/mojom/perfetto_service.mojom-shared.h"
#include "third_party/perfetto/include/perfetto/tracing/core/trace_config.h" #include "third_party/perfetto/include/perfetto/tracing/core/trace_config.h"
namespace mojo { namespace mojo {
......
typemaps = [ "//services/tracing/public/mojom/perfetto_service.typemap" ]
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