Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_manager.cc

Issue 718673002: New user type introduced. Combines regular and supervised features. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Logical expression fixed. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 #if defined(OS_CHROMEOS) 476 #if defined(OS_CHROMEOS)
477 ash::Shell::GetInstance()->SetCursorCompositingEnabled( 477 ash::Shell::GetInstance()->SetCursorCompositingEnabled(
478 ShouldEnableCursorCompositing()); 478 ShouldEnableCursorCompositing());
479 #endif 479 #endif
480 480
481 #endif // !USE_ATHENA 481 #endif // !USE_ATHENA
482 } 482 }
483 483
484 bool AccessibilityManager::IsIncognitoAllowed() { 484 bool AccessibilityManager::IsIncognitoAllowed() {
485 // Supervised users can't create incognito-mode windows. 485 // Supervised users can't create incognito-mode windows.
486 return !(user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser()); 486 return !user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser() &&
bartfab (slow) 2014/11/27 12:51:50 Nit: It would be more elegant to do this instead:
487 !user_manager::UserManager::Get()->
488 IsLoggedInAsRegularSupervisedUser();
487 } 489 }
488 490
489 bool AccessibilityManager::IsLargeCursorEnabled() { 491 bool AccessibilityManager::IsLargeCursorEnabled() {
490 return large_cursor_enabled_; 492 return large_cursor_enabled_;
491 } 493 }
492 494
493 void AccessibilityManager::EnableStickyKeys(bool enabled) { 495 void AccessibilityManager::EnableStickyKeys(bool enabled) {
494 if (!profile_) 496 if (!profile_)
495 return; 497 return;
496 PrefService* pref_service = profile_->GetPrefs(); 498 PrefService* pref_service = profile_->GetPrefs();
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 // Do any teardown work needed immediately after ChromeVox actually unloads. 1153 // Do any teardown work needed immediately after ChromeVox actually unloads.
1152 if (system_sounds_enabled_) 1154 if (system_sounds_enabled_)
1153 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); 1155 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED);
1154 #endif 1156 #endif
1155 // Clear the accessibility focus ring. 1157 // Clear the accessibility focus ring.
1156 AccessibilityFocusRingController::GetInstance()->SetFocusRing( 1158 AccessibilityFocusRingController::GetInstance()->SetFocusRing(
1157 std::vector<gfx::Rect>()); 1159 std::vector<gfx::Rect>());
1158 } 1160 }
1159 1161
1160 } // namespace chromeos 1162 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698