| 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 "chrome/browser/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode()); | 96 ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode()); |
| 97 | 97 |
| 98 // Enable long press action to toggle spoken feedback with hotrod | 98 // Enable long press action to toggle spoken feedback with hotrod |
| 99 // remote which can't handle shortcut. | 99 // remote which can't handle shortcut. |
| 100 ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode()); | 100 ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode()); |
| 101 } | 101 } |
| 102 | 102 |
| 103 class AccessibilityDelegateImpl : public ash::AccessibilityDelegate { | 103 class AccessibilityDelegateImpl : public ash::AccessibilityDelegate { |
| 104 public: | 104 public: |
| 105 AccessibilityDelegateImpl() { | 105 AccessibilityDelegateImpl() { |
| 106 ash::WmShell::Get()->AddShellObserver(AccessibilityManager::Get()); | 106 ash::Shell::GetInstance()->AddShellObserver(AccessibilityManager::Get()); |
| 107 } | 107 } |
| 108 ~AccessibilityDelegateImpl() override { | 108 ~AccessibilityDelegateImpl() override { |
| 109 ash::WmShell::Get()->RemoveShellObserver(AccessibilityManager::Get()); | 109 ash::Shell::GetInstance()->RemoveShellObserver(AccessibilityManager::Get()); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void ToggleHighContrast() override { | 112 void ToggleHighContrast() override { |
| 113 DCHECK(AccessibilityManager::Get()); | 113 DCHECK(AccessibilityManager::Get()); |
| 114 AccessibilityManager::Get()->EnableHighContrast( | 114 AccessibilityManager::Get()->EnableHighContrast( |
| 115 !AccessibilityManager::Get()->IsHighContrastEnabled()); | 115 !AccessibilityManager::Get()->IsHighContrastEnabled()); |
| 116 } | 116 } |
| 117 | 117 |
| 118 bool IsSpokenFeedbackEnabled() const override { | 118 bool IsSpokenFeedbackEnabled() const override { |
| 119 DCHECK(AccessibilityManager::Get()); | 119 DCHECK(AccessibilityManager::Get()); |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 NOTREACHED() << "Unexpected notification " << type; | 599 NOTREACHED() << "Unexpected notification " << type; |
| 600 } | 600 } |
| 601 } | 601 } |
| 602 | 602 |
| 603 void ChromeShellDelegate::PlatformInit() { | 603 void ChromeShellDelegate::PlatformInit() { |
| 604 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 604 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 605 content::NotificationService::AllSources()); | 605 content::NotificationService::AllSources()); |
| 606 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 606 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
| 607 content::NotificationService::AllSources()); | 607 content::NotificationService::AllSources()); |
| 608 } | 608 } |
| OLD | NEW |