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 "ash/system/tray/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell/panel_window.h" | 10 #include "ash/shell/panel_window.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus(); | 92 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus(); |
93 bubble_->InitView(anchor, login_status, init_params); | 93 bubble_->InitView(anchor, login_status, init_params); |
94 bubble_wrapper_.reset( | 94 bubble_wrapper_.reset( |
95 new internal::TrayBubbleWrapper(tray, bubble_->bubble_view())); | 95 new internal::TrayBubbleWrapper(tray, bubble_->bubble_view())); |
96 if (ash::switches::UseAlternateShelfLayout()) { | 96 if (ash::switches::UseAlternateShelfLayout()) { |
97 // The system bubble should not have an arrow. | 97 // The system bubble should not have an arrow. |
98 bubble_->bubble_view()->SetArrowPaintType( | 98 bubble_->bubble_view()->SetArrowPaintType( |
99 views::BubbleBorder::PAINT_NONE); | 99 views::BubbleBorder::PAINT_NONE); |
100 } | 100 } |
101 is_persistent_ = is_persistent; | 101 is_persistent_ = is_persistent; |
102 bubble_->FocusDefault(); | 102 |
| 103 // If ChromeVox is enabled, focus the default item. |
| 104 AccessibilityDelegate* delegate = |
| 105 Shell::GetInstance()->accessibility_delegate(); |
| 106 if (delegate->IsSpokenFeedbackEnabled()) |
| 107 bubble_->FocusDefault(); |
103 } | 108 } |
104 | 109 |
105 // Convenience accessors: | 110 // Convenience accessors: |
106 SystemTrayBubble* bubble() const { return bubble_.get(); } | 111 SystemTrayBubble* bubble() const { return bubble_.get(); } |
107 SystemTrayBubble::BubbleType bubble_type() const { | 112 SystemTrayBubble::BubbleType bubble_type() const { |
108 return bubble_->bubble_type(); | 113 return bubble_->bubble_type(); |
109 } | 114 } |
110 TrayBubbleView* bubble_view() const { return bubble_->bubble_view(); } | 115 TrayBubbleView* bubble_view() const { return bubble_->bubble_view(); } |
111 bool is_persistent() const { return is_persistent_; } | 116 bool is_persistent() const { return is_persistent_; } |
112 | 117 |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 system_bubble_.reset(); | 710 system_bubble_.reset(); |
706 // When closing a system bubble with the alternate shelf layout, we need to | 711 // When closing a system bubble with the alternate shelf layout, we need to |
707 // turn off the active tinting of the shelf. | 712 // turn off the active tinting of the shelf. |
708 if (full_system_tray_menu_) { | 713 if (full_system_tray_menu_) { |
709 SetDrawBackgroundAsActive(false); | 714 SetDrawBackgroundAsActive(false); |
710 full_system_tray_menu_ = false; | 715 full_system_tray_menu_ = false; |
711 } | 716 } |
712 } | 717 } |
713 | 718 |
714 } // namespace ash | 719 } // namespace ash |
OLD | NEW |