Resurrect Aura Linux accessibility.

This is based in part on the ATK code we had as part of the Linux GTK port
that went away, but now rewritten on top of AXPlatformNode. This patch
successfully exposes an accessibility tree for Views and exposes top-level
windows and the the role and name of each View. You can test it using
accerciser. This is just to get the infrastructure in place - we need to
implement more of the interface for it to be useful for accessibility tools.

BUG=463671

Review URL: https://codereview.chromium.org/975113002

Cr-Original-Commit-Position: refs/heads/master@{#320383}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f65bad877350b5f7857d29e4b1b0d4d3f5c7cb6d
This commit is contained in:
dmazzoni 2015-03-12 14:59:43 -07:00 коммит произвёл Commit bot
Родитель c6d393d237
Коммит 85255d3fb5
3 изменённых файлов: 56 добавлений и 0 удалений

Просмотреть файл

@ -35,6 +35,25 @@ config("sdk") {
}
}
pkg_config("atk") {
packages = [ "atk" ]
atk_lib_dir = exec_script(pkg_config_script,
[
"--libdir",
"atk",
],
"string")
defines = [ "ATK_LIB_DIR=\"$atk_lib_dir\"" ]
}
# gn orders flags on a target before flags from configs. The default config
# adds -Wall, and these flags have to be after -Wall -- so they need to come
# from a config and can't be on the target directly.
config("atk_warnings") {
# glib uses the pre-c++11 typedef-as-static_assert hack.
cflags = [ "-Wno-unused-local-typedef" ]
}
config("fontconfig") {
libs = [ "fontconfig" ]
}

Просмотреть файл

@ -112,6 +112,7 @@ parser.add_option('-s', action='store', dest='sysroot', type='string')
parser.add_option('-a', action='store', dest='arch', type='string')
parser.add_option('--atleast-version', action='store',
dest='atleast_version', type='string')
parser.add_option('--libdir', action='store_true', dest='libdir')
(options, args) = parser.parse_args()
# Make a list of regular expressions to strip out.
@ -138,6 +139,18 @@ if options.atleast_version:
print "false"
sys.exit(0)
if options.libdir:
try:
libdir = subprocess.check_output([options.pkg_config,
"--variable=libdir"] +
args,
env=os.environ)
except:
print "Error from pkg-config."
sys.exit(1)
sys.stdout.write(libdir.strip())
sys.exit(0)
try:
flag_string = subprocess.check_output(
[ options.pkg_config, "--cflags", "--libs-only-l", "--libs-only-L" ] +

Просмотреть файл

@ -90,6 +90,30 @@
# Hide GTK and related dependencies for Chrome OS and Ozone, so they won't get
# added back to Chrome OS and Ozone. Don't try to use GTK on Chrome OS and Ozone.
'targets': [
{
'target_name': 'atk',
'type': 'none',
'conditions': [
['_toolset=="target"', {
'direct_dependent_settings': {
'cflags': [
'<!@(<(pkg-config) --cflags atk)',
],
'defines': [
'ATK_LIB_DIR="<!@(<(pkg-config) --variable=libdir atk)"',
],
},
'link_settings': {
'ldflags': [
'<!@(<(pkg-config) --libs-only-L --libs-only-other atk)',
],
'libraries': [
'<!@(<(pkg-config) --libs-only-l atk)',
],
},
}],
],
},
{
'target_name': 'gdk',
'type': 'none',