OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // This file defines functions that implement the static methods declared in a | 5 // This file defines functions that implement the static methods declared in a |
6 // closely-related Java class in the platform-specific user interface | 6 // closely-related Java class in the platform-specific user interface |
7 // implementation. In effect, it is the entry point for all JNI calls *into* | 7 // implementation. In effect, it is the entry point for all JNI calls *into* |
8 // the C++ codebase from Java. The separate ChromotingJniRuntime class serves | 8 // the C++ codebase from Java. The separate ChromotingJniRuntime class serves |
9 // as the corresponding exit point, and is responsible for making all JNI calls | 9 // as the corresponding exit point, and is responsible for making all JNI calls |
10 // *out of* the C++ codebase into Java. | 10 // *out of* the C++ codebase into Java. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 jint y, | 120 jint y, |
121 jint which_button, | 121 jint which_button, |
122 jboolean button_down) { | 122 jboolean button_down) { |
123 remoting::ChromotingJniRuntime::GetInstance()->session()->PerformMouseAction( | 123 remoting::ChromotingJniRuntime::GetInstance()->session()->PerformMouseAction( |
124 x, | 124 x, |
125 y, | 125 y, |
126 static_cast<remoting::protocol::MouseEvent_MouseButton>(which_button), | 126 static_cast<remoting::protocol::MouseEvent_MouseButton>(which_button), |
127 button_down); | 127 button_down); |
128 } | 128 } |
129 | 129 |
| 130 JNIEXPORT void JNICALL JNI_IMPLEMENTATION(keyboardActionNative)( |
| 131 JNIEnv* env, |
| 132 jobject that, |
| 133 jint key_code, |
| 134 jboolean key_down) { |
| 135 remoting::ChromotingJniRuntime::GetInstance()->session()-> |
| 136 PerformKeyboardAction(key_code, key_down); |
| 137 } |
| 138 |
130 } // extern "C" | 139 } // extern "C" |
OLD | NEW |