Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(838)

Unified Diff: components/exo/shell_surface.cc

Issue 2640123004: Initial support for native accessibility in ARC (Closed)
Patch Set: Experimental changes Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index 40fd30b14503b90eabadc448c3f7b96f2369cece..91b568280f3ee719b623cec67f3b529cd508fe95 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -23,6 +23,8 @@
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h"
#include "components/exo/surface.h"
+#include "ui/accessibility/ax_enums.h"
+#include "ui/accessibility/ax_node_data.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/window.h"
@@ -787,6 +789,12 @@ void ShellSurface::OnSurfaceDestroying(Surface* surface) {
surface_destroyed_callback_.Run();
}
+void ShellSurface::OnSurfaceAXTreeChanged(int32_t id) {
+ ax_tree_id_ = id;
+
+ NotifyAccessibilityEvent(ui::AX_EVENT_CHILDREN_CHANGED, false);
+}
+
////////////////////////////////////////////////////////////////////////////////
// views::WidgetDelegate overrides:
@@ -871,6 +879,12 @@ gfx::Size ShellSurface::GetMinimumSize() const {
return gfx::Size(1, 1);
}
+void ShellSurface::GetAccessibleNodeData(ui::AXNodeData* node_data) {
+ if (ax_tree_id_)
+ node_data->AddIntAttribute(ui::AX_ATTR_CHILD_TREE_ID, ax_tree_id_);
+ node_data->SetName("ExoShell");
+}
+
////////////////////////////////////////////////////////////////////////////////
// ash::wm::WindowStateObserver overrides:

Powered by Google App Engine
This is Rietveld 408576698