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

Side by Side Diff: content/browser/android/ime_utils.h

Issue 10831060: Refactor the Android port to allow access to the chrome layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gyp fixes Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_ANDROID_IME_UTILS_H_
6 #define CONTENT_BROWSER_ANDROID_IME_UTILS_H_
7
8 #include <jni.h>
9
10 class AndroidKeyEvent;
11
12 namespace content {
13
14 struct NativeWebKeyboardEvent;
15
16 // Returns a java KeyEvent from a NativeWebKeyboardEvent, NULL if it fails.
17 jobject KeyEventFromNative(const NativeWebKeyboardEvent& event);
18
19 // Maps a java KeyEvent into a NativeWebKeyboardEvent.
20 // |java_key_event| is used to maintain a globalref for KeyEvent.
21 // |action| will help determine the WebInputEvent type.
22 // type, |modifiers|, |time_ms|, |key_code|, |unicode_char| is used to create
23 // WebKeyboardEvent. |key_code| is also needed ad need to treat the enter key
24 // as a key press of character \r.
25 NativeWebKeyboardEvent NativeWebKeyboardEventFromKeyEvent(
26 JNIEnv* env, jobject java_key_event, int action, int modifiers,
27 long time_ms, int key_code, bool is_system_key, int unicode_char);
28
29 } // namespace content
30
31 #endif // CONTENT_BROWSER_ANDROID_IME_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698