| OLD | NEW |
| 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 "ash/magnifier/magnifier_constants.h" | 7 #include "ash/magnifier/magnifier_constants.h" |
| 8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
| 9 #include "base/chromeos/chromeos_version.h" | 9 #include "base/chromeos/chromeos_version.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 } | 63 } |
| 64 | 64 |
| 65 // static | 65 // static |
| 66 void Preferences::RegisterPrefs(PrefRegistrySimple* registry) { | 66 void Preferences::RegisterPrefs(PrefRegistrySimple* registry) { |
| 67 registry->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false); | 67 registry->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false); |
| 68 registry->RegisterBooleanPref(prefs::kOwnerTapToClickEnabled, true); | 68 registry->RegisterBooleanPref(prefs::kOwnerTapToClickEnabled, true); |
| 69 registry->RegisterBooleanPref(prefs::kVirtualKeyboardEnabled, false); | 69 registry->RegisterBooleanPref(prefs::kVirtualKeyboardEnabled, false); |
| 70 } | 70 } |
| 71 | 71 |
| 72 // static | 72 // static |
| 73 void Preferences::RegisterUserPrefs( | 73 void Preferences::RegisterProfilePrefs( |
| 74 user_prefs::PrefRegistrySyncable* registry) { | 74 user_prefs::PrefRegistrySyncable* registry) { |
| 75 std::string hardware_keyboard_id; | 75 std::string hardware_keyboard_id; |
| 76 // TODO(yusukes): Remove the runtime hack. | 76 // TODO(yusukes): Remove the runtime hack. |
| 77 if (base::chromeos::IsRunningOnChromeOS()) { | 77 if (base::chromeos::IsRunningOnChromeOS()) { |
| 78 input_method::InputMethodManager* manager = | 78 input_method::InputMethodManager* manager = |
| 79 input_method::InputMethodManager::Get(); | 79 input_method::InputMethodManager::Get(); |
| 80 if (manager) { | 80 if (manager) { |
| 81 hardware_keyboard_id = | 81 hardware_keyboard_id = |
| 82 manager->GetInputMethodUtil()->GetHardwareInputMethodId(); | 82 manager->GetInputMethodUtil()->GetHardwareInputMethodId(); |
| 83 } | 83 } |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 | 1021 |
| 1022 input_method::AutoRepeatRate rate; | 1022 input_method::AutoRepeatRate rate; |
| 1023 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); | 1023 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); |
| 1024 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); | 1024 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); |
| 1025 DCHECK(rate.initial_delay_in_ms > 0); | 1025 DCHECK(rate.initial_delay_in_ms > 0); |
| 1026 DCHECK(rate.repeat_interval_in_ms > 0); | 1026 DCHECK(rate.repeat_interval_in_ms > 0); |
| 1027 input_method::XKeyboard::SetAutoRepeatRate(rate); | 1027 input_method::XKeyboard::SetAutoRepeatRate(rate); |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 } // namespace chromeos | 1030 } // namespace chromeos |
| OLD | NEW |