OLD | NEW |
---|---|
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; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.os.Handler; | 8 import android.os.Handler; |
9 import android.os.ResultReceiver; | 9 import android.os.ResultReceiver; |
10 import android.text.Editable; | 10 import android.text.Editable; |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
255 private void hideKeyboard(boolean unzoomIfNeeded) { | 255 private void hideKeyboard(boolean unzoomIfNeeded) { |
256 mIsShowWithoutHideOutstanding = false; | 256 mIsShowWithoutHideOutstanding = false; |
257 View view = mViewEmbedder.getAttachedView(); | 257 View view = mViewEmbedder.getAttachedView(); |
258 if (mInputMethodManagerWrapper.isActive(view)) { | 258 if (mInputMethodManagerWrapper.isActive(view)) { |
259 mInputMethodManagerWrapper.hideSoftInputFromWindow(view.getWindowTok en(), 0, | 259 mInputMethodManagerWrapper.hideSoftInputFromWindow(view.getWindowTok en(), 0, |
260 unzoomIfNeeded ? mViewEmbedder.getNewShowKeyboardReceiver() : null); | 260 unzoomIfNeeded ? mViewEmbedder.getNewShowKeyboardReceiver() : null); |
261 } | 261 } |
262 } | 262 } |
263 | 263 |
264 @CalledByNative | 264 @CalledByNative |
265 void detach() { | 265 void detach(int nativeImeAdapter) { |
266 mNativeImeAdapterAndroid = 0; | 266 if (mNativeImeAdapterAndroid == nativeImeAdapter) { |
aurimas (slooooooooow)
2013/04/11 05:51:56
Can you add a comment above here explaining why th
Shouqun Liu
2013/04/11 06:07:48
Done, a comment added. thanks for reviewing this
| |
267 mTextInputType = 0; | 267 mNativeImeAdapterAndroid = 0; |
268 mTextInputType = 0; | |
269 } | |
268 } | 270 } |
269 | 271 |
270 boolean hasInputType() { | 272 boolean hasInputType() { |
271 return mTextInputType != sTextInputTypeNone; | 273 return mTextInputType != sTextInputTypeNone; |
272 } | 274 } |
273 | 275 |
274 static boolean isTextInputType(int type) { | 276 static boolean isTextInputType(int type) { |
275 return type != sTextInputTypeNone && !InputDialogContainer.isDialogInput Type(type); | 277 return type != sTextInputTypeNone && !InputDialogContainer.isDialogInput Type(type); |
276 } | 278 } |
277 | 279 |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
849 int before, int after); | 851 int before, int after); |
850 | 852 |
851 private native void nativeImeBatchStateChanged(int nativeImeAdapterAndroid, boolean isBegin); | 853 private native void nativeImeBatchStateChanged(int nativeImeAdapterAndroid, boolean isBegin); |
852 | 854 |
853 private native void nativeUnselect(int nativeImeAdapterAndroid); | 855 private native void nativeUnselect(int nativeImeAdapterAndroid); |
854 private native void nativeSelectAll(int nativeImeAdapterAndroid); | 856 private native void nativeSelectAll(int nativeImeAdapterAndroid); |
855 private native void nativeCut(int nativeImeAdapterAndroid); | 857 private native void nativeCut(int nativeImeAdapterAndroid); |
856 private native void nativeCopy(int nativeImeAdapterAndroid); | 858 private native void nativeCopy(int nativeImeAdapterAndroid); |
857 private native void nativePaste(int nativeImeAdapterAndroid); | 859 private native void nativePaste(int nativeImeAdapterAndroid); |
858 } | 860 } |
OLD | NEW |