OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bubble/bubble_delegate.h" | 5 #include "ui/views/bubble/bubble_delegate.h" |
6 | 6 |
7 #include "ui/accessibility/ax_view_state.h" | 7 #include "ui/accessibility/ax_view_state.h" |
8 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
9 #include "ui/gfx/color_utils.h" | 9 #include "ui/gfx/color_utils.h" |
10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
298 } | 298 } |
299 | 299 |
300 void BubbleDelegateView::HandleVisibilityChanged(Widget* widget, bool visible) { | 300 void BubbleDelegateView::HandleVisibilityChanged(Widget* widget, bool visible) { |
301 if (widget == GetWidget() && anchor_widget() && | 301 if (widget == GetWidget() && anchor_widget() && |
302 anchor_widget()->GetTopLevelWidget()) { | 302 anchor_widget()->GetTopLevelWidget()) { |
303 if (visible) | 303 if (visible) |
304 anchor_widget()->GetTopLevelWidget()->DisableInactiveRendering(); | 304 anchor_widget()->GetTopLevelWidget()->DisableInactiveRendering(); |
305 else | 305 else |
306 anchor_widget()->GetTopLevelWidget()->EnableInactiveRendering(); | 306 anchor_widget()->GetTopLevelWidget()->EnableInactiveRendering(); |
307 } | 307 } |
308 | |
309 if (widget == GetWidget() && visible) { | |
310 ui::AXViewState state; | |
311 GetAccessibleState(&state); | |
312 if (state.role == ui::AX_ROLE_ALERT_DIALOG) | |
msw
2015/04/06 23:01:20
Why did you add this condition? Why can't all bubb
David Tseng
2015/04/06 23:34:02
Sorry; I should have pinged you on the changes her
msw
2015/04/07 00:18:22
What actually toggles the ChromeVox behavior betwe
David Tseng
2015/04/07 16:58:06
Currently, just the alert event.
| |
313 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | |
314 } | |
308 } | 315 } |
309 | 316 |
310 } // namespace views | 317 } // namespace views |
OLD | NEW |