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

Unified Diff: chrome/browser/chromeos/input_method/ibus_controller.cc

Issue 7976021: Tiny clean-up of ibus_cotroller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/input_method/ibus_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/ibus_controller.cc
diff --git a/chrome/browser/chromeos/input_method/ibus_controller.cc b/chrome/browser/chromeos/input_method/ibus_controller.cc
index 354f1c71808aab2e60862e2c7533b86304583e59..a613e7d2e633df379f3a5a3dd68a8d05b193d7a0 100644
--- a/chrome/browser/chromeos/input_method/ibus_controller.cc
+++ b/chrome/browser/chromeos/input_method/ibus_controller.cc
@@ -101,15 +101,24 @@ InputMethodDescriptor::InputMethodDescriptor() {
InputMethodDescriptor::~InputMethodDescriptor() {
}
+InputMethodDescriptor::InputMethodDescriptor(
+ const std::string& in_id,
+ const std::string& in_keyboard_layout,
+ const std::string& in_virtual_keyboard_layouts,
+ const std::string& in_language_code)
+ : id_(in_id),
+ keyboard_layout_(in_keyboard_layout),
+ language_code_(in_language_code) {
+ DCHECK(keyboard_layout_.find(",") == std::string::npos);
+ base::SplitString(
+ in_virtual_keyboard_layouts, ',', &virtual_keyboard_layouts_);
+}
+
// static
InputMethodDescriptor
InputMethodDescriptor::GetFallbackInputMethodDescriptor() {
- InputMethodDescriptor desc;
- desc.id_ = "xkb:us::eng";
- desc.keyboard_layout_ = kFallbackLayout;
- desc.virtual_keyboard_layouts_.push_back(kFallbackLayout);
- desc.language_code_ = "eng";
- return desc;
+ return InputMethodDescriptor(
+ "xkb:us::eng", kFallbackLayout, kFallbackLayout, "eng");
}
std::string InputMethodDescriptor::ToString() const {
« no previous file with comments | « chrome/browser/chromeos/input_method/ibus_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698