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

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: delete password enum 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..62cd550d0d4cda2fecc0618716131a8fe7610a86 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,26 @@ 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:
+ 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_NUMBER:
+ context.type = "number";
+ break;
+ default:
+ context.type = "text";
+ break;
+ }
observer_->OnFocus(context);
}

Powered by Google App Engine
This is Rietveld 408576698