| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 if (delegate->IsAutoclickEnabled()) | 64 if (delegate->IsAutoclickEnabled()) |
| 65 state |= A11Y_AUTOCLICK; | 65 state |= A11Y_AUTOCLICK; |
| 66 if (delegate->IsVirtualKeyboardEnabled()) | 66 if (delegate->IsVirtualKeyboardEnabled()) |
| 67 state |= A11Y_VIRTUAL_KEYBOARD; | 67 state |= A11Y_VIRTUAL_KEYBOARD; |
| 68 if (delegate->IsBrailleDisplayConnected()) | 68 if (delegate->IsBrailleDisplayConnected()) |
| 69 state |= A11Y_BRAILLE_DISPLAY_CONNECTED; | 69 state |= A11Y_BRAILLE_DISPLAY_CONNECTED; |
| 70 return state; | 70 return state; |
| 71 } | 71 } |
| 72 | 72 |
| 73 LoginStatus GetCurrentLoginStatus() { | 73 LoginStatus GetCurrentLoginStatus() { |
| 74 return WmShell::Get()->system_tray_delegate()->GetUserLoginStatus(); | 74 return Shell::Get()->system_tray_delegate()->GetUserLoginStatus(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace | 77 } // namespace |
| 78 | 78 |
| 79 namespace tray { | 79 namespace tray { |
| 80 | 80 |
| 81 class DefaultAccessibilityView : public TrayItemMore { | 81 class DefaultAccessibilityView : public TrayItemMore { |
| 82 public: | 82 public: |
| 83 explicit DefaultAccessibilityView(SystemTrayItem* owner) | 83 explicit DefaultAccessibilityView(SystemTrayItem* owner) |
| 84 : TrayItemMore(owner) { | 84 : TrayItemMore(owner) { |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 297 |
| 298 help_view_ = CreateHelpButton(login_); | 298 help_view_ = CreateHelpButton(login_); |
| 299 settings_view_ = | 299 settings_view_ = |
| 300 CreateSettingsButton(login_, IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SETTINGS); | 300 CreateSettingsButton(login_, IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SETTINGS); |
| 301 tri_view()->AddView(TriView::Container::END, help_view_); | 301 tri_view()->AddView(TriView::Container::END, help_view_); |
| 302 tri_view()->AddView(TriView::Container::END, settings_view_); | 302 tri_view()->AddView(TriView::Container::END, settings_view_); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void AccessibilityDetailedView::ShowSettings() { | 305 void AccessibilityDetailedView::ShowSettings() { |
| 306 if (TrayPopupUtils::CanOpenWebUISettings(login_)) { | 306 if (TrayPopupUtils::CanOpenWebUISettings(login_)) { |
| 307 WmShell::Get()->system_tray_controller()->ShowAccessibilitySettings(); | 307 Shell::Get()->system_tray_controller()->ShowAccessibilitySettings(); |
| 308 owner()->system_tray()->CloseSystemBubble(); | 308 owner()->system_tray()->CloseSystemBubble(); |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 | 311 |
| 312 void AccessibilityDetailedView::ShowHelp() { | 312 void AccessibilityDetailedView::ShowHelp() { |
| 313 if (TrayPopupUtils::CanOpenWebUISettings(login_)) { | 313 if (TrayPopupUtils::CanOpenWebUISettings(login_)) { |
| 314 WmShell::Get()->system_tray_controller()->ShowAccessibilityHelp(); | 314 Shell::Get()->system_tray_controller()->ShowAccessibilityHelp(); |
| 315 owner()->system_tray()->CloseSystemBubble(); | 315 owner()->system_tray()->CloseSystemBubble(); |
| 316 } | 316 } |
| 317 } | 317 } |
| 318 | 318 |
| 319 } // namespace tray | 319 } // namespace tray |
| 320 | 320 |
| 321 //////////////////////////////////////////////////////////////////////////////// | 321 //////////////////////////////////////////////////////////////////////////////// |
| 322 // ash::TrayAccessibility | 322 // ash::TrayAccessibility |
| 323 | 323 |
| 324 TrayAccessibility::TrayAccessibility(SystemTray* system_tray) | 324 TrayAccessibility::TrayAccessibility(SystemTray* system_tray) |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |