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: chrome/browser/ui/views/toolbar/toolbar_button.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 | « chrome/browser/ui/views/toolbar/toolbar_button.h ('k') | chrome/browser/ui/views/toolbar/toolbar_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/toolbar_button.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index 5e057984705adfe5e2713cf3527071ee81b38ba0..66c2ed0b573298eb611d1fb1e56e5f876455c6f6 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
-#include "ui/accessibility/ax_view_state.h"
+#include "ui/accessibility/ax_node_data.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/menu_model.h"
#include "ui/display/display.h"
@@ -136,11 +136,12 @@ void ToolbarButton::OnGestureEvent(ui::GestureEvent* event) {
LabelButton::OnGestureEvent(event);
}
-void ToolbarButton::GetAccessibleState(ui::AXViewState* state) {
- CustomButton::GetAccessibleState(state);
- state->role = ui::AX_ROLE_BUTTON_DROP_DOWN;
- state->default_action = l10n_util::GetStringUTF16(IDS_APP_ACCACTION_PRESS);
- state->AddStateFlag(ui::AX_STATE_HASPOPUP);
+void ToolbarButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
+ CustomButton::GetAccessibleNodeData(node_data);
+ node_data->role = ui::AX_ROLE_BUTTON_DROP_DOWN;
+ node_data->AddStringAttribute(
+ ui::AX_ATTR_ACTION, l10n_util::GetStringUTF8(IDS_APP_ACCACTION_PRESS));
+ node_data->AddStateFlag(ui::AX_STATE_HASPOPUP);
}
std::unique_ptr<views::LabelButtonBorder> ToolbarButton::CreateDefaultBorder()
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_button.h ('k') | chrome/browser/ui/views/toolbar/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698