diff options
Diffstat (limited to 'chromium/ui/accessibility/BUILD.gn')
-rw-r--r-- | chromium/ui/accessibility/BUILD.gn | 207 |
1 files changed, 64 insertions, 143 deletions
diff --git a/chromium/ui/accessibility/BUILD.gn b/chromium/ui/accessibility/BUILD.gn index fc74899db46..0297bff6f13 100644 --- a/chromium/ui/accessibility/BUILD.gn +++ b/chromium/ui/accessibility/BUILD.gn @@ -16,6 +16,10 @@ if (is_android) { import("//build/config/android/rules.gni") } +if (is_win) { + import("//build/toolchain/win/midl.gni") +} + # Reset sources_assignment_filter for the BUILD.gn file to prevent # regression during the migration of Chromium away from the feature. # See docs/no_sources_assignment_filter.md for more information. @@ -41,6 +45,10 @@ jumbo_component("ax_base") { defines = [ "AX_BASE_IMPLEMENTATION" ] sources = [ + "accessibility_features.cc", + "accessibility_features.h", + "accessibility_switches.cc", + "accessibility_switches.h", "ax_base_export.h", "ax_enum_util.cc", "ax_enum_util.h", @@ -70,14 +78,18 @@ jumbo_component("ax_base") { ] } +#if (is_win) { +# midl("ichromeaccessible") { +# sources = [ +# "platform/ichromeaccessible.idl", +# ] +# } +#} + jumbo_component("accessibility") { defines = [ "AX_IMPLEMENTATION" ] sources = [ - "accessibility_features.cc", - "accessibility_features.h", - "accessibility_switches.cc", - "accessibility_switches.h", "ax_action_data.cc", "ax_action_data.h", "ax_action_handler.cc", @@ -132,85 +144,21 @@ jumbo_component("accessibility") { "ax_tree_update_forward.h", "null_ax_action_target.cc", "null_ax_action_target.h", - - # ax_android_constants* are used in ax_assistant_structure.cc. - "platform/ax_android_constants.cc", - "platform/ax_android_constants.h", - - # ax_platform_node* are used for enable/disable accessibility and - # test_ax_node_wrapper. - "platform/ax_platform_node.cc", - "platform/ax_platform_node.h", - "platform/ax_platform_node_base.cc", - "platform/ax_platform_node_base.h", - "platform/ax_platform_node_delegate.h", - "platform/ax_platform_node_delegate_base.cc", - "platform/ax_platform_node_delegate_base.h", - - # ax_platform_node_test_helper.{cc,h} are used in - # browser_view_browsertest.cc - "platform/ax_platform_node_test_helper.cc", - "platform/ax_platform_node_test_helper.h", - - # ax_unique_id.{cc,h} are used in browser_accessibility.cc and - # view_accessibility.cc - "platform/ax_unique_id.cc", - "platform/ax_unique_id.h", - - # compute_attributes.{cc,h} are used in - # accessibility_tree_formatter_blink.cc - "platform/compute_attributes.cc", - "platform/compute_attributes.h", ] - deps = [ "//third_party/cld_3/src/src:cld_3" ] + deps = [ + "//base/util/values:values_util", + "//third_party/cld_3/src/src:cld_3", + ] public_deps = [ ":ax_base", - "//ui/display", + "//ui/accessibility/platform", ] - if (has_native_accessibility) { - sources += [ - "platform/ax_platform_text_boundary.cc", - "platform/ax_platform_text_boundary.h", - ] - - if (use_atk) { - # ax_platform_text_boundary.h includes atk.h, so ATK is needed as a public - # config to ensure anything that includes this is able to find atk.h. - public_configs = [ "//build/config/linux/atk" ] - } - } - - if (is_win) { - sources += [ - "platform/ax_fragment_root_delegate_win.h", - "platform/ax_fragment_root_win.cc", - "platform/ax_fragment_root_win.h", - "platform/ax_platform_node_delegate_utils_win.cc", - "platform/ax_platform_node_delegate_utils_win.h", - "platform/ax_platform_node_textchildprovider_win.cc", - "platform/ax_platform_node_textchildprovider_win.h", - "platform/ax_platform_node_textprovider_win.cc", - "platform/ax_platform_node_textprovider_win.h", - "platform/ax_platform_node_textrangeprovider_win.cc", - "platform/ax_platform_node_textrangeprovider_win.h", - "platform/ax_platform_node_win.cc", - "platform/ax_platform_node_win.h", - "platform/ax_platform_relation_win.cc", - "platform/ax_platform_relation_win.h", - "platform/ax_system_caret_win.cc", - "platform/ax_system_caret_win.h", - ] - - public_deps += [ "//third_party/iaccessible2" ] - - libs = [ - "oleacc.lib", - "uiautomationcore.lib", - ] - } + # Allows the files from //ui/accessibility/platform includes headers + # from this directory. + allow_circular_includes_from = [ "//ui/accessibility/platform" ] if (!is_ios) { sources += [ @@ -225,40 +173,6 @@ jumbo_component("accessibility") { ] } - if (is_mac) { - sources += [ - "platform/ax_platform_node_mac.h", - "platform/ax_platform_node_mac.mm", - ] - - libs = [ - "AppKit.framework", - "Foundation.framework", - ] - } - - if (use_atk) { - sources += [ - "platform/atk_util_auralinux.cc", - "platform/atk_util_auralinux.h", - "platform/atk_util_auralinux_gtk.cc", - "platform/ax_platform_atk_hyperlink.cc", - "platform/ax_platform_atk_hyperlink.h", - "platform/ax_platform_node_auralinux.cc", - "platform/ax_platform_node_auralinux.h", - ] - - configs += [ "//build/config/linux/atk" ] - - if (use_glib) { - configs += [ "//build/config/linux:glib" ] - } - - if (use_x11) { - public_deps += [ "//ui/gfx/x" ] - } - } - if (use_aura) { sources += [ "aura/aura_window_properties.cc", @@ -281,15 +195,21 @@ source_set("ax_assistant") { static_library("test_support") { testonly = true sources = [ - # test_ax_node_wrapper.{cc,h} are used in ax_range_unittest.cc - "platform/test_ax_node_wrapper.cc", - "platform/test_ax_node_wrapper.h", + "test_ax_node_helper.cc", + "test_ax_node_helper.h", "test_ax_tree_manager.cc", "test_ax_tree_manager.h", "tree_generator.cc", "tree_generator.h", ] + if (has_native_accessibility) { + sources += [ + "platform/test_ax_node_wrapper.cc", + "platform/test_ax_node_wrapper.h", + ] + } + deps = [ ":accessibility" ] } @@ -325,23 +245,6 @@ test("accessibility_unittests") { "run_all_unittests.cc", ] - if (is_win) { - sources += [ - "platform/ax_fragment_root_win_unittest.cc", - "platform/ax_platform_node_textchildprovider_win_unittest.cc", - "platform/ax_platform_node_textprovider_win_unittest.cc", - "platform/ax_platform_node_textrangeprovider_win_unittest.cc", - "platform/ax_platform_node_win_unittest.cc", - "platform/ax_platform_node_win_unittest.h", - ] - } - - if (has_native_accessibility) { - # This test depends heavily on NativeViewAccessible, which is only - # implemented on these platforms. - sources += [ "platform/ax_platform_node_base_unittest.cc" ] - } - deps = [ ":accessibility", ":test_support", @@ -357,22 +260,40 @@ test("accessibility_unittests") { "//ui/gfx:test_support", ] - if (is_win) { - deps += [ "//third_party/iaccessible2" ] + if (has_native_accessibility) { + # This test depends heavily on NativeViewAccessible, which is only + # implemented on these platforms. + sources += [ "platform/ax_platform_node_base_unittest.cc" ] - libs = [ - "oleacc.lib", - "uiautomationcore.lib", - ] - } + if (is_win) { + sources += [ + "platform/ax_fragment_root_win_unittest.cc", + "platform/ax_platform_node_textchildprovider_win_unittest.cc", + "platform/ax_platform_node_textprovider_win_unittest.cc", + "platform/ax_platform_node_textrangeprovider_win_unittest.cc", + "platform/ax_platform_node_win_unittest.cc", + "platform/ax_platform_node_win_unittest.h", + ] + + deps += [ + "//third_party/iaccessible2", + "//ui/accessibility/platform:ichromeaccessible", + ] + + libs = [ + "oleacc.lib", + "uiautomationcore.lib", + ] + } - if (use_atk) { - sources += [ - "platform/atk_util_auralinux_unittest.cc", - "platform/ax_platform_node_auralinux_unittest.cc", - ] + if (use_atk) { + sources += [ + "platform/atk_util_auralinux_unittest.cc", + "platform/ax_platform_node_auralinux_unittest.cc", + ] - configs += [ "//build/config/linux/atk" ] + configs += [ "//build/config/linux/atk" ] + } } } |