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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_result_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/omnibox/omnibox_result_view.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
index 6b9d6a988d03afb16ce6b86b5923f961f61b37b4..3e0b1c44bca89feab0e00744b9c987f969cd5f97 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -28,7 +28,7 @@
#include "components/grit/components_scaled_resources.h"
#include "components/omnibox/browser/omnibox_popup_model.h"
#include "third_party/skia/include/core/SkColor.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/resource/resource_bundle.h"
#include "ui/base/theme_provider.h"
@@ -269,7 +269,7 @@ void OmniboxResultView::OnSelected() {
// Notify assistive technology when results with answers attached are
// selected. The non-answer text is already accessible as a consequence of
- // updating the text in the omnibox but this alert and GetAccessibleState
+ // updating the text in the omnibox but this alert and GetAccessibleNodeData
// below make the answer contents accessible.
if (match_.answer)
NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
@@ -293,12 +293,12 @@ gfx::Size OmniboxResultView::GetPreferredSize() const {
GetAnswerLineHeight() * description_rendertext_->GetNumLines());
}
-void OmniboxResultView::GetAccessibleState(ui::AXViewState* state) {
- state->name = match_.answer
- ? l10n_util::GetStringFUTF16(
- IDS_OMNIBOX_ACCESSIBLE_ANSWER, match_.contents,
- match_.answer->second_line().AccessibleText())
- : match_.contents;
+void OmniboxResultView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
+ node_data->SetName(match_.answer
+ ? l10n_util::GetStringFUTF16(
+ IDS_OMNIBOX_ACCESSIBLE_ANSWER, match_.contents,
+ match_.answer->second_line().AccessibleText())
+ : match_.contents);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_result_view.h ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698