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

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

Issue 14129003: Fix the incorrect native ImeAdapter attach and detach. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix nits Created 7 years, 8 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
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; 5 package org.chromium.content.browser;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.pm.ActivityInfo; 9 import android.content.pm.ActivityInfo;
10 import android.content.pm.PackageManager; 10 import android.content.pm.PackageManager;
(...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after
2207 2207
2208 @SuppressWarnings("unused") 2208 @SuppressWarnings("unused")
2209 @CalledByNative 2209 @CalledByNative
2210 private void onWebContentsConnected() { 2210 private void onWebContentsConnected() {
2211 if (mImeAdapter != null && 2211 if (mImeAdapter != null &&
2212 !mImeAdapter.isNativeImeAdapterAttached() && mNativeContentViewC ore != 0) { 2212 !mImeAdapter.isNativeImeAdapterAttached() && mNativeContentViewC ore != 0) {
2213 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore) ); 2213 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore) );
2214 } 2214 }
2215 } 2215 }
2216 2216
2217 @SuppressWarnings("unused")
2218 @CalledByNative
2219 private void onWebContentsSwapped() {
2220 if (mImeAdapter != null && mNativeContentViewCore != 0) {
2221 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore) );
2222 }
2223 }
2224
2217 /** 2225 /**
2218 * @return Whether a reload happens when this ContentView is activated. 2226 * @return Whether a reload happens when this ContentView is activated.
2219 */ 2227 */
2220 public boolean needsReload() { 2228 public boolean needsReload() {
2221 return mNativeContentViewCore != 0 && nativeNeedsReload(mNativeContentVi ewCore); 2229 return mNativeContentViewCore != 0 && nativeNeedsReload(mNativeContentVi ewCore);
2222 } 2230 }
2223 2231
2224 /** 2232 /**
2225 * @see View#hasFocus() 2233 * @see View#hasFocus()
2226 */ 2234 */
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2805 boolean enableHiding, boolean enableShowing, boolean animate); 2813 boolean enableHiding, boolean enableShowing, boolean animate);
2806 2814
2807 private native void nativeShowImeIfNeeded(int nativeContentViewCoreImpl); 2815 private native void nativeShowImeIfNeeded(int nativeContentViewCoreImpl);
2808 2816
2809 private native void nativeAttachExternalVideoSurface( 2817 private native void nativeAttachExternalVideoSurface(
2810 int nativeContentViewCoreImpl, int playerId, Surface surface); 2818 int nativeContentViewCoreImpl, int playerId, Surface surface);
2811 2819
2812 private native void nativeDetachExternalVideoSurface( 2820 private native void nativeDetachExternalVideoSurface(
2813 int nativeContentViewCoreImpl, int playerId); 2821 int nativeContentViewCoreImpl, int playerId);
2814 } 2822 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698