Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |