summaryrefslogtreecommitdiffstats
path: root/ui/accessibility
diff options
context:
space:
mode:
authordtseng <dtseng@chromium.org>2014-11-04 11:56:24 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-04 19:56:42 +0000
commitad8ae0f7f45d921efd8da77ffecbcd7253c87870 (patch)
treeab161b83dd06ccdd00e3012151a540bcc2c4c1f7 /ui/accessibility
parent78a7347037f09a028e53a0c68ddf01d62a43703f (diff)
downloadchromium_src-ad8ae0f7f45d921efd8da77ffecbcd7253c87870.zip
chromium_src-ad8ae0f7f45d921efd8da77ffecbcd7253c87870.tar.gz
chromium_src-ad8ae0f7f45d921efd8da77ffecbcd7253c87870.tar.bz2
Implement automatic load of composed/embedded automation trees
Introduces the metadata required to link together the desktop tree and a views::WebView. Additionally, implements the js side logic to resolve these links. A views::WebView now gets assigned an AXRole of webView and its immediate child resolves to the rootWebArea it hosts. This resolution is done dynamically at runtime using the underlying AX tree id which itself is mapped using AXTreeIDRegistry back in the browser. If the hosting webView has yet to load its child rootWebArea, enableFrame will be called to and a callback waiting for the subroot's data; this auto load occurs as soon as a webView is seen during a tree update and results in a childrenChanged event once its child rootWebArea is available. When a caller asks for the parent of a rootWebArea, a dynamic lookup is also performed to retrieve a hosting webView, if any. Review URL: https://codereview.chromium.org/667713006 Cr-Commit-Position: refs/heads/master@{#302648}
Diffstat (limited to 'ui/accessibility')
-rw-r--r--ui/accessibility/ax_enums.idl9
-rw-r--r--ui/accessibility/ax_node_data.cc6
2 files changed, 14 insertions, 1 deletions
diff --git a/ui/accessibility/ax_enums.idl b/ui/accessibility/ax_enums.idl
index 9f4e7e7..ede09ef 100644
--- a/ui/accessibility/ax_enums.idl
+++ b/ui/accessibility/ax_enums.idl
@@ -189,6 +189,7 @@
tooltip,
value_indicator,
web_area,
+ web_view,
window
};
@@ -293,7 +294,13 @@
color_value_blue,
// Inline text attributes.
- text_direction
+ text_direction,
+
+ // Uniquely identifies an AXTree.
+ tree_id,
+
+ // Identifies a child tree which this node hosts.
+ child_tree_id
};
[cpp_enum_prefix_override="ax_attr"] enum AXFloatAttribute {
diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc
index a306214..d78ddda 100644
--- a/ui/accessibility/ax_node_data.cc
+++ b/ui/accessibility/ax_node_data.cc
@@ -203,6 +203,12 @@ std::string AXNodeData::ToString() const {
case AX_ATTR_COLOR_VALUE_BLUE:
result += " color_value_blue=" + value;
break;
+ case AX_ATTR_TREE_ID:
+ result += " tree_id=" + value;
+ break;
+ case AX_ATTR_CHILD_TREE_ID:
+ result += " child_tree_id=" + value;
+ break;
case AX_ATTR_TEXT_DIRECTION:
switch (int_attributes[i].second) {
case AX_TEXT_DIRECTION_LR: