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

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

Issue 2533373002: Enabled/disable touch screen in TabletPowerButtonController (Closed)
Patch Set: incorporate comments from gab@ and afakhry@ Created 4 years 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) 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/common/accessibility_types.h" 10 #include "ash/common/accessibility_types.h"
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 } 700 }
701 } 701 }
702 702
703 if (pref_name == prefs::kUse24HourClock || 703 if (pref_name == prefs::kUse24HourClock ||
704 reason != REASON_ACTIVE_USER_CHANGED) { 704 reason != REASON_ACTIVE_USER_CHANGED) {
705 const bool value = prefs_->GetBoolean(prefs::kUse24HourClock); 705 const bool value = prefs_->GetBoolean(prefs::kUse24HourClock);
706 user_manager::known_user::SetBooleanPref(user_->GetAccountId(), 706 user_manager::known_user::SetBooleanPref(user_->GetAccountId(),
707 prefs::kUse24HourClock, value); 707 prefs::kUse24HourClock, value);
708 } 708 }
709 709
710 system::InputDeviceSettings::Get() 710 system::InputDeviceSettings::Get()->UpdateTouchDevicesStatusFromPrefs();
711 ->UpdateTouchDevicesStatusFromActiveProfilePrefs();
712 } 711 }
713 712
714 void Preferences::OnIsSyncingChanged() { 713 void Preferences::OnIsSyncingChanged() {
715 DVLOG(1) << "OnIsSyncingChanged"; 714 DVLOG(1) << "OnIsSyncingChanged";
716 ForceNaturalScrollDefault(); 715 ForceNaturalScrollDefault();
717 } 716 }
718 717
719 void Preferences::ForceNaturalScrollDefault() { 718 void Preferences::ForceNaturalScrollDefault() {
720 DVLOG(1) << "ForceNaturalScrollDefault"; 719 DVLOG(1) << "ForceNaturalScrollDefault";
721 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 720 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 touch_hud_projection_enabled_.SetValue(enabled); 794 touch_hud_projection_enabled_.SetValue(enabled);
796 } 795 }
797 796
798 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { 797 void Preferences::ActiveUserChanged(const user_manager::User* active_user) {
799 if (active_user != user_) 798 if (active_user != user_)
800 return; 799 return;
801 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); 800 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, "");
802 } 801 }
803 802
804 } // namespace chromeos 803 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698