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

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

Issue 47553010: Set focused TextInputType to the Ime extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
Index: chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc b/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
index bd7d4f21c7c47d50cb2f9d545a1eb0953f173546..ff1a73cc0971d390c4b8578d70e850c02a3d81ef 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
@@ -416,8 +416,29 @@ void InputMethodEngineIBus::FocusIn(ibus::TextInputType text_input_type) {
InputContext context;
context.id = context_id_;
- // TODO: Other types
- context.type = "text";
+ switch (text_input_type) {
+ case ibus::TEXT_INPUT_TYPE_SEARCH:
Seigo Nonaka 2013/10/30 04:00:00 nit: need two-space indent.
yoichio 2013/10/30 05:32:22 Done.
+ context.type = "search";
+ break;
+ case ibus::TEXT_INPUT_TYPE_TELEPHONE:
+ context.type = "tel";
+ break;
+ case ibus::TEXT_INPUT_TYPE_URL:
+ context.type = "url";
+ break;
+ case ibus::TEXT_INPUT_TYPE_EMAIL:
+ context.type = "email";
+ break;
+ case ibus::TEXT_INPUT_TYPE_PASSWORD:
+ context.type = "password";
+ break;
+ case ibus::TEXT_INPUT_TYPE_NUMBER:
+ context.type = "number";
+ break;
+ default:
+ context.type = "text";
+ break;
+ }
observer_->OnFocus(context);
}

Powered by Google App Engine
This is Rietveld 408576698