OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/input_method/virtual_keyboard_selector.h" | 5 #include "chrome/browser/chromeos/input_method/virtual_keyboard_selector.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 | 9 |
10 namespace chromeos { | 10 namespace chromeos { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 | 129 |
130 RemoveUserPreference(layout); | 130 RemoveUserPreference(layout); |
131 user_preference_.insert(std::make_pair(layout, keyboard)); | 131 user_preference_.insert(std::make_pair(layout, keyboard)); |
132 return true; | 132 return true; |
133 } | 133 } |
134 | 134 |
135 void VirtualKeyboardSelector::RemoveUserPreference(const std::string& layout) { | 135 void VirtualKeyboardSelector::RemoveUserPreference(const std::string& layout) { |
136 user_preference_.erase(layout); | 136 user_preference_.erase(layout); |
137 } | 137 } |
138 | 138 |
139 void VirtualKeyboardSelector::ClearUserPreference() { | |
bryeung
2011/08/03 22:15:40
should probably be ClearUserPreferences or ClearAl
Yusuke Sato
2011/08/04 07:34:50
Done.
| |
140 user_preference_.clear(); | |
141 } | |
142 | |
139 const VirtualKeyboard* | 143 const VirtualKeyboard* |
140 VirtualKeyboardSelector::SelectVirtualKeyboardWithoutPreferences( | 144 VirtualKeyboardSelector::SelectVirtualKeyboardWithoutPreferences( |
141 const std::string& layout) { | 145 const std::string& layout) { |
142 const VirtualKeyboard* keyboard = | 146 const VirtualKeyboard* keyboard = |
143 SelectVirtualKeyboardInternal(keyboards_, layout, NULL); | 147 SelectVirtualKeyboardInternal(keyboards_, layout, NULL); |
144 if (!keyboard) | 148 if (!keyboard) |
145 keyboard = SelectVirtualKeyboardInternal(system_keyboards_, layout, NULL); | 149 keyboard = SelectVirtualKeyboardInternal(system_keyboards_, layout, NULL); |
146 return keyboard; | 150 return keyboard; |
147 } | 151 } |
148 | 152 |
149 } // namespace input_method | 153 } // namespace input_method |
150 } // namespace chromeos | 154 } // namespace chromeos |
OLD | NEW |