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 #ifndef SHELL_ANDROID_KEYBOARD_IMPL_H_ | 5 #ifndef SHELL_ANDROID_KEYBOARD_IMPL_H_ |
6 #define SHELL_ANDROID_KEYBOARD_IMPL_H_ | 6 #define SHELL_ANDROID_KEYBOARD_IMPL_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "mojo/public/cpp/bindings/interface_request.h" | 10 #include "mojo/public/cpp/bindings/interface_request.h" |
11 #include "mojo/public/cpp/bindings/strong_binding.h" | |
12 #include "mojo/services/keyboard/public/interfaces/keyboard.mojom.h" | 11 #include "mojo/services/keyboard/public/interfaces/keyboard.mojom.h" |
13 | 12 |
14 namespace shell { | 13 namespace shell { |
15 | 14 |
16 class KeyboardImpl : public mojo::Keyboard { | 15 class KeyboardImpl { |
17 public: | 16 public: |
18 explicit KeyboardImpl(mojo::InterfaceRequest<mojo::Keyboard> request); | 17 static void CreateKeyboardImpl( |
19 ~KeyboardImpl(); | 18 mojo::InterfaceRequest<keyboard::KeyboardService> request); |
20 | |
21 // mojo::Keyboard implementation | |
22 void Show() override; | |
23 void Hide() override; | |
24 | |
25 private: | |
26 mojo::StrongBinding<mojo::Keyboard> binding_; | |
27 }; | 19 }; |
28 | 20 |
29 bool RegisterKeyboardJni(JNIEnv* env); | 21 bool RegisterKeyboardJni(JNIEnv* env); |
30 | 22 |
31 } // namespace shell | 23 } // namespace shell |
32 | 24 |
33 #endif // SHELL_ANDROID_KEYBOARD_IMPL_H_ | 25 #endif // SHELL_ANDROID_KEYBOARD_IMPL_H_ |
OLD | NEW |