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

Side by Side Diff: ui/views/accessibility/ax_widget_obj_wrapper.cc

Issue 2456673002: Update focus when widget changes visibility. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « ui/views/accessibility/ax_widget_obj_wrapper.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/accessibility/ax_widget_obj_wrapper.h" 5 #include "ui/views/accessibility/ax_widget_obj_wrapper.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/accessibility/ax_node_data.h" 8 #include "ui/accessibility/ax_node_data.h"
9 #include "ui/views/accessibility/ax_aura_obj_cache.h" 9 #include "ui/views/accessibility/ax_aura_obj_cache.h"
10 #include "ui/views/accessibility/ax_aura_obj_wrapper.h" 10 #include "ui/views/accessibility/ax_aura_obj_wrapper.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 void AXWidgetObjWrapper::OnWidgetDestroying(Widget* widget) { 57 void AXWidgetObjWrapper::OnWidgetDestroying(Widget* widget) {
58 AXAuraObjCache::GetInstance()->Remove(widget); 58 AXAuraObjCache::GetInstance()->Remove(widget);
59 } 59 }
60 60
61 void AXWidgetObjWrapper::OnWidgetClosing(Widget* widget) { 61 void AXWidgetObjWrapper::OnWidgetClosing(Widget* widget) {
62 AXAuraObjCache::GetInstance()->Remove(widget); 62 AXAuraObjCache::GetInstance()->Remove(widget);
63 } 63 }
64 64
65 void AXWidgetObjWrapper::OnWidgetVisibilityChanged(Widget*, bool) {
66 // If a widget changes visibility it may affect what's focused, in particular
67 // when a widget that contains the focused view gets hidden.
68 AXAuraObjCache::GetInstance()->OnFocusedViewChanged();
69 }
70
65 void AXWidgetObjWrapper::OnWillRemoveView(Widget* widget, View* view) { 71 void AXWidgetObjWrapper::OnWillRemoveView(Widget* widget, View* view) {
66 AXAuraObjCache::GetInstance()->RemoveViewSubtree(view); 72 AXAuraObjCache::GetInstance()->RemoveViewSubtree(view);
67 } 73 }
68 74
69 } // namespace views 75 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/accessibility/ax_widget_obj_wrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698