diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-07-13 17:49:05 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-07-13 17:49:05 -0700 |
commit | cc96d626ee5ad60735162069e2529070548845d3 (patch) | |
tree | 3a7dfabfd62b1f88e8965ff8edab63f7fb815c29 /WebKit | |
parent | 552ce5e26f64b38c38262092c22f333a546be0ff (diff) | |
parent | b47b5d4ad21fc9f19fc8e6c0f453032658cad4cf (diff) | |
download | external_webkit-cc96d626ee5ad60735162069e2529070548845d3.zip external_webkit-cc96d626ee5ad60735162069e2529070548845d3.tar.gz external_webkit-cc96d626ee5ad60735162069e2529070548845d3.tar.bz2 |
am b47b5d4a: am 652e9a01: Migrate to new keycode constants in keycodes.h.
Merge commit 'b47b5d4ad21fc9f19fc8e6c0f453032658cad4cf'
* commit 'b47b5d4ad21fc9f19fc8e6c0f453032658cad4cf':
Migrate to new keycode constants in keycodes.h.
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 4 | ||||
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 12 | ||||
-rw-r--r-- | WebKit/android/plugins/ANPKeyCodes.h | 34 |
3 files changed, 39 insertions, 11 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index daca51e..d3e32d3 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -1906,8 +1906,8 @@ void WebViewCore::deleteSelection(int start, int end, int textGeneration) EditorClientAndroid* client = static_cast<EditorClientAndroid*>( m_mainFrame->editor()->client()); client->setUiGeneratedSelectionChange(true); - PlatformKeyboardEvent down(kKeyCodeDel, 0, 0, true, false, false, false); - PlatformKeyboardEvent up(kKeyCodeDel, 0, 0, false, false, false, false); + PlatformKeyboardEvent down(AKEYCODE_DEL, 0, 0, true, false, false, false); + PlatformKeyboardEvent up(AKEYCODE_DEL, 0, 0, false, false, false, false); key(down); key(up); client->setUiGeneratedSelectionChange(false); diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index ac36b73..5154b42 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -657,19 +657,19 @@ void getVisibleRect(WebCore::IntRect* rect) checkException(env); } -static CachedFrame::Direction KeyToDirection(KeyCode keyCode) +static CachedFrame::Direction KeyToDirection(int32_t keyCode) { switch (keyCode) { - case kKeyCodeDpadRight: + case AKEYCODE_DPAD_RIGHT: DBG_NAV_LOGD("keyCode=%s", "right"); return CachedFrame::RIGHT; - case kKeyCodeDpadLeft: + case AKEYCODE_DPAD_LEFT: DBG_NAV_LOGD("keyCode=%s", "left"); return CachedFrame::LEFT; - case kKeyCodeDpadDown: + case AKEYCODE_DPAD_DOWN: DBG_NAV_LOGD("keyCode=%s", "down"); return CachedFrame::DOWN; - case kKeyCodeDpadUp: + case AKEYCODE_DPAD_UP: DBG_NAV_LOGD("keyCode=%s", "up"); return CachedFrame::UP; default: @@ -706,7 +706,7 @@ bool moveCursor(int keyCode, int count, bool ignoreScroll) } m_viewImpl->m_moveGeneration++; - CachedFrame::Direction direction = KeyToDirection((KeyCode) keyCode); + CachedFrame::Direction direction = KeyToDirection(keyCode); const CachedFrame* cachedFrame, * oldFrame = 0; const CachedNode* cursor = root->currentCursor(&oldFrame); WebCore::IntPoint cursorLocation = root->cursorLocation(); diff --git a/WebKit/android/plugins/ANPKeyCodes.h b/WebKit/android/plugins/ANPKeyCodes.h index 328eb56..edfe2b9 100644 --- a/WebKit/android/plugins/ANPKeyCodes.h +++ b/WebKit/android/plugins/ANPKeyCodes.h @@ -29,8 +29,7 @@ /* List the key codes that are set to a plugin in the ANPKeyEvent. These exactly match the values in android/view/KeyEvent.java and the - corresponding .h file include/ui/KeycodeLabels.h, which contains more than - I want to publish to plugin authors. + corresponding .h file android/keycodes.h. */ enum ANPKeyCodes { kUnknown_ANPKeyCode = 0, @@ -118,7 +117,36 @@ enum ANPKeyCodes { kPlus_ANPKeyCode = 81, kMenu_ANPKeyCode = 82, kNotification_ANPKeyCode = 83, - kSearch_ANPKeyCode = 84 + kSearch_ANPKeyCode = 84, + kMediaPlayPause_ANPKeyCode = 85, + kMediaStop_ANPKeyCode = 86, + kMediaNext_ANPKeyCode = 87, + kMediaPrevious_ANPKeyCode = 88, + kMediaRewind_ANPKeyCode = 89, + kMediaFastForward_ANPKeyCode = 90, + kMute_ANPKeyCode = 91, + kPageUp_ANPKeyCode = 92, + kPageDown_ANPKeyCode = 93, + kPictsymbols_ANPKeyCode = 94, + kSwitchCharset_ANPKeyCode = 95, + kButtonA_ANPKeyCode = 96, + kButtonB_ANPKeyCode = 97, + kButtonC_ANPKeyCode = 98, + kButtonX_ANPKeyCode = 99, + kButtonY_ANPKeyCode = 100, + kButtonZ_ANPKeyCode = 101, + kButtonL1_ANPKeyCode = 102, + kButtonR1_ANPKeyCode = 103, + kButtonL2_ANPKeyCode = 104, + kButtonR2_ANPKeyCode = 105, + kButtonThumbL_ANPKeyCode = 106, + kButtonThumbR_ANPKeyCode = 107, + kButtonStart_ANPKeyCode = 108, + kButtonSelect_ANPKeyCode = 109, + kButtonMode_ANPKeyCode = 110, + + // NOTE: If you add a new keycode here you must also add it to several other files. + // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. }; #endif |