| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 UpdateSwitchAccessFromPref(); | 1265 UpdateSwitchAccessFromPref(); |
| 1266 | 1266 |
| 1267 // Update the panel height in the shelf layout manager when the profile | 1267 // Update the panel height in the shelf layout manager when the profile |
| 1268 // changes, since the shelf layout manager doesn't exist in the login profile. | 1268 // changes, since the shelf layout manager doesn't exist in the login profile. |
| 1269 if (chromevox_panel_) | 1269 if (chromevox_panel_) |
| 1270 chromevox_panel_->UpdatePanelHeight(); | 1270 chromevox_panel_->UpdatePanelHeight(); |
| 1271 } | 1271 } |
| 1272 | 1272 |
| 1273 void AccessibilityManager::ActiveUserChanged( | 1273 void AccessibilityManager::ActiveUserChanged( |
| 1274 const user_manager::User* active_user) { | 1274 const user_manager::User* active_user) { |
| 1275 SetProfile(ProfileManager::GetActiveUserProfile()); | 1275 if (active_user && active_user->is_profile_created()) |
| 1276 SetProfile(ProfileManager::GetActiveUserProfile()); |
| 1276 } | 1277 } |
| 1277 | 1278 |
| 1278 void AccessibilityManager::OnFullscreenStateChanged(bool is_fullscreen, | 1279 void AccessibilityManager::OnFullscreenStateChanged(bool is_fullscreen, |
| 1279 aura::Window* root_window) { | 1280 aura::Window* root_window) { |
| 1280 if (chromevox_panel_) | 1281 if (chromevox_panel_) |
| 1281 chromevox_panel_->UpdateWidgetBounds(); | 1282 chromevox_panel_->UpdateWidgetBounds(); |
| 1282 } | 1283 } |
| 1283 | 1284 |
| 1284 void AccessibilityManager::SetProfileForTest(Profile* profile) { | 1285 void AccessibilityManager::SetProfileForTest(Profile* profile) { |
| 1285 SetProfile(profile); | 1286 SetProfile(profile); |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1530 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) | 1531 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) |
| 1531 extension_registry_observer_.Add(registry); | 1532 extension_registry_observer_.Add(registry); |
| 1532 } | 1533 } |
| 1533 | 1534 |
| 1534 void AccessibilityManager::SetSwitchAccessKeys(const std::set<int>& key_codes) { | 1535 void AccessibilityManager::SetSwitchAccessKeys(const std::set<int>& key_codes) { |
| 1535 if (switch_access_enabled_) | 1536 if (switch_access_enabled_) |
| 1536 switch_access_event_handler_->SetKeysToCapture(key_codes); | 1537 switch_access_event_handler_->SetKeysToCapture(key_codes); |
| 1537 } | 1538 } |
| 1538 | 1539 |
| 1539 } // namespace chromeos | 1540 } // namespace chromeos |
| OLD | NEW |