| # Copyright 2016 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//mojo/public/tools/bindings/mojom.gni") |
| |
| mojom("mojom") { |
| generate_java = true |
| sources = [ |
| "themes.mojom", |
| "ui_base_types.mojom", |
| "window_open_disposition.mojom", |
| ] |
| cpp_typemaps = [] |
| |
| if (is_mac) { |
| sources += [ |
| "attributed_string.mojom", |
| "color_mode.mojom", |
| ] |
| public_deps = [ |
| "//mojo/public/mojom/base", |
| "//ui/gfx/range/mojom", |
| ] |
| cpp_typemaps += [ |
| { |
| types = [ |
| { |
| mojom = "ui.mojom.ColorMode" |
| cpp = "::ui::ColorProviderKey::ColorMode" |
| }, |
| ] |
| traits_headers = [ "color_mode_mojom_traits.h" ] |
| traits_public_deps = [ "//ui/color:color_provider_key" ] |
| }, |
| ] |
| } |
| |
| cpp_typemaps += [ |
| { |
| types = [ |
| { |
| mojom = "ui.mojom.WindowOpenDisposition" |
| cpp = "::WindowOpenDisposition" |
| }, |
| ] |
| traits_headers = [ "window_open_disposition_mojom_traits.h" ] |
| traits_public_deps = [ "//ui/base:types" ] |
| }, |
| ] |
| |
| export_class_attribute_blink = "BLINK_PLATFORM_EXPORT" |
| export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" |
| export_header_blink = "third_party/blink/public/platform/web_common.h" |
| webui_module_path = "chrome://resources/mojo/ui/base/mojom" |
| |
| # Generate legacy bindings for Blink. |
| generate_legacy_js_bindings = true |
| } |
| |
| # TODO(crbug.com/359910414): Move back DialogButton enum to ui_base_types.mojom. |
| # TODO(crbug.com/361008605): Move back `WindowShowState` enum to |
| # ui_base_types.mojom. |
| # TODO(crbug.com/370252254): Move back `MenuSourceType` enum to |
| # ui_base_types.mojom. |
| mojom("ui_base_types") { |
| generate_java = true |
| sources = [ |
| "dialog_button.mojom", |
| "menu_source_type.mojom", |
| "window_show_state.mojom", |
| ] |
| webui_module_path = "chrome://resources/mojo/ui/base/mojom" |
| generate_legacy_js_bindings = true |
| } |