Chromium Code Reviews| 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..f5d9e38ff130deed8dbdea1ae8f70f07938713c3 100644 |
| --- a/chrome/browser/chromeos/extensions/input_method_api.cc |
| +++ b/chrome/browser/chromeos/extensions/input_method_api.cc |
| @@ -25,6 +25,19 @@ const char kXkbPrefix[] = "xkb:"; |
| namespace extensions { |
| +ExtensionFunction::ResponseAction GetConfigFunction::Run() { |
| +#if !defined(OS_CHROMEOS) |
| + EXTENSION_FUNCTION_VALIDATE(false); |
| +#else |
| + bool isExperimental = chromeos::input_method::InputMethodManager:: |
| + IsExperimentalImeFeaturesEnabled(); |
| + LOG(ERROR) << "-----run to here." << isExperimental; |
|
Yuki
2014/10/23 07:05:43
Do not use LOG(ERROR) for non error case.
Probably
Shu Chen
2014/10/23 07:19:05
Done.
|
| + 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 +104,7 @@ InputMethodAPI::InputMethodAPI(content::BrowserContext* context) |
| EventRouter::Get(context_)->RegisterObserver(this, kOnInputMethodChanged); |
| ExtensionFunctionRegistry* registry = |
| ExtensionFunctionRegistry::GetInstance(); |
| + registry->RegisterFunction<GetConfigFunction>(); |
| registry->RegisterFunction<GetCurrentInputMethodFunction>(); |
| registry->RegisterFunction<SetCurrentInputMethodFunction>(); |
| registry->RegisterFunction<GetInputMethodsFunction>(); |