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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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) { |
msw
2015/04/06 17:57:20
nit: you don't need to add these curly braces anym
David Tseng
2015/04/06 18:03:32
Done.
| |
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 | |
310 if (widget == GetWidget() && visible) | |
311 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | |
308 } | 312 } |
309 | 313 |
310 } // namespace views | 314 } // namespace views |
OLD | NEW |