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

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

Issue 237893002: Fix behavior of WindowEventDispatcher::SynthesizeMouseMoveEvent(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-enable cursor compositing. Created 6 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/mouse_cursor_event_filter.cc ('k') | ui/aura/env.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 pref_service->GetBoolean(prefs::kAutoclickEnabled) || 364 pref_service->GetBoolean(prefs::kAutoclickEnabled) ||
365 pref_service->GetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu) || 365 pref_service->GetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu) ||
366 pref_service->GetBoolean(prefs::kScreenMagnifierEnabled) || 366 pref_service->GetBoolean(prefs::kScreenMagnifierEnabled) ||
367 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)) 367 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled))
368 return true; 368 return true;
369 } 369 }
370 return false; 370 return false;
371 } 371 }
372 372
373 bool AccessibilityManager::ShouldEnableCursorCompositing() { 373 bool AccessibilityManager::ShouldEnableCursorCompositing() {
374 // TODO(hshi): re-enable this on trunk after fixing issues. See 374 #if defined(OS_CHROMEOS)
375 // http://crbug.com/362693, http://crosbug.com/p/28034. 375 if (!profile_)
376 return false;
377 PrefService* pref_service = profile_->GetPrefs();
378 // Enable cursor compositing when one or more of the listed accessibility
379 // features are turned on.
380 if (pref_service->GetBoolean(prefs::kLargeCursorEnabled) ||
381 pref_service->GetBoolean(prefs::kHighContrastEnabled) ||
382 pref_service->GetBoolean(prefs::kScreenMagnifierEnabled))
383 return true;
384 #endif
376 return false; 385 return false;
377 } 386 }
378 387
379 void AccessibilityManager::EnableLargeCursor(bool enabled) { 388 void AccessibilityManager::EnableLargeCursor(bool enabled) {
380 if (!profile_) 389 if (!profile_)
381 return; 390 return;
382 391
383 PrefService* pref_service = profile_->GetPrefs(); 392 PrefService* pref_service = profile_->GetPrefs();
384 pref_service->SetBoolean(prefs::kLargeCursorEnabled, enabled); 393 pref_service->SetBoolean(prefs::kLargeCursorEnabled, enabled);
385 pref_service->CommitPendingWrite(); 394 pref_service->CommitPendingWrite();
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 chrome_vox_loaded_on_lock_screen_; 1012 chrome_vox_loaded_on_lock_screen_;
1004 } 1013 }
1005 1014
1006 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) { 1015 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) {
1007 // Do any teardown work needed immediately after ChromeVox actually unloads. 1016 // Do any teardown work needed immediately after ChromeVox actually unloads.
1008 if (system_sounds_enabled_) 1017 if (system_sounds_enabled_)
1009 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); 1018 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED);
1010 } 1019 }
1011 1020
1012 } // namespace chromeos 1021 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/display/mouse_cursor_event_filter.cc ('k') | ui/aura/env.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698