blob: f1cc90ef2fcd2a7002067a4d68f8473dd86f1cd2 [file] [edit]
# Copyright 2025 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file contains mapping of WebIDL union names to union classes generated
# by the bindings generator. This allows to assign mnemonic names for unions
# that contain large number of variants and would otherwise produce very long
# identifiers, as well as file names that exceed name limits of certain file
# systems.
# This is a Python file that only has MapUnionName() function exposed to its
# global name space.
#
# SYNOPSYS:
#
# MapUnionName(web_idl_name[, class_name[, file_name]])
#
# where `web_idl_name` is a **typedef** referring to a union definition (inline
# union specificaction in IDL syntax may be supported at a leter point).
# `class_name` is the name for the generated class and defaults to web_idl_name
# prefixed with "V8". The file name is the name used for the generated file and
# defaults to web_idl_name converted to snake_case with `v8_union_' prepended.
MapUnionName("LanguageModelPrompt")
MapUnionName("LanguageModelMessageValue")
MapUnionName("RenderingContext")
MapUnionName("OffscreenRenderingContext")