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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java

Issue 411383002: Fix composition key-code after switching to a new input field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 package org.chromium.content.browser.input; 5 package org.chromium.content.browser.input;
6 6
7 import android.os.Handler; 7 import android.os.Handler;
8 import android.os.ResultReceiver; 8 import android.os.ResultReceiver;
9 import android.os.SystemClock; 9 import android.os.SystemClock;
10 import android.text.Editable; 10 import android.text.Editable;
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 429
430 nativeSendSyntheticKeyEvent(mNativeImeAdapterAndroid, sEventTypeKeyU p, 430 nativeSendSyntheticKeyEvent(mNativeImeAdapterAndroid, sEventTypeKeyU p,
431 timeStampMs, keyCode, 0); 431 timeStampMs, keyCode, 0);
432 } 432 }
433 433
434 return true; 434 return true;
435 } 435 }
436 436
437 void finishComposingText() { 437 void finishComposingText() {
438 if (mNativeImeAdapterAndroid == 0) return; 438 if (mNativeImeAdapterAndroid == 0) return;
439 mLastComposeText = null;
jdduke (slow) 2014/07/28 14:41:41 Should this go before the native handle check?
bcwhite 2014/07/28 14:45:40 Everything else is always done after... but there
439 nativeFinishComposingText(mNativeImeAdapterAndroid); 440 nativeFinishComposingText(mNativeImeAdapterAndroid);
440 } 441 }
441 442
442 boolean translateAndSendNativeEvents(KeyEvent event) { 443 boolean translateAndSendNativeEvents(KeyEvent event) {
443 if (mNativeImeAdapterAndroid == 0) return false; 444 if (mNativeImeAdapterAndroid == 0) return false;
444 445
445 int action = event.getAction(); 446 int action = event.getAction();
446 if (action != KeyEvent.ACTION_DOWN && 447 if (action != KeyEvent.ACTION_DOWN &&
447 action != KeyEvent.ACTION_UP) { 448 action != KeyEvent.ACTION_UP) {
448 // action == KeyEvent.ACTION_MULTIPLE 449 // action == KeyEvent.ACTION_MULTIPLE
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid , 661 private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid ,
661 int before, int after); 662 int before, int after);
662 663
663 private native void nativeUnselect(long nativeImeAdapterAndroid); 664 private native void nativeUnselect(long nativeImeAdapterAndroid);
664 private native void nativeSelectAll(long nativeImeAdapterAndroid); 665 private native void nativeSelectAll(long nativeImeAdapterAndroid);
665 private native void nativeCut(long nativeImeAdapterAndroid); 666 private native void nativeCut(long nativeImeAdapterAndroid);
666 private native void nativeCopy(long nativeImeAdapterAndroid); 667 private native void nativeCopy(long nativeImeAdapterAndroid);
667 private native void nativePaste(long nativeImeAdapterAndroid); 668 private native void nativePaste(long nativeImeAdapterAndroid);
668 private native void nativeResetImeAdapter(long nativeImeAdapterAndroid); 669 private native void nativeResetImeAdapter(long nativeImeAdapterAndroid);
669 } 670 }
OLDNEW
« no previous file with comments | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698