| 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.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 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2210 | 2210 |
| 2211 @SuppressWarnings("unused") | 2211 @SuppressWarnings("unused") |
| 2212 @CalledByNative | 2212 @CalledByNative |
| 2213 private void onWebContentsConnected() { | 2213 private void onWebContentsConnected() { |
| 2214 if (mImeAdapter != null && | 2214 if (mImeAdapter != null && |
| 2215 !mImeAdapter.isNativeImeAdapterAttached() && mNativeContentViewC
ore != 0) { | 2215 !mImeAdapter.isNativeImeAdapterAttached() && mNativeContentViewC
ore != 0) { |
| 2216 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore)
); | 2216 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore)
); |
| 2217 } | 2217 } |
| 2218 } | 2218 } |
| 2219 | 2219 |
| 2220 @SuppressWarnings("unused") |
| 2221 @CalledByNative |
| 2222 private void onWebContentsSwapped() { |
| 2223 if (mImeAdapter != null && mNativeContentViewCore != 0) { |
| 2224 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore)
); |
| 2225 } |
| 2226 } |
| 2227 |
| 2220 /** | 2228 /** |
| 2221 * @return Whether a reload happens when this ContentView is activated. | 2229 * @return Whether a reload happens when this ContentView is activated. |
| 2222 */ | 2230 */ |
| 2223 public boolean needsReload() { | 2231 public boolean needsReload() { |
| 2224 return mNativeContentViewCore != 0 && nativeNeedsReload(mNativeContentVi
ewCore); | 2232 return mNativeContentViewCore != 0 && nativeNeedsReload(mNativeContentVi
ewCore); |
| 2225 } | 2233 } |
| 2226 | 2234 |
| 2227 /** | 2235 /** |
| 2228 * @see View#hasFocus() | 2236 * @see View#hasFocus() |
| 2229 */ | 2237 */ |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2808 boolean enableHiding, boolean enableShowing, boolean animate); | 2816 boolean enableHiding, boolean enableShowing, boolean animate); |
| 2809 | 2817 |
| 2810 private native void nativeShowImeIfNeeded(int nativeContentViewCoreImpl); | 2818 private native void nativeShowImeIfNeeded(int nativeContentViewCoreImpl); |
| 2811 | 2819 |
| 2812 private native void nativeAttachExternalVideoSurface( | 2820 private native void nativeAttachExternalVideoSurface( |
| 2813 int nativeContentViewCoreImpl, int playerId, Surface surface); | 2821 int nativeContentViewCoreImpl, int playerId, Surface surface); |
| 2814 | 2822 |
| 2815 private native void nativeDetachExternalVideoSurface( | 2823 private native void nativeDetachExternalVideoSurface( |
| 2816 int nativeContentViewCoreImpl, int playerId); | 2824 int nativeContentViewCoreImpl, int playerId); |
| 2817 } | 2825 } |
| OLD | NEW |