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

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

Issue 2546613002: Revert of Fix leaks in InputConnectionHandlerThread (Closed)
Patch Set: Created 4 years 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
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.content.res.Configuration; 7 import android.content.res.Configuration;
8 import android.os.Build; 8 import android.os.Build;
9 import android.os.ResultReceiver; 9 import android.os.ResultReceiver;
10 import android.os.SystemClock; 10 import android.os.SystemClock;
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 public void resetAndHideKeyboard() { 501 public void resetAndHideKeyboard() {
502 if (DEBUG_LOGS) Log.w(TAG, "resetAndHideKeyboard"); 502 if (DEBUG_LOGS) Log.w(TAG, "resetAndHideKeyboard");
503 mTextInputType = TextInputType.NONE; 503 mTextInputType = TextInputType.NONE;
504 mTextInputFlags = 0; 504 mTextInputFlags = 0;
505 mTextInputMode = WebTextInputMode.kDefault; 505 mTextInputMode = WebTextInputMode.kDefault;
506 // This will trigger unblocking if necessary. 506 // This will trigger unblocking if necessary.
507 hideKeyboard(); 507 hideKeyboard();
508 } 508 }
509 509
510 /** 510 /**
511 * Call this when ImeAdapter gets destroyed.
512 */
513 public void destroy() {
514 if (DEBUG_LOGS) Log.w(TAG, "destroy");
515 resetAndHideKeyboard();
516 if (mInputConnectionFactory != null) {
517 mInputConnectionFactory.destroy();
518 }
519 }
520
521 /**
522 * Update selection to input method manager. 511 * Update selection to input method manager.
523 * 512 *
524 * @param selectionStart The selection start. 513 * @param selectionStart The selection start.
525 * @param selectionEnd The selection end. 514 * @param selectionEnd The selection end.
526 * @param compositionStart The composition start. 515 * @param compositionStart The composition start.
527 * @param compositionEnd The composition end. 516 * @param compositionEnd The composition end.
528 */ 517 */
529 void updateSelection( 518 void updateSelection(
530 int selectionStart, int selectionEnd, int compositionStart, int comp ositionEnd) { 519 int selectionStart, int selectionEnd, int compositionStart, int comp ositionEnd) {
531 mInputMethodManagerWrapper.updateSelection(mViewEmbedder.getAttachedView (), 520 mInputMethodManagerWrapper.updateSelection(mViewEmbedder.getAttachedView (),
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 int start, int end); 796 int start, int end);
808 private native void nativeSetComposingRegion(long nativeImeAdapterAndroid, i nt start, int end); 797 private native void nativeSetComposingRegion(long nativeImeAdapterAndroid, i nt start, int end);
809 private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid , 798 private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid ,
810 int before, int after); 799 int before, int after);
811 private native void nativeResetImeAdapter(long nativeImeAdapterAndroid); 800 private native void nativeResetImeAdapter(long nativeImeAdapterAndroid);
812 private native boolean nativeRequestTextInputStateUpdate(long nativeImeAdapt erAndroid); 801 private native boolean nativeRequestTextInputStateUpdate(long nativeImeAdapt erAndroid);
813 private native void nativeRequestCursorUpdate(long nativeImeAdapterAndroid, 802 private native void nativeRequestCursorUpdate(long nativeImeAdapterAndroid,
814 boolean immediateRequest, boolean monitorRequest); 803 boolean immediateRequest, boolean monitorRequest);
815 private native boolean nativeIsImeThreadEnabled(long nativeImeAdapterAndroid ); 804 private native boolean nativeIsImeThreadEnabled(long nativeImeAdapterAndroid );
816 } 805 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698