Implement automatic load of composed/embedded automation trees
commitad8ae0f7f45d921efd8da77ffecbcd7253c87870
authordtseng <dtseng@chromium.org>
Tue, 4 Nov 2014 19:56:24 +0000 (4 11:56 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 4 Nov 2014 19:56:42 +0000 (4 19:56 +0000)
treeab161b83dd06ccdd00e3012151a540bcc2c4c1f7
parent78a7347037f09a028e53a0c68ddf01d62a43703f
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}
24 files changed:
chrome/browser/accessibility/ax_tree_id_registry.cc [new file with mode: 0644]
chrome/browser/accessibility/ax_tree_id_registry.h [new file with mode: 0644]
chrome/browser/extensions/api/automation/automation_apitest.cc
chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
chrome/browser/extensions/api/automation_internal/automation_internal_api.h
chrome/browser/extensions/api/automation_internal/automation_util.cc
chrome/browser/ui/ash/accessibility/automation_manager_ash.cc
chrome/browser/ui/ash/accessibility/automation_manager_ash.h
chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc
chrome/chrome_browser.gypi
chrome/common/extensions/api/automation.idl
chrome/common/extensions/api/automation_internal.idl
chrome/renderer/resources/extensions/automation/automation_node.js
chrome/renderer/resources/extensions/automation_custom_bindings.js
chrome/test/data/extensions/api_test/automation/tests/desktop/common.js
chrome/test/data/extensions/api_test/automation/tests/desktop/load_tabs.html [new file with mode: 0644]
chrome/test/data/extensions/api_test/automation/tests/desktop/load_tabs.js [new file with mode: 0644]
chrome/test/data/extensions/api_test/automation/tests/unit/test.js
ui/accessibility/ax_enums.idl
ui/accessibility/ax_node_data.cc
ui/views/accessibility/ax_view_obj_wrapper.cc
ui/views/accessibility/ax_view_obj_wrapper.h
ui/views/accessibility/native_view_accessibility_win.cc
ui/views/controls/webview/webview.cc