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/autoclick/autoclick_controller.h" | 7 #include "ash/autoclick/autoclick_controller.h" |
8 #include "ash/magnifier/magnifier_constants.h" | 8 #include "ash/magnifier/magnifier_constants.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 | 85 |
86 // static | 86 // static |
87 void Preferences::RegisterProfilePrefs( | 87 void Preferences::RegisterProfilePrefs( |
88 user_prefs::PrefRegistrySyncable* registry) { | 88 user_prefs::PrefRegistrySyncable* registry) { |
89 std::string hardware_keyboard_id; | 89 std::string hardware_keyboard_id; |
90 // TODO(yusukes): Remove the runtime hack. | 90 // TODO(yusukes): Remove the runtime hack. |
91 if (base::SysInfo::IsRunningOnChromeOS()) { | 91 if (base::SysInfo::IsRunningOnChromeOS()) { |
92 input_method::InputMethodManager* manager = | 92 input_method::InputMethodManager* manager = |
93 input_method::InputMethodManager::Get(); | 93 input_method::InputMethodManager::Get(); |
94 if (manager) { | 94 if (manager) { |
95 hardware_keyboard_id = | 95 std::vector<std::string> hardware_layouts; |
Alexander Alekseev
2014/02/11 13:36:02
#include <vector>
Seigo Nonaka
2014/02/12 13:21:02
Done.
| |
96 manager->GetInputMethodUtil()->GetHardwareInputMethodId(); | 96 manager->GetInputMethodUtil()->GetHardwareInputMethodIds( |
97 &hardware_layouts); | |
98 hardware_keyboard_id = JoinString(hardware_layouts, ','); | |
97 } | 99 } |
98 } else { | 100 } else { |
99 hardware_keyboard_id = "xkb:us::eng"; // only for testing. | 101 hardware_keyboard_id = "xkb:us::eng"; // only for testing. |
100 } | 102 } |
101 | 103 |
102 registry->RegisterBooleanPref( | 104 registry->RegisterBooleanPref( |
103 prefs::kPerformanceTracingEnabled, | 105 prefs::kPerformanceTracingEnabled, |
104 false, | 106 false, |
105 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 107 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
106 | 108 |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
629 } | 631 } |
630 | 632 |
631 void Preferences::OnTouchHudProjectionToggled(bool enabled) { | 633 void Preferences::OnTouchHudProjectionToggled(bool enabled) { |
632 if (touch_hud_projection_enabled_.GetValue() == enabled) | 634 if (touch_hud_projection_enabled_.GetValue() == enabled) |
633 return; | 635 return; |
634 | 636 |
635 touch_hud_projection_enabled_.SetValue(enabled); | 637 touch_hud_projection_enabled_.SetValue(enabled); |
636 } | 638 } |
637 | 639 |
638 } // namespace chromeos | 640 } // namespace chromeos |
OLD | NEW |