1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/linux/pkg_config.gni")
6 import("//build/config/ui.gni")
7 import("//build/json_schema_api.gni")
8 import("//testing/test.gni")
10 import("//build/config/android/rules.gni")
16 atk_lib_dir = exec_script(pkg_config_script,
22 defines = [ "ATK_LIB_DIR=\"$atk_lib_dir\"" ]
25 # gn orders flags on a target before flags from configs. The default config
26 # adds -Wall, and these flags have to be after -Wall -- so they need to come
27 # from a config and can't be on the target directly.
28 config("atk_warnings") {
30 # glib uses the pre-c++11 typedef-as-static_assert hack.
31 "-Wno-unused-local-typedef",
33 # G_DEFINE_TYPE automatically generates a *get_instance_private
34 # inline function after glib 2.37. That's unused. Prevent to
36 "-Wno-unused-function",
41 component("accessibility") {
47 "ax_serializable_tree.cc",
48 "ax_serializable_tree.h",
53 "ax_tree_serializer.cc",
54 "ax_tree_serializer.h",
59 "platform/ax_platform_node.cc",
60 "platform/ax_platform_node.h",
61 "platform/ax_platform_node_base.cc",
62 "platform/ax_platform_node_base.h",
63 "platform/ax_platform_node_delegate.h",
64 "platform/ax_platform_node_mac.h",
65 "platform/ax_platform_node_mac.mm",
66 "platform/ax_platform_node_win.cc",
67 "platform/ax_platform_node_win.h",
70 defines = [ "ACCESSIBILITY_IMPLEMENTATION" ]
80 public_deps += [ "//third_party/iaccessible2" ]
85 "platform/atk_util_auralinux.cc",
86 "platform/atk_util_auralinux.h",
87 "platform/ax_platform_node_auralinux.cc",
88 "platform/ax_platform_node_auralinux.h",
94 "//build/config/linux:gconf",
95 "//build/config/linux:glib",
101 android_library("ui_accessibility_java") {
103 srcjar_deps = [ ":ax_enumerations_srcjar" ]
106 java_cpp_enum("ax_enumerations_srcjar") {
111 "org/chromium/ui/accessibility/AXTextStyle.java",
116 source_set("test_support") {
118 "platform/test_ax_node_wrapper.cc",
119 "platform/test_ax_node_wrapper.h",
129 # TODO(GYP): Delete this after we've converted everything to GN.
130 # The _run targets exist only for compatibility w/ GYP.
131 group("accessibility_unittests_run") {
134 ":accessibility_unittests",
138 test("accessibility_unittests") {
140 "ax_generated_tree_unittest.cc",
141 "ax_text_utils_unittest.cc",
142 "ax_tree_serializer_unittest.cc",
143 "ax_tree_unittest.cc",
144 "platform/ax_platform_node_win_unittest.cc",
151 "//base/test:run_all_unittests",
158 deps += [ "//third_party/iaccessible2" ]
162 json_schema_api("ax_gen") {
167 "//base/third_party/dynamic_annotations",
169 root_namespace = "ui"