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

Unified Diff: ash/common/system/audio/volume_view.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/audio/volume_view.h ('k') | ash/common/system/chromeos/ime_menu/ime_list_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/audio/volume_view.cc
diff --git a/ash/common/system/audio/volume_view.cc b/ash/common/system/audio/volume_view.cc
index 35dc337eeb83b097fc174940d2d738fe16adc8ca..3420f699241bba4a4dab2a37ae71fbfe5a63a2ba 100644
--- a/ash/common/system/audio/volume_view.cc
+++ b/ash/common/system/audio/volume_view.cc
@@ -16,7 +16,7 @@
#include "ash/resources/vector_icons/vector_icons.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
-#include "ui/accessibility/ax_view_state.h"
+#include "ui/accessibility/ax_node_data.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image_skia_operations.h"
@@ -115,12 +115,13 @@ class VolumeButton : public views::ToggleImageButton {
return size;
}
- void GetAccessibleState(ui::AXViewState* state) override {
+ void GetAccessibleNodeData(ui::AXNodeData* node_data) override {
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- state->name = bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_VOLUME_MUTE);
- state->role = ui::AX_ROLE_TOGGLE_BUTTON;
+ node_data->SetName(
+ bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_VOLUME_MUTE));
+ node_data->role = ui::AX_ROLE_TOGGLE_BUTTON;
if (audio_delegate_->IsOutputAudioMuted())
- state->AddStateFlag(ui::AX_STATE_PRESSED);
+ node_data->AddStateFlag(ui::AX_STATE_PRESSED);
}
// views::CustomButton:
@@ -345,7 +346,7 @@ void VolumeView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
separator_->SetSize(gfx::Size(kSeparatorSize, bounds().height()));
}
-void VolumeView::GetAccessibleState(ui::AXViewState* state) {
+void VolumeView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
// Intentionally overrides ActionableView, leaving |state| unset. A slider
// childview exposes accessibility data.
}
« no previous file with comments | « ash/common/system/audio/volume_view.h ('k') | ash/common/system/chromeos/ime_menu/ime_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698