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

Unified Diff: chrome/browser/extensions/extension_input_api.cc

Issue 7033033: Add hideKeyboard API to chrome.experimental.input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 'Moved hideKeyboard to chrome.experimental.input namespace' Created 9 years, 7 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/extensions/extension_input_api.cc
diff --git a/chrome/browser/extensions/extension_input_api.cc b/chrome/browser/extensions/extension_input_api.cc
index 82df0db3a97e3f5c5e36d559d35ba9bd2ccce41c..f544991f9c3be4782fb6461a448844bc96b6cc26 100644
--- a/chrome/browser/extensions/extension_input_api.cc
+++ b/chrome/browser/extensions/extension_input_api.cc
@@ -16,6 +16,10 @@
#include "views/ime/input_method.h"
#include "views/widget/widget.h"
+#if defined(TOUCH_UI)
+#include "content/common/notification_service.h"
+#endif
+
#if defined(OS_CHROMEOS) && defined(TOUCH_UI)
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/cros/input_method_library.h"
@@ -125,6 +129,16 @@ bool SendKeyboardEventInputFunction::RunImpl() {
return true;
}
+#if defined(TOUCH_UI)
+bool HideKeyboardInputFunction::RunImpl() {
+ NotificationService::current()->Notify(
+ NotificationType::HIDE_KEYBOARD_INVOKED,
+ Source<HideKeyboardInputFunction>(this),
+ NotificationService::NoDetails());
+ return true;
+}
+#endif
+
#if defined(OS_CHROMEOS) && defined(TOUCH_UI)
// TODO(yusukes): This part should be moved to extension_input_api_chromeos.cc.
bool SendHandwritingStrokeFunction::RunImpl() {

Powered by Google App Engine
This is Rietveld 408576698