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

Side by Side Diff: shell/android/keyboard_impl.cc

Issue 1088793003: Expose sky KeyboardService in android mojo_shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « shell/android/keyboard_impl.h ('k') | shell/android/library_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 shell { 11 namespace shell {
12 12
13 KeyboardImpl::KeyboardImpl(mojo::InterfaceRequest<Keyboard> request) 13 // static
14 : binding_(this, request.Pass()) { 14 void KeyboardImpl::CreateKeyboardImpl(
15 } 15 mojo::InterfaceRequest<keyboard::KeyboardService> request) {
16 16 MojoHandle handle_val = request.PassMessagePipe().release().value();
17 KeyboardImpl::~KeyboardImpl() { 17 Java_Keyboard_createKeyboardImpl(base::android::AttachCurrentThread(),
18 } 18 base::android::GetApplicationContext(),
19 19 handle_val);
20 void KeyboardImpl::Show() {
21 Java_Keyboard_showSoftKeyboard(base::android::AttachCurrentThread(),
22 base::android::GetApplicationContext());
23 }
24
25 void KeyboardImpl::Hide() {
26 Java_Keyboard_hideSoftKeyboard(base::android::AttachCurrentThread(),
27 base::android::GetApplicationContext());
28 } 20 }
29 21
30 bool RegisterKeyboardJni(JNIEnv* env) { 22 bool RegisterKeyboardJni(JNIEnv* env) {
31 return RegisterNativesImpl(env); 23 return RegisterNativesImpl(env);
32 } 24 }
33 25
34 } // namespace shell 26 } // namespace shell
OLDNEW
« no previous file with comments | « shell/android/keyboard_impl.h ('k') | shell/android/library_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698