Commit 551352d5 authored by Ken Rockot's avatar Ken Rockot Committed by Commit Bot

Remove remaining Blink-variant .typemap files

This eliminates the remaining .typemap files for Blink-variant bindings
in favor of direct GN target configuration.

This also effectively removes support for use for .typemap files for
the Blink variant.

Bug: 1059389
Change-Id: I4683dbd472151e6f3451476b7b04182a6048a31b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315446
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792022}
parent c5ff9326
# 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.
variant = "blink"
for_blink = true
_typemap_imports =
[ "//third_party/blink/renderer/platform/mojo/blink_typemaps.gni" ]
_typemaps = []
foreach(typemap_import, _typemap_imports) {
# Avoid reassignment error by assigning to empty scope first.
_imported = {
}
_imported = read_file(typemap_import, "scope")
_typemaps += _imported.typemaps
}
typemaps = []
foreach(typemap, _typemaps) {
typemaps += [
{
filename = typemap
config = read_file(typemap, "scope")
},
]
}
component_macro_suffix = "_BLINK"
......@@ -140,15 +140,8 @@ if (enable_scrambled_message_ids) {
}
if (enable_mojom_typemapping) {
if (!is_ios) {
_bindings_configuration_files = [
"//mojo/public/tools/bindings/chromium_bindings_configuration.gni",
"//mojo/public/tools/bindings/blink_bindings_configuration.gni",
]
} else {
_bindings_configuration_files =
[ "//mojo/public/tools/bindings/chromium_bindings_configuration.gni" ]
}
_bindings_configuration_files =
[ "//mojo/public/tools/bindings/chromium_bindings_configuration.gni" ]
_bindings_configurations = []
foreach(config_file, _bindings_configuration_files) {
_bindings_configurations += [ read_file(config_file, "scope") ]
......@@ -169,6 +162,11 @@ if (enable_mojom_typemapping) {
typemaps = []
component_macro_suffix = ""
},
]
}
if (!is_ios) {
_bindings_configurations += [
{
variant = "blink"
component_macro_suffix = "_BLINK"
......
......@@ -417,9 +417,20 @@ mojom("cookies_mojom") {
traits_public_deps = [ "//net" ]
},
]
cpp_typemaps += shared_cpp_typemaps
blink_cpp_typemaps = shared_cpp_typemaps
blink_cpp_typemaps = [
{
types = [
{
mojom = "network.mojom.CanonicalCookie"
cpp = "::blink::CanonicalCookie"
},
]
traits_headers = [ "//third_party/blink/renderer/platform/cookie/canonical_cookie_mojom_traits.h" ]
},
]
blink_cpp_typemaps += shared_cpp_typemaps
}
mojom("mojom") {
......
......@@ -697,6 +697,60 @@ mojom("mojom_modules") {
export_class_attribute_blink = "MODULES_EXPORT"
export_define_blink = "BLINK_MODULES_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/modules/modules_export.h"
blink_cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.IDBDatabaseMetadata"
cpp = "::blink::IDBDatabaseMetadata"
},
{
mojom = "blink.mojom.IDBIndexKeys"
cpp = "::blink::IDBIndexKeys"
move_only = true
},
{
mojom = "blink.mojom.IDBIndexMetadata"
cpp = "::scoped_refptr<::blink::IDBIndexMetadata>"
},
{
mojom = "blink.mojom.IDBKey"
cpp = "::std::unique_ptr<::blink::IDBKey>"
move_only = true
},
{
mojom = "blink.mojom.IDBKeyPath"
cpp = "::blink::IDBKeyPath"
},
{
mojom = "blink.mojom.IDBObjectStoreMetadata"
cpp = "::scoped_refptr<::blink::IDBObjectStoreMetadata>"
},
{
mojom = "blink.mojom.IDBValue"
cpp = "::std::unique_ptr<::blink::IDBValue>"
move_only = true
},
]
traits_private_headers = [ "//third_party/blink/renderer/modules/indexeddb/indexed_db_blink_mojom_traits.h" ]
traits_headers = [
"//third_party/blink/public/common/indexeddb/web_idb_types.h",
"//third_party/blink/renderer/modules/indexeddb/idb_key_path.h",
"//third_party/blink/renderer/modules/indexeddb/idb_key_range.h",
"//third_party/blink/renderer/modules/indexeddb/idb_metadata.h",
"//third_party/blink/renderer/modules/indexeddb/idb_name_and_version.h",
"//third_party/blink/renderer/modules/indexeddb/idb_value.h",
]
traits_deps = [ "//third_party/blink/renderer/platform/wtf" ]
},
]
}
mojom("web_bluetooth_mojo_bindings") {
......
......@@ -2,8 +2,6 @@ file://content/browser/indexed_db/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
# TEAM: storage-dev@chromium.org
# COMPONENT: Blink>Storage>IndexedDB
# 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 = "//third_party/blink/public/mojom/indexeddb/indexeddb.mojom"
public_headers = [
"//third_party/blink/public/common/indexeddb/web_idb_types.h",
"//third_party/blink/renderer/modules/indexeddb/idb_key_path.h",
"//third_party/blink/renderer/modules/indexeddb/idb_key_range.h",
"//third_party/blink/renderer/modules/indexeddb/idb_metadata.h",
"//third_party/blink/renderer/modules/indexeddb/idb_name_and_version.h",
"//third_party/blink/renderer/modules/indexeddb/idb_value.h",
]
traits_headers = [
"//mojo/public/cpp/base/string16_mojom_traits.h",
"//mojo/public/cpp/bindings/array_traits_wtf_vector.h",
"//third_party/blink/renderer/modules/indexeddb/indexed_db_blink_mojom_traits.h",
"//third_party/blink/renderer/platform/mojo/string16_mojom_traits.h",
]
deps = [
"//mojo/public/cpp/bindings",
"//third_party/blink/renderer/platform/wtf",
]
type_mappings = [
"blink.mojom.IDBDatabaseMetadata=::blink::IDBDatabaseMetadata",
"blink.mojom.IDBIndexKeys=::blink::IDBIndexKeys[move_only]",
"blink.mojom.IDBIndexMetadata=::scoped_refptr<::blink::IDBIndexMetadata>",
"blink.mojom.IDBKey=::std::unique_ptr<::blink::IDBKey>[move_only]",
"blink.mojom.IDBKeyPath=::blink::IDBKeyPath",
"blink.mojom.IDBObjectStoreMetadata=::scoped_refptr<::blink::IDBObjectStoreMetadata>",
"blink.mojom.IDBValue=::std::unique_ptr<::blink::IDBValue>[move_only]",
]
......@@ -5,6 +5,7 @@
#include "third_party/blink/renderer/modules/indexeddb/indexed_db_blink_mojom_traits.h"
#include "base/stl_util.h"
#include "mojo/public/cpp/base/string16_mojom_traits.h"
#include "mojo/public/cpp/bindings/array_traits_wtf_vector.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "third_party/blink/public/platform/web_blob_info.h"
......
......@@ -7,6 +7,7 @@
#include <stdint.h>
#include "mojo/public/cpp/bindings/array_traits_wtf_vector.h"
#include "mojo/public/cpp/bindings/map_traits_wtf_hash_map.h"
#include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom-blink.h"
#include "third_party/blink/renderer/modules/indexeddb/idb_metadata.h"
......
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 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/network/public/mojom/cookie_manager.mojom"
public_headers =
[ "//third_party/blink/renderer/platform/cookie/canonical_cookie.h" ]
traits_headers = [ "//third_party/blink/renderer/platform/cookie/canonical_cookie_mojom_traits.h" ]
deps = [
"//mojo/public/cpp/bindings",
]
type_mappings = [ "network.mojom.CanonicalCookie=::blink::CanonicalCookie" ]
......@@ -7,7 +7,6 @@
#include "base/time/time.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "services/network/public/mojom/cookie_manager.mojom-blink-forward.h"
#include "services/network/public/mojom/cookie_manager.mojom-shared.h"
#include "third_party/blink/renderer/platform/cookie/canonical_cookie.h"
#include "third_party/blink/renderer/platform/platform_export.h"
......
# 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 = [
"//third_party/blink/renderer/modules/indexeddb/indexed_db_blink.typemap",
"//third_party/blink/renderer/platform/cookie/canonical_cookie.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