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

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: rebase 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 { 10 namespace {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 RemoveUserPreference(layout); 139 RemoveUserPreference(layout);
140 user_preference_.insert(std::make_pair(layout, keyboard)); 140 user_preference_.insert(std::make_pair(layout, keyboard));
141 return true; 141 return true;
142 } 142 }
143 143
144 void VirtualKeyboardSelector::RemoveUserPreference(const std::string& layout) { 144 void VirtualKeyboardSelector::RemoveUserPreference(const std::string& layout) {
145 user_preference_.erase(layout); 145 user_preference_.erase(layout);
146 } 146 }
147 147
148 void VirtualKeyboardSelector::ClearAllUserPreferences() {
149 user_preference_.clear();
150 }
151
148 const VirtualKeyboard* 152 const VirtualKeyboard*
149 VirtualKeyboardSelector::SelectVirtualKeyboardWithoutPreferences( 153 VirtualKeyboardSelector::SelectVirtualKeyboardWithoutPreferences(
150 const std::string& layout) { 154 const std::string& layout) {
151 const VirtualKeyboard* keyboard = 155 const VirtualKeyboard* keyboard =
152 SelectVirtualKeyboardInternal(keyboards_, layout); 156 SelectVirtualKeyboardInternal(keyboards_, layout);
153 if (!keyboard) 157 if (!keyboard)
154 keyboard = SelectVirtualKeyboardInternal(system_keyboards_, layout); 158 keyboard = SelectVirtualKeyboardInternal(system_keyboards_, layout);
155 return keyboard; 159 return keyboard;
156 } 160 }
157 161
158 } // namespace input_method 162 } // namespace input_method
159 } // namespace chromeos 163 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698