| Index: chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc
|
| diff --git a/chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc b/chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc
|
| index 6bc75025c087d569cccc2e1fbcd4558e510f9e37..73321ee8ed2897b69c4e8bb4863480409e1547fb 100644
|
| --- a/chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc
|
| +++ b/chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc
|
| @@ -6,8 +6,13 @@
|
|
|
| #include <vector>
|
|
|
| +#include "content/public/browser/render_frame_host.h"
|
| +#include "content/public/browser/render_process_host.h"
|
| +#include "content/public/browser/web_contents.h"
|
| #include "ui/views/accessibility/ax_aura_obj_cache.h"
|
| #include "ui/views/accessibility/ax_aura_obj_wrapper.h"
|
| +#include "ui/views/accessibility/ax_view_obj_wrapper.h"
|
| +#include "ui/views/controls/webview/webview.h"
|
|
|
| using views::AXAuraObjCache;
|
| using views::AXAuraObjWrapper;
|
| @@ -90,6 +95,22 @@ AXAuraObjWrapper* AXTreeSourceAsh::GetNull() const {
|
| void AXTreeSourceAsh::SerializeNode(
|
| AXAuraObjWrapper* node, ui::AXNodeData* out_data) const {
|
| node->Serialize(out_data);
|
| +
|
| + if (out_data->role == ui::AX_ROLE_GROUP) {
|
| + views::View* view = static_cast<views::AXViewObjWrapper*>(node)->view();
|
| + if (view->GetClassName() == views::WebView::kViewClassName) {
|
| + out_data->role = ui::AX_ROLE_WEB_AREA;
|
| + content::WebContents* contents =
|
| + static_cast<views::WebView*>(view)->GetWebContents();
|
| + content::RenderFrameHost* rfh = contents->GetMainFrame();
|
| + if (rfh) {
|
| + int process_id = rfh->GetProcess()->GetID();
|
| + int routing_id = rfh->GetRoutingID();
|
| + out_data->AddIntAttribute(ui::AX_ATTR_FRAME_ID, process_id);
|
| + out_data->AddIntAttribute(ui::AX_ATTR_CHILD_FRAME_ID, routing_id);
|
| + }
|
| + }
|
| + }
|
| }
|
|
|
| std::string AXTreeSourceAsh::ToString(
|
|
|