| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromeos/accessibility/accessibility_manager.h" | 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 #if defined(OS_CHROMEOS) | 474 #if defined(OS_CHROMEOS) |
| 475 ash::Shell::GetInstance()->SetCursorCompositingEnabled( | 475 ash::Shell::GetInstance()->SetCursorCompositingEnabled( |
| 476 ShouldEnableCursorCompositing()); | 476 ShouldEnableCursorCompositing()); |
| 477 #endif | 477 #endif |
| 478 | 478 |
| 479 #endif // !USE_ATHENA | 479 #endif // !USE_ATHENA |
| 480 } | 480 } |
| 481 | 481 |
| 482 bool AccessibilityManager::IsIncognitoAllowed() { | 482 bool AccessibilityManager::IsIncognitoAllowed() { |
| 483 // Supervised users can't create incognito-mode windows. | 483 // Supervised users can't create incognito-mode windows. |
| 484 return !(user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser()); | 484 return !user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser() && |
| 485 !user_manager::UserManager::Get()-> |
| 486 IsLoggedInAsRegularSupervisedUser(); |
| 485 } | 487 } |
| 486 | 488 |
| 487 bool AccessibilityManager::IsLargeCursorEnabled() { | 489 bool AccessibilityManager::IsLargeCursorEnabled() { |
| 488 return large_cursor_enabled_; | 490 return large_cursor_enabled_; |
| 489 } | 491 } |
| 490 | 492 |
| 491 void AccessibilityManager::EnableStickyKeys(bool enabled) { | 493 void AccessibilityManager::EnableStickyKeys(bool enabled) { |
| 492 if (!profile_) | 494 if (!profile_) |
| 493 return; | 495 return; |
| 494 PrefService* pref_service = profile_->GetPrefs(); | 496 PrefService* pref_service = profile_->GetPrefs(); |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 // Do any teardown work needed immediately after ChromeVox actually unloads. | 1151 // Do any teardown work needed immediately after ChromeVox actually unloads. |
| 1150 if (system_sounds_enabled_) | 1152 if (system_sounds_enabled_) |
| 1151 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); | 1153 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); |
| 1152 #endif | 1154 #endif |
| 1153 // Clear the accessibility focus ring. | 1155 // Clear the accessibility focus ring. |
| 1154 AccessibilityFocusRingController::GetInstance()->SetFocusRing( | 1156 AccessibilityFocusRingController::GetInstance()->SetFocusRing( |
| 1155 std::vector<gfx::Rect>()); | 1157 std::vector<gfx::Rect>()); |
| 1156 } | 1158 } |
| 1157 | 1159 |
| 1158 } // namespace chromeos | 1160 } // namespace chromeos |
| OLD | NEW |