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

Unified Diff: ui/views/accessibility/ax_view_obj_wrapper.cc

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 years, 1 month 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
« no previous file with comments | « ui/message_center/views/toast_contents_view.cc ('k') | ui/views/accessibility/native_view_accessibility.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/accessibility/ax_view_obj_wrapper.cc
diff --git a/ui/views/accessibility/ax_view_obj_wrapper.cc b/ui/views/accessibility/ax_view_obj_wrapper.cc
index b043dedc504ca3b67798e2e9ce119f601cefa7ce..d2a496f72989f32663e677f6a2f4f385b3eaf59b 100644
--- a/ui/views/accessibility/ax_view_obj_wrapper.cc
+++ b/ui/views/accessibility/ax_view_obj_wrapper.cc
@@ -6,7 +6,7 @@
#include "base/strings/utf_string_conversions.h"
#include "ui/accessibility/ax_node_data.h"
-#include "ui/accessibility/ax_view_state.h"
+#include "ui/accessibility/ax_node_data.h"
#include "ui/events/event_utils.h"
#include "ui/views/accessibility/ax_aura_obj_cache.h"
#include "ui/views/view.h"
@@ -46,32 +46,17 @@ void AXViewObjWrapper::GetChildren(
}
void AXViewObjWrapper::Serialize(ui::AXNodeData* out_node_data) {
- ui::AXViewState view_data;
- view_->GetAccessibleState(&view_data);
+ out_node_data->state = 0;
+ view_->GetAccessibleNodeData(out_node_data);
out_node_data->id = GetID();
- out_node_data->role = view_data.role;
- out_node_data->state = view_data.state();
if (view_->IsFocusable())
out_node_data->state |= 1 << ui::AX_STATE_FOCUSABLE;
if (!view_->visible())
out_node_data->state |= 1 << ui::AX_STATE_INVISIBLE;
out_node_data->location = gfx::RectF(view_->GetBoundsInScreen());
-
- out_node_data->AddStringAttribute(
- ui::AX_ATTR_NAME, base::UTF16ToUTF8(view_data.name));
- out_node_data->AddStringAttribute(
- ui::AX_ATTR_VALUE, base::UTF16ToUTF8(view_data.value));
-
- if (view_data.selection_start > -1 && view_data.selection_end > -1) {
- out_node_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_START,
- view_data.selection_start);
-
- out_node_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_END,
- view_data.selection_end);
- }
}
int32_t AXViewObjWrapper::GetID() {
« no previous file with comments | « ui/message_center/views/toast_contents_view.cc ('k') | ui/views/accessibility/native_view_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698