| Index: chrome/browser/extensions/api/input/input.cc
|
| diff --git a/chrome/browser/extensions/api/input/input.cc b/chrome/browser/extensions/api/input/input.cc
|
| index f0eecbeb303d338e25d6c34953cc53bc1d89dcd3..3c2a6a34d5b12e601d1ce615bc3dbf3a3986dfae 100644
|
| --- a/chrome/browser/extensions/api/input/input.cc
|
| +++ b/chrome/browser/extensions/api/input/input.cc
|
| @@ -15,6 +15,7 @@
|
| #if defined(USE_ASH)
|
| #include "ash/shell.h"
|
| #include "ui/aura/root_window.h"
|
| +#include "ui/keyboard/keyboard_controller.h"
|
| #include "ui/keyboard/keyboard_util.h"
|
| #endif
|
|
|
| @@ -45,9 +46,26 @@ bool SendKeyboardEventInputFunction::RunImpl() {
|
| return false;
|
| }
|
|
|
| +bool SetKeyboardVisibilityFunction::RunImpl() {
|
| +#if defined(USE_ASH)
|
| + DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| +
|
| + bool visible;
|
| + EXTENSION_FUNCTION_VALIDATE(args_->GetBoolean(0, &visible));
|
| +
|
| + ash::Shell::GetKeyboardController()->SetKeyboardVisibility(visible);
|
| +
|
| + return true;
|
| +#endif
|
| + error_ = kNotYetImplementedError;
|
| + return false;
|
| +}
|
| +
|
| +
|
| InputAPI::InputAPI(Profile* profile) {
|
| ExtensionFunctionRegistry* registry =
|
| ExtensionFunctionRegistry::GetInstance();
|
| + registry->RegisterFunction<SetKeyboardVisibilityFunction>();
|
| registry->RegisterFunction<SendKeyboardEventInputFunction>();
|
| }
|
|
|
|
|