| 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/common/system/tray_accessibility.h" | 5 #include "ash/common/system/tray_accessibility.h" |
| 6 | 6 |
| 7 #include "ash/common/accessibility_delegate.h" | 7 #include "ash/common/accessibility_delegate.h" |
| 8 #include "ash/common/accessibility_types.h" | 8 #include "ash/common/accessibility_types.h" |
| 9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
| 10 #include "ash/common/system/tray/hover_highlight_view.h" | 10 #include "ash/common/system/tray/hover_highlight_view.h" |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 if (accessibility_state == previous_accessibility_state_) | 427 if (accessibility_state == previous_accessibility_state_) |
| 428 return; | 428 return; |
| 429 // Contains bits for spoken feedback and braille display connected currently | 429 // Contains bits for spoken feedback and braille display connected currently |
| 430 // being enabled. | 430 // being enabled. |
| 431 uint32_t being_enabled = | 431 uint32_t being_enabled = |
| 432 (accessibility_state & ~previous_accessibility_state_) & | 432 (accessibility_state & ~previous_accessibility_state_) & |
| 433 (A11Y_SPOKEN_FEEDBACK | A11Y_BRAILLE_DISPLAY_CONNECTED); | 433 (A11Y_SPOKEN_FEEDBACK | A11Y_BRAILLE_DISPLAY_CONNECTED); |
| 434 if ((notify == A11Y_NOTIFICATION_SHOW) && being_enabled != A11Y_NONE) { | 434 if ((notify == A11Y_NOTIFICATION_SHOW) && being_enabled != A11Y_NONE) { |
| 435 // Shows popup if |notify| is true and the spoken feedback is being enabled. | 435 // Shows popup if |notify| is true and the spoken feedback is being enabled. |
| 436 request_popup_view_state_ = being_enabled; | 436 request_popup_view_state_ = being_enabled; |
| 437 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); | 437 ShowDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); |
| 438 } else { | 438 } else { |
| 439 if (detailed_popup_) | 439 if (detailed_popup_) |
| 440 detailed_popup_->GetWidget()->Close(); | 440 detailed_popup_->GetWidget()->Close(); |
| 441 if (detailed_menu_) | 441 if (detailed_menu_) |
| 442 detailed_menu_->GetWidget()->Close(); | 442 detailed_menu_->GetWidget()->Close(); |
| 443 } | 443 } |
| 444 | 444 |
| 445 previous_accessibility_state_ = accessibility_state; | 445 previous_accessibility_state_ = accessibility_state; |
| 446 } | 446 } |
| 447 | 447 |
| 448 } // namespace ash | 448 } // namespace ash |
| OLD | NEW |