| 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 b4d264fcbec26bc28dc068196428d7b505126d8a..cef26a5344d254a41a037126160cceaa775f11f8 100644
|
| --- a/chrome/browser/extensions/api/input/input.cc
|
| +++ b/chrome/browser/extensions/api/input/input.cc
|
| @@ -4,12 +4,14 @@
|
|
|
| #include "chrome/browser/extensions/api/input/input.h"
|
|
|
| +#include "ash/root_window_controller.h"
|
| #include "base/lazy_instance.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/strings/string16.h"
|
| #include "chrome/browser/extensions/extension_function_registry.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "ui/base/events/event.h"
|
| +#include "ui/keyboard/keyboard_controller.h"
|
|
|
| #if defined(USE_ASH)
|
| #include "ash/shell.h"
|
| @@ -38,10 +40,24 @@ bool InsertTextInputFunction::RunImpl() {
|
| return false;
|
| }
|
|
|
| +bool HideKeyboardFunction::RunImpl() {
|
| +#if defined(USE_ASH)
|
| + DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| +
|
| + ash::Shell::GetPrimaryRootWindowController()->keyboard_controller()->
|
| + HideKeyboard();
|
| +
|
| + return true;
|
| +#endif
|
| + error_ = kNotYetImplementedError;
|
| + return false;
|
| +}
|
| +
|
| InputAPI::InputAPI(Profile* profile) {
|
| ExtensionFunctionRegistry* registry =
|
| ExtensionFunctionRegistry::GetInstance();
|
| registry->RegisterFunction<InsertTextInputFunction>();
|
| + registry->RegisterFunction<HideKeyboardFunction>();
|
| }
|
|
|
| InputAPI::~InputAPI() {
|
|
|