| 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) { |
| 299 // Shows popup if the accessibilty status is being changed to true from | 300 // Shows popup if the accessibilty status is being changed to true from |
| 300 // false. | 301 // false. |
| 301 request_popup_view_ = true; | 302 request_popup_view_ = true; |
| 302 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); | 303 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); |
| 303 } else if (detailed_) { | 304 } else if (detailed_) { |
| 304 detailed_->GetWidget()->Close(); | 305 detailed_->GetWidget()->Close(); |
| 305 } | 306 } |
| 306 | 307 |
| 307 accessibility_previously_enabled_ = accessibility_enabled; | 308 accessibility_previously_enabled_ = accessibility_enabled; |
| 308 } | 309 } |
| 309 | 310 |
| 310 } // namespace internal | 311 } // namespace internal |
| 311 } // namespace ash | 312 } // namespace ash |
| OLD | NEW |