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

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

Issue 2537073002: Fix leaks in InputConnectionHandlerThread (Closed)
Patch Set: fix tests 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.os.Build; 8 import android.os.Build;
9 import android.os.Handler; 9 import android.os.Handler;
10 import android.os.Looper; 10 import android.os.Looper;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 public void onWindowFocusChanged(boolean gainFocus) {} 86 public void onWindowFocusChanged(boolean gainFocus) {}
87 87
88 @Override 88 @Override
89 public void onViewFocusChanged(boolean gainFocus) {} 89 public void onViewFocusChanged(boolean gainFocus) {}
90 90
91 @Override 91 @Override
92 public void onViewAttachedToWindow() {} 92 public void onViewAttachedToWindow() {}
93 93
94 @Override 94 @Override
95 public void onViewDetachedFromWindow() {} 95 public void onViewDetachedFromWindow() {}
96
97 @Override
98 public void destroy() {}
96 } 99 }
97 100
98 @VisibleForTesting 101 @VisibleForTesting
99 ReplicaInputConnection(View view, ImeAdapter imeAdapter, Handler handler, Ed itable editable, 102 ReplicaInputConnection(View view, ImeAdapter imeAdapter, Handler handler, Ed itable editable,
100 int inputType, int inputFlags, int inputMode, EditorInfo outAttrs) { 103 int inputType, int inputFlags, int inputMode, EditorInfo outAttrs) {
101 super(view, true); 104 super(view, true);
102 mImeAdapter = imeAdapter; 105 mImeAdapter = imeAdapter;
103 mEditable = editable; 106 mEditable = editable;
104 mHandler = handler; 107 mHandler = handler;
105 108
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 @VisibleForTesting 523 @VisibleForTesting
521 ImeState getImeStateForTesting() { 524 ImeState getImeStateForTesting() {
522 String text = mEditable.toString(); 525 String text = mEditable.toString();
523 int selectionStart = Selection.getSelectionStart(mEditable); 526 int selectionStart = Selection.getSelectionStart(mEditable);
524 int selectionEnd = Selection.getSelectionEnd(mEditable); 527 int selectionEnd = Selection.getSelectionEnd(mEditable);
525 int compositionStart = getComposingSpanStart(mEditable); 528 int compositionStart = getComposingSpanStart(mEditable);
526 int compositionEnd = getComposingSpanEnd(mEditable); 529 int compositionEnd = getComposingSpanEnd(mEditable);
527 return new ImeState(text, selectionStart, selectionEnd, compositionStart , compositionEnd); 530 return new ImeState(text, selectionStart, selectionEnd, compositionStart , compositionEnd);
528 } 531 }
529 } 532 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698