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

Unified Diff: chrome/browser/chromeos/extensions/input_method_api.cc

Issue 676593004: Adds experimental flag --enable-experimental-ime-features. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revised per comments. Created 6 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/extensions/input_method_api.cc
diff --git a/chrome/browser/chromeos/extensions/input_method_api.cc b/chrome/browser/chromeos/extensions/input_method_api.cc
index eebcdf050c93863f1a9475b5789580ba13427c94..1ee780647a1693a9b71245d311cdf01727f1cda9 100644
--- a/chrome/browser/chromeos/extensions/input_method_api.cc
+++ b/chrome/browser/chromeos/extensions/input_method_api.cc
@@ -25,6 +25,18 @@ const char kXkbPrefix[] = "xkb:";
namespace extensions {
+ExtensionFunction::ResponseAction GetInputMethodConfigFunction::Run() {
+#if !defined(OS_CHROMEOS)
+ EXTENSION_FUNCTION_VALIDATE(false);
+#else
+ bool isExperimental = chromeos::input_method::InputMethodManager::
+ IsExperimentalImeFeaturesEnabled();
+ base::DictionaryValue* output = new base::DictionaryValue();
+ output->SetBoolean("isExperimentalEnabled", isExperimental);
+ return RespondNow(OneArgument(output));
+#endif
+}
+
ExtensionFunction::ResponseAction GetCurrentInputMethodFunction::Run() {
#if !defined(OS_CHROMEOS)
EXTENSION_FUNCTION_VALIDATE(false);
@@ -91,6 +103,7 @@ InputMethodAPI::InputMethodAPI(content::BrowserContext* context)
EventRouter::Get(context_)->RegisterObserver(this, kOnInputMethodChanged);
ExtensionFunctionRegistry* registry =
ExtensionFunctionRegistry::GetInstance();
+ registry->RegisterFunction<GetInputMethodConfigFunction>();
registry->RegisterFunction<GetCurrentInputMethodFunction>();
registry->RegisterFunction<SetCurrentInputMethodFunction>();
registry->RegisterFunction<GetInputMethodsFunction>();

Powered by Google App Engine
This is Rietveld 408576698