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

Side by Side Diff: chrome/browser/chromeos/input_method/virtual_keyboard_selector.cc

Issue 7493077: Add pref entry for virtual keyboard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698