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_accessibility.h" | 5 #include "ash/system/tray_accessibility.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 if (tray_view()) | 289 if (tray_view()) |
290 tray_view()->SetVisible(GetInitialVisibility()); | 290 tray_view()->SetVisible(GetInitialVisibility()); |
291 } | 291 } |
292 | 292 |
293 void TrayAccessibility::OnAccessibilityModeChanged() { | 293 void TrayAccessibility::OnAccessibilityModeChanged() { |
294 if (tray_view()) | 294 if (tray_view()) |
295 tray_view()->SetVisible(GetInitialVisibility()); | 295 tray_view()->SetVisible(GetInitialVisibility()); |
296 | 296 |
297 bool accessibility_enabled = IsAnyAccessibilityFeatureEnabled(); | 297 bool accessibility_enabled = IsAnyAccessibilityFeatureEnabled(); |
298 if (!accessibility_previously_enabled_ && accessibility_enabled && | 298 if (!accessibility_previously_enabled_ && accessibility_enabled) { |
299 login_ != user::LOGGED_IN_NONE) { | |
300 // Shows popup if the accessibilty status is being changed to true from | 299 // Shows popup if the accessibilty status is being changed to true from |
301 // false. | 300 // false. |
302 request_popup_view_ = true; | 301 request_popup_view_ = true; |
303 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); | 302 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); |
304 } else if (detailed_) { | 303 } else if (detailed_) { |
305 detailed_->GetWidget()->Close(); | 304 detailed_->GetWidget()->Close(); |
306 } | 305 } |
307 | 306 |
308 accessibility_previously_enabled_ = accessibility_enabled; | 307 accessibility_previously_enabled_ = accessibility_enabled; |
309 } | 308 } |
310 | 309 |
311 } // namespace internal | 310 } // namespace internal |
312 } // namespace ash | 311 } // namespace ash |
OLD | NEW |