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

Unified Diff: chrome/browser/ui/views/infobars/infobar_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
Index: chrome/browser/ui/views/infobars/infobar_view.cc
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index a3f8ebc47ac7986be3ce7a0904a981eca6fd86a1..4fa4d87e4467b00b976fff668e74533d2d6c9033 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -17,7 +17,7 @@
#include "components/infobars/core/infobar_delegate.h"
#include "components/strings/grit/components_strings.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
-#include "ui/accessibility/ax_view_state.h"
+#include "ui/accessibility/ax_node_data.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h"
@@ -278,13 +278,13 @@ void InfoBarView::PlatformSpecificOnHeightsRecalculated() {
InvalidateLayout();
}
-void InfoBarView::GetAccessibleState(ui::AXViewState* state) {
- state->name = l10n_util::GetStringUTF16(
- (delegate()->GetInfoBarType() ==
- infobars::InfoBarDelegate::WARNING_TYPE) ?
- IDS_ACCNAME_INFOBAR_WARNING : IDS_ACCNAME_INFOBAR_PAGE_ACTION);
- state->role = ui::AX_ROLE_ALERT;
- state->keyboard_shortcut = base::ASCIIToUTF16("Alt+Shift+A");
+void InfoBarView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
+ node_data->SetName(l10n_util::GetStringUTF8(
+ (delegate()->GetInfoBarType() == infobars::InfoBarDelegate::WARNING_TYPE)
+ ? IDS_ACCNAME_INFOBAR_WARNING
+ : IDS_ACCNAME_INFOBAR_PAGE_ACTION));
+ node_data->role = ui::AX_ROLE_ALERT;
+ node_data->AddStringAttribute(ui::AX_ATTR_SHORTCUT, "Alt+Shift+A");
}
gfx::Size InfoBarView::GetPreferredSize() const {
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.h ('k') | chrome/browser/ui/views/location_bar/bubble_icon_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698