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

Unified Diff: ash/common/system/tray/tray_utils.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 | « ash/common/system/tray/tray_item_more.cc ('k') | ash/common/system/user/button_from_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_utils.cc
diff --git a/ash/common/system/tray/tray_utils.cc b/ash/common/system/tray/tray_utils.cc
index 9dc1faa37ac0c60a40a6d1eb51d4ad5a25fd381b..91e47de042c09c00bf3ebfca1ce02c575427d90f 100644
--- a/ash/common/system/tray/tray_utils.cc
+++ b/ash/common/system/tray/tray_utils.cc
@@ -12,7 +12,7 @@
#include "ash/common/system/tray/tray_item_view.h"
#include "ash/common/system/tray/tray_popup_label_button_border.h"
#include "ash/common/wm_shell.h"
-#include "ui/accessibility/ax_view_state.h"
+#include "ui/accessibility/ax_node_data.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/vector2d.h"
#include "ui/views/border.h"
@@ -106,14 +106,14 @@ void SetTrayLabelItemBorder(TrayItemView* tray_view, ShelfAlignment alignment) {
void GetAccessibleLabelFromDescendantViews(
views::View* view,
std::vector<base::string16>& out_labels) {
- ui::AXViewState temp_state;
- view->GetAccessibleState(&temp_state);
- if (!temp_state.name.empty())
- out_labels.push_back(temp_state.name);
+ ui::AXNodeData temp_node_data;
+ view->GetAccessibleNodeData(&temp_node_data);
+ if (!temp_node_data.GetStringAttribute(ui::AX_ATTR_NAME).empty())
+ out_labels.push_back(temp_node_data.GetString16Attribute(ui::AX_ATTR_NAME));
// Do not descend into static text labels which may compute their own labels
// recursively.
- if (temp_state.role == ui::AX_ROLE_STATIC_TEXT)
+ if (temp_node_data.role == ui::AX_ROLE_STATIC_TEXT)
return;
for (int i = 0; i < view->child_count(); ++i)
« no previous file with comments | « ash/common/system/tray/tray_item_more.cc ('k') | ash/common/system/user/button_from_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698