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

Side by Side Diff: ash/system/tray/system_tray.cc

Issue 60203005: Only focus the default item in the system tray when spoken feedback is enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 "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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698