| 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 "ash/audio/sounds.h" | 7 #include "ash/audio/sounds.h" |
| 8 #include "ash/autoclick/autoclick_controller.h" | 8 #include "ash/autoclick/autoclick_controller.h" |
| 9 #include "ash/high_contrast/high_contrast_controller.h" | 9 #include "ash/high_contrast/high_contrast_controller.h" |
| 10 #include "ash/metrics/user_metrics_recorder.h" | 10 #include "ash/metrics/user_metrics_recorder.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "base/time/time.h" | 25 #include "base/time/time.h" |
| 26 #include "base/values.h" | 26 #include "base/values.h" |
| 27 #include "chrome/browser/accessibility/accessibility_extension_api.h" | 27 #include "chrome/browser/accessibility/accessibility_extension_api.h" |
| 28 #include "chrome/browser/browser_process.h" | 28 #include "chrome/browser/browser_process.h" |
| 29 #include "chrome/browser/chrome_notification_types.h" | 29 #include "chrome/browser/chrome_notification_types.h" |
| 30 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 30 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
| 31 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 31 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 32 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 32 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 33 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 33 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 34 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 34 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
| 35 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
| 36 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 35 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 37 #include "chrome/browser/extensions/component_loader.h" | 36 #include "chrome/browser/extensions/component_loader.h" |
| 38 #include "chrome/browser/extensions/extension_service.h" | 37 #include "chrome/browser/extensions/extension_service.h" |
| 39 #include "chrome/browser/profiles/profile.h" | 38 #include "chrome/browser/profiles/profile.h" |
| 40 #include "chrome/browser/profiles/profile_manager.h" | 39 #include "chrome/browser/profiles/profile_manager.h" |
| 41 #include "chrome/common/chrome_paths.h" | 40 #include "chrome/common/chrome_paths.h" |
| 42 #include "chrome/common/extensions/api/accessibility_private.h" | 41 #include "chrome/common/extensions/api/accessibility_private.h" |
| 43 #include "chrome/common/extensions/extension_constants.h" | 42 #include "chrome/common/extensions/extension_constants.h" |
| 44 #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" | 43 #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" |
| 45 #include "chrome/common/pref_names.h" | 44 #include "chrome/common/pref_names.h" |
| 46 #include "chrome/grit/browser_resources.h" | 45 #include "chrome/grit/browser_resources.h" |
| 47 #include "chrome/grit/generated_resources.h" | 46 #include "chrome/grit/generated_resources.h" |
| 48 #include "chromeos/audio/chromeos_sounds.h" | 47 #include "chromeos/audio/chromeos_sounds.h" |
| 49 #include "chromeos/ime/input_method_manager.h" | 48 #include "chromeos/ime/input_method_manager.h" |
| 50 #include "chromeos/login/login_state.h" | 49 #include "chromeos/login/login_state.h" |
| 50 #include "components/user_manager/user_manager.h" |
| 51 #include "content/public/browser/browser_accessibility_state.h" | 51 #include "content/public/browser/browser_accessibility_state.h" |
| 52 #include "content/public/browser/browser_thread.h" | 52 #include "content/public/browser/browser_thread.h" |
| 53 #include "content/public/browser/notification_details.h" | 53 #include "content/public/browser/notification_details.h" |
| 54 #include "content/public/browser/notification_service.h" | 54 #include "content/public/browser/notification_service.h" |
| 55 #include "content/public/browser/notification_source.h" | 55 #include "content/public/browser/notification_source.h" |
| 56 #include "content/public/browser/render_process_host.h" | 56 #include "content/public/browser/render_process_host.h" |
| 57 #include "content/public/browser/render_view_host.h" | 57 #include "content/public/browser/render_view_host.h" |
| 58 #include "content/public/browser/web_contents.h" | 58 #include "content/public/browser/web_contents.h" |
| 59 #include "content/public/browser/web_ui.h" | 59 #include "content/public/browser/web_ui.h" |
| 60 #include "extensions/browser/extension_system.h" | 60 #include "extensions/browser/extension_system.h" |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 enabled ? ui::CURSOR_SET_LARGE : ui::CURSOR_SET_NORMAL); | 462 enabled ? ui::CURSOR_SET_LARGE : ui::CURSOR_SET_NORMAL); |
| 463 #endif | 463 #endif |
| 464 | 464 |
| 465 #if defined(OS_CHROMEOS) | 465 #if defined(OS_CHROMEOS) |
| 466 ash::Shell::GetInstance()->SetCursorCompositingEnabled( | 466 ash::Shell::GetInstance()->SetCursorCompositingEnabled( |
| 467 ShouldEnableCursorCompositing()); | 467 ShouldEnableCursorCompositing()); |
| 468 #endif | 468 #endif |
| 469 } | 469 } |
| 470 | 470 |
| 471 bool AccessibilityManager::IsIncognitoAllowed() { | 471 bool AccessibilityManager::IsIncognitoAllowed() { |
| 472 UserManager* user_manager = UserManager::Get(); | |
| 473 // Supervised users can't create incognito-mode windows. | 472 // Supervised users can't create incognito-mode windows. |
| 474 return !(user_manager->IsLoggedInAsSupervisedUser()); | 473 return !(user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser()); |
| 475 } | 474 } |
| 476 | 475 |
| 477 bool AccessibilityManager::IsLargeCursorEnabled() { | 476 bool AccessibilityManager::IsLargeCursorEnabled() { |
| 478 return large_cursor_enabled_; | 477 return large_cursor_enabled_; |
| 479 } | 478 } |
| 480 | 479 |
| 481 void AccessibilityManager::EnableStickyKeys(bool enabled) { | 480 void AccessibilityManager::EnableStickyKeys(bool enabled) { |
| 482 if (!profile_) | 481 if (!profile_) |
| 483 return; | 482 return; |
| 484 PrefService* pref_service = profile_->GetPrefs(); | 483 PrefService* pref_service = profile_->GetPrefs(); |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 chrome_vox_loaded_on_lock_screen_; | 1115 chrome_vox_loaded_on_lock_screen_; |
| 1117 } | 1116 } |
| 1118 | 1117 |
| 1119 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) { | 1118 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) { |
| 1120 // Do any teardown work needed immediately after ChromeVox actually unloads. | 1119 // Do any teardown work needed immediately after ChromeVox actually unloads. |
| 1121 if (system_sounds_enabled_) | 1120 if (system_sounds_enabled_) |
| 1122 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); | 1121 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); |
| 1123 } | 1122 } |
| 1124 | 1123 |
| 1125 } // namespace chromeos | 1124 } // namespace chromeos |
| OLD | NEW |