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: ui/views/accessibility/ax_aura_obj_cache.cc

Issue 2416103003: Automation should fire focus event on root view of widgets (Closed)
Patch Set: Update spoken feedback browser tests Created 4 years, 2 months 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/chromeos/accessibility/spoken_feedback_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/accessibility/ax_aura_obj_cache.cc
diff --git a/ui/views/accessibility/ax_aura_obj_cache.cc b/ui/views/accessibility/ax_aura_obj_cache.cc
index 0f47bb4b6742da17c34388ba638704d09f288c93..11516c5f64be381f79863ce4021d55e9a13bc7e8 100644
--- a/ui/views/accessibility/ax_aura_obj_cache.cc
+++ b/ui/views/accessibility/ax_aura_obj_cache.cc
@@ -151,7 +151,11 @@ View* AXAuraObjCache::GetFocusedView() {
if (!focus_manager)
return nullptr;
- return focus_manager->GetFocusedView();
+ View* focused_view = focus_manager->GetFocusedView();
+ if (focused_view)
+ return focused_view;
+ else
+ return focused_widget->GetRootView();
}
void AXAuraObjCache::OnWindowFocused(aura::Window* gained_focus,
« no previous file with comments | « chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698