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/slider.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/slider.h ('k') | ui/views/controls/tabbed_pane/tabbed_pane.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/slider.cc
diff --git a/ui/views/controls/slider.cc b/ui/views/controls/slider.cc
index 5bf9f1301d68ef2d6a05fab54846cc8f96171efa..2b8a97b316c8bc045fb63a62154624cea4871257 100644
--- a/ui/views/controls/slider.cc
+++ b/ui/views/controls/slider.cc
@@ -13,7 +13,7 @@
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkPaint.h"
-#include "ui/accessibility/ax_view_state.h"
+#include "ui/accessibility/ax_node_data.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/events/event.h"
#include "ui/gfx/animation/slide_animation.h"
@@ -229,11 +229,11 @@ bool Slider::OnKeyPressed(const ui::KeyEvent& event) {
return true;
}
-void Slider::GetAccessibleState(ui::AXViewState* state) {
- state->role = ui::AX_ROLE_SLIDER;
- state->name = accessible_name_;
- state->value = base::UTF8ToUTF16(
- base::StringPrintf("%d%%", static_cast<int>(value_ * 100 + 0.5)));
+void Slider::GetAccessibleNodeData(ui::AXNodeData* node_data) {
+ node_data->role = ui::AX_ROLE_SLIDER;
+ node_data->SetName(accessible_name_);
+ node_data->SetValue(base::UTF8ToUTF16(
+ base::StringPrintf("%d%%", static_cast<int>(value_ * 100 + 0.5))));
}
void Slider::OnFocus() {
« no previous file with comments | « ui/views/controls/slider.h ('k') | ui/views/controls/tabbed_pane/tabbed_pane.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698