OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "shell/android/keyboard_impl.h" | 5 #include "shell/android/keyboard_impl.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "jni/Keyboard_jni.h" | 9 #include "jni/Keyboard_jni.h" |
10 | 10 |
11 namespace mojo { | |
12 namespace shell { | 11 namespace shell { |
13 | 12 |
14 KeyboardImpl::KeyboardImpl(InterfaceRequest<Keyboard> request) | 13 KeyboardImpl::KeyboardImpl(mojo::InterfaceRequest<Keyboard> request) |
15 : binding_(this, request.Pass()) { | 14 : binding_(this, request.Pass()) { |
16 } | 15 } |
17 | 16 |
18 KeyboardImpl::~KeyboardImpl() { | 17 KeyboardImpl::~KeyboardImpl() { |
19 } | 18 } |
20 | 19 |
21 void KeyboardImpl::Show() { | 20 void KeyboardImpl::Show() { |
22 Java_Keyboard_showSoftKeyboard(base::android::AttachCurrentThread(), | 21 Java_Keyboard_showSoftKeyboard(base::android::AttachCurrentThread(), |
23 base::android::GetApplicationContext()); | 22 base::android::GetApplicationContext()); |
24 } | 23 } |
25 | 24 |
26 void KeyboardImpl::Hide() { | 25 void KeyboardImpl::Hide() { |
27 Java_Keyboard_hideSoftKeyboard(base::android::AttachCurrentThread(), | 26 Java_Keyboard_hideSoftKeyboard(base::android::AttachCurrentThread(), |
28 base::android::GetApplicationContext()); | 27 base::android::GetApplicationContext()); |
29 } | 28 } |
30 | 29 |
31 bool RegisterKeyboardJni(JNIEnv* env) { | 30 bool RegisterKeyboardJni(JNIEnv* env) { |
32 return RegisterNativesImpl(env); | 31 return RegisterNativesImpl(env); |
33 } | 32 } |
34 | 33 |
35 } // namespace shell | 34 } // namespace shell |
36 } // namespace mojo | |
OLD | NEW |