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

Unified Diff: ui/views/controls/combobox/combobox.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/views/controls/combobox/combobox.h ('k') | ui/views/controls/image_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index 6f54c920d22ca2065a14c272e297a6e2b2b13f51..7aa443623ad6e2a2dfeb589701fbd7cb347ffefc 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -11,7 +11,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "build/build_config.h"
-#include "ui/accessibility/ax_view_state.h"
+#include "ui/accessibility/ax_node_data.h"
#include "ui/base/default_style.h"
#include "ui/base/ime/input_method.h"
#include "ui/base/material_design/material_design_controller.h"
@@ -733,12 +733,12 @@ void Combobox::OnBlur() {
FocusRing::Uninstall(this);
}
-void Combobox::GetAccessibleState(ui::AXViewState* state) {
- state->role = ui::AX_ROLE_COMBO_BOX;
- state->name = accessible_name_;
- state->value = model_->GetItemAt(selected_index_);
- state->index = selected_index_;
- state->count = model_->GetItemCount();
+void Combobox::GetAccessibleNodeData(ui::AXNodeData* node_data) {
+ node_data->role = ui::AX_ROLE_COMBO_BOX;
+ node_data->SetName(accessible_name_);
+ node_data->SetValue(model_->GetItemAt(selected_index_));
+ node_data->AddIntAttribute(ui::AX_ATTR_POS_IN_SET, selected_index_);
+ node_data->AddIntAttribute(ui::AX_ATTR_SET_SIZE, model_->GetItemCount());
}
void Combobox::ButtonPressed(Button* sender, const ui::Event& event) {
« no previous file with comments | « ui/views/controls/combobox/combobox.h ('k') | ui/views/controls/image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698