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

Side by Side Diff: ui/views/bubble/bubble_delegate.cc

Issue 1055883002: Fire an alert event to notify accessibility when a permissions bubble gets shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js ('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 (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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 color_ = theme->GetSystemColor(ui::NativeTheme::kColorId_DialogBackground); 293 color_ = theme->GetSystemColor(ui::NativeTheme::kColorId_DialogBackground);
294 set_background(Background::CreateSolidBackground(color())); 294 set_background(Background::CreateSolidBackground(color()));
295 BubbleFrameView* frame_view = GetBubbleFrameView(); 295 BubbleFrameView* frame_view = GetBubbleFrameView();
296 if (frame_view) 296 if (frame_view)
297 frame_view->bubble_border()->set_background_color(color()); 297 frame_view->bubble_border()->set_background_color(color());
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 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
msw 2015/04/06 17:30:19 Most bubbles should have an anchor, but I suspect
David Tseng 2015/04/06 17:36:05 Done.
306 } else {
306 anchor_widget()->GetTopLevelWidget()->EnableInactiveRendering(); 307 anchor_widget()->GetTopLevelWidget()->EnableInactiveRendering();
308 }
307 } 309 }
308 } 310 }
309 311
310 } // namespace views 312 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698