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

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

Issue 22882002: finishComposingText (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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.view.KeyCharacterMap; 9 import android.view.KeyCharacterMap;
10 import android.view.KeyEvent; 10 import android.view.KeyEvent;
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 nativeSetComposingText(mNativeImeAdapterAndroid, text, newCursor Position); 355 nativeSetComposingText(mNativeImeAdapterAndroid, text, newCursor Position);
356 } 356 }
357 nativeSendSyntheticKeyEvent(mNativeImeAdapterAndroid, sEventTypeKeyU p, 357 nativeSendSyntheticKeyEvent(mNativeImeAdapterAndroid, sEventTypeKeyU p,
358 timeStampMs, keyCode, 0); 358 timeStampMs, keyCode, 0);
359 } 359 }
360 360
361 return true; 361 return true;
362 } 362 }
363 363
364 void finishComposingText() { 364 void finishComposingText() {
365 if (mNativeImeAdapterAndroid == 0) return;
365 nativeFinishComposingText(mNativeImeAdapterAndroid); 366 nativeFinishComposingText(mNativeImeAdapterAndroid);
366 } 367 }
367 368
368 boolean translateAndSendNativeEvents(KeyEvent event) { 369 boolean translateAndSendNativeEvents(KeyEvent event) {
369 if (mNativeImeAdapterAndroid == 0) return false; 370 if (mNativeImeAdapterAndroid == 0) return false;
370 371
371 int action = event.getAction(); 372 int action = event.getAction();
372 if (action != KeyEvent.ACTION_DOWN && 373 if (action != KeyEvent.ACTION_DOWN &&
373 action != KeyEvent.ACTION_UP) { 374 action != KeyEvent.ACTION_UP) {
374 // action == KeyEvent.ACTION_MULTIPLE 375 // action == KeyEvent.ACTION_MULTIPLE
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 561
561 private native void nativeImeBatchStateChanged(int nativeImeAdapterAndroid, boolean isBegin); 562 private native void nativeImeBatchStateChanged(int nativeImeAdapterAndroid, boolean isBegin);
562 563
563 private native void nativeUnselect(int nativeImeAdapterAndroid); 564 private native void nativeUnselect(int nativeImeAdapterAndroid);
564 private native void nativeSelectAll(int nativeImeAdapterAndroid); 565 private native void nativeSelectAll(int nativeImeAdapterAndroid);
565 private native void nativeCut(int nativeImeAdapterAndroid); 566 private native void nativeCut(int nativeImeAdapterAndroid);
566 private native void nativeCopy(int nativeImeAdapterAndroid); 567 private native void nativeCopy(int nativeImeAdapterAndroid);
567 private native void nativePaste(int nativeImeAdapterAndroid); 568 private native void nativePaste(int nativeImeAdapterAndroid);
568 private native void nativeResetImeAdapter(int nativeImeAdapterAndroid); 569 private native void nativeResetImeAdapter(int nativeImeAdapterAndroid);
569 } 570 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698