| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "chrome/browser/chromeos/language_preferences.h" | 6 #include "chrome/browser/chromeos/language_preferences.h" |
| 7 #include "chrome/browser/prefs/pref_registry_simple.h" |
| 7 #include "chrome/common/pref_names.h" | 8 #include "chrome/common/pref_names.h" |
| 8 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
| 9 | 10 |
| 10 namespace chromeos { | 11 namespace chromeos { |
| 11 namespace language_prefs { | 12 namespace language_prefs { |
| 12 | 13 |
| 13 // --------------------------------------------------------------------------- | 14 // --------------------------------------------------------------------------- |
| 14 // For ibus-daemon | 15 // For ibus-daemon |
| 15 // --------------------------------------------------------------------------- | 16 // --------------------------------------------------------------------------- |
| 16 const char kGeneralSectionName[] = "general"; | 17 const char kGeneralSectionName[] = "general"; |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 COMPILE_ASSERT(kNumMozcIntegerPrefs == arraysize(kMozcIntegerPrefs), | 386 COMPILE_ASSERT(kNumMozcIntegerPrefs == arraysize(kMozcIntegerPrefs), |
| 386 TheSizeShouldMatch); | 387 TheSizeShouldMatch); |
| 387 | 388 |
| 388 // --------------------------------------------------------------------------- | 389 // --------------------------------------------------------------------------- |
| 389 // For keyboard stuff | 390 // For keyboard stuff |
| 390 // --------------------------------------------------------------------------- | 391 // --------------------------------------------------------------------------- |
| 391 const int kXkbAutoRepeatDelayInMs = 500; | 392 const int kXkbAutoRepeatDelayInMs = 500; |
| 392 const int kXkbAutoRepeatIntervalInMs = 50; | 393 const int kXkbAutoRepeatIntervalInMs = 50; |
| 393 const char kPreferredKeyboardLayout[] = "PreferredKeyboardLayout"; | 394 const char kPreferredKeyboardLayout[] = "PreferredKeyboardLayout"; |
| 394 | 395 |
| 395 void RegisterPrefs(PrefServiceSimple* local_state) { | 396 void RegisterPrefs(PrefRegistrySimple* registry) { |
| 396 // We use an empty string here rather than a hardware keyboard layout name | 397 // We use an empty string here rather than a hardware keyboard layout name |
| 397 // since input_method::GetHardwareInputMethodId() might return a fallback | 398 // since input_method::GetHardwareInputMethodId() might return a fallback |
| 398 // layout name if local_state->RegisterStringPref(kHardwareKeyboardLayout) | 399 // layout name if registry->RegisterStringPref(kHardwareKeyboardLayout) |
| 399 // is not called yet. | 400 // is not called yet. |
| 400 local_state->RegisterStringPref(kPreferredKeyboardLayout, | 401 registry->RegisterStringPref(kPreferredKeyboardLayout, ""); |
| 401 ""); | |
| 402 } | 402 } |
| 403 | 403 |
| 404 } // namespace language_prefs | 404 } // namespace language_prefs |
| 405 } // namespace chromeos | 405 } // namespace chromeos |
| OLD | NEW |