Index: mojo/shell/android/keyboard_impl.cc |
diff --git a/mojo/shell/android/keyboard_impl.cc b/mojo/shell/android/keyboard_impl.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..60336bba63b4bcbb3a12fe077600f564ec130287 |
--- /dev/null |
+++ b/mojo/shell/android/keyboard_impl.cc |
@@ -0,0 +1,36 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "mojo/shell/android/keyboard_impl.h" |
+ |
+#include "base/android/jni_android.h" |
+#include "base/logging.h" |
+#include "jni/Keyboard_jni.h" |
+ |
+namespace mojo { |
+namespace shell { |
+ |
+KeyboardImpl::KeyboardImpl(InterfaceRequest<Keyboard> request) |
+ : binding_(this, request.Pass()) { |
+} |
+ |
+KeyboardImpl::~KeyboardImpl() { |
+} |
+ |
+void KeyboardImpl::Show() { |
+ Java_Keyboard_showSoftKeyboard(base::android::AttachCurrentThread(), |
+ base::android::GetApplicationContext()); |
+} |
+ |
+void KeyboardImpl::Hide() { |
+ Java_Keyboard_hideSoftKeyboard(base::android::AttachCurrentThread(), |
+ base::android::GetApplicationContext()); |
+} |
+ |
+bool RegisterKeyboardJni(JNIEnv* env) { |
+ return RegisterNativesImpl(env); |
+} |
+ |
+} // namespace shell |
+} // namespace mojo |