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

Side by Side Diff: chrome/browser/chromeos/preferences.cc

Issue 212603005: Don't handle NaturalScroll in Chrome but pass it to CMT instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Ash unit tests 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/preferences.h" 5 #include "chrome/browser/chromeos/preferences.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/autoclick/autoclick_controller.h" 9 #include "ash/autoclick/autoclick_controller.h"
10 #include "ash/magnifier/magnifier_constants.h" 10 #include "ash/magnifier/magnifier_constants.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 UMA_HISTOGRAM_BOOLEAN("Touchpad.ThreeFingerClick.Started", enabled); 435 UMA_HISTOGRAM_BOOLEAN("Touchpad.ThreeFingerClick.Started", enabled);
436 } 436 }
437 if (reason != REASON_PREF_CHANGED || pref_name == prefs::kNaturalScroll) { 437 if (reason != REASON_PREF_CHANGED || pref_name == prefs::kNaturalScroll) {
438 // Force natural scroll default if we've sync'd and if the cmd line arg is 438 // Force natural scroll default if we've sync'd and if the cmd line arg is
439 // set. 439 // set.
440 ForceNaturalScrollDefault(); 440 ForceNaturalScrollDefault();
441 441
442 const bool enabled = natural_scroll_.GetValue(); 442 const bool enabled = natural_scroll_.GetValue();
443 DVLOG(1) << "Natural scroll set to " << enabled; 443 DVLOG(1) << "Natural scroll set to " << enabled;
444 if (user_is_active) 444 if (user_is_active)
445 ui::SetNaturalScroll(enabled); 445 touchpad_settings.SetNaturalScroll(enabled);
446 if (reason == REASON_PREF_CHANGED) 446 if (reason == REASON_PREF_CHANGED)
447 UMA_HISTOGRAM_BOOLEAN("Touchpad.NaturalScroll.Changed", enabled); 447 UMA_HISTOGRAM_BOOLEAN("Touchpad.NaturalScroll.Changed", enabled);
448 else if (reason == REASON_INITIALIZATION) 448 else if (reason == REASON_INITIALIZATION)
449 UMA_HISTOGRAM_BOOLEAN("Touchpad.NaturalScroll.Started", enabled); 449 UMA_HISTOGRAM_BOOLEAN("Touchpad.NaturalScroll.Started", enabled);
450 } 450 }
451 if (reason != REASON_PREF_CHANGED || pref_name == prefs::kMouseSensitivity) { 451 if (reason != REASON_PREF_CHANGED || pref_name == prefs::kMouseSensitivity) {
452 const int sensitivity = mouse_sensitivity_.GetValue(); 452 const int sensitivity = mouse_sensitivity_.GetValue();
453 if (user_is_active) 453 if (user_is_active)
454 mouse_settings.SetSensitivity(sensitivity); 454 mouse_settings.SetSensitivity(sensitivity);
455 if (reason == REASON_PREF_CHANGED) { 455 if (reason == REASON_PREF_CHANGED) {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 touch_hud_projection_enabled_.SetValue(enabled); 639 touch_hud_projection_enabled_.SetValue(enabled);
640 } 640 }
641 641
642 void Preferences::ActiveUserChanged(const User* active_user) { 642 void Preferences::ActiveUserChanged(const User* active_user) {
643 if (active_user != user_) 643 if (active_user != user_)
644 return; 644 return;
645 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); 645 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, "");
646 } 646 }
647 647
648 } // namespace chromeos 648 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_display_host_impl.cc ('k') | chrome/browser/chromeos/preferences_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698