| OLD | NEW |
| 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; | 5 package org.chromium.content.browser; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.app.SearchManager; | 8 import android.app.SearchManager; |
| 9 import android.content.ContentResolver; | 9 import android.content.ContentResolver; |
| 10 import android.content.Context; | 10 import android.content.Context; |
| (...skipping 2541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2552 assert mPid == oldPid || mPid == newPid; | 2552 assert mPid == oldPid || mPid == newPid; |
| 2553 if (mAttachedToWindow && oldPid != newPid) { | 2553 if (mAttachedToWindow && oldPid != newPid) { |
| 2554 ChildProcessLauncher.getBindingManager().unbindAsHighPriority(oldPid
); | 2554 ChildProcessLauncher.getBindingManager().unbindAsHighPriority(oldPid
); |
| 2555 ChildProcessLauncher.getBindingManager().bindAsHighPriority(newPid); | 2555 ChildProcessLauncher.getBindingManager().bindAsHighPriority(newPid); |
| 2556 } | 2556 } |
| 2557 | 2557 |
| 2558 // We want to remove the initial binding even if the ContentView is not
attached, so that | 2558 // We want to remove the initial binding even if the ContentView is not
attached, so that |
| 2559 // renderers for ContentViews loading in background do not retain the hi
gh priority. | 2559 // renderers for ContentViews loading in background do not retain the hi
gh priority. |
| 2560 ChildProcessLauncher.getBindingManager().removeInitialBinding(newPid); | 2560 ChildProcessLauncher.getBindingManager().removeInitialBinding(newPid); |
| 2561 mPid = newPid; | 2561 mPid = newPid; |
| 2562 |
| 2563 attachImeAdapter(); |
| 2562 } | 2564 } |
| 2563 | 2565 |
| 2564 @SuppressWarnings("unused") | 2566 @SuppressWarnings("unused") |
| 2565 @CalledByNative | 2567 @CalledByNative |
| 2566 private void onWebContentsConnected() { | 2568 private void onWebContentsConnected() { |
| 2567 attachImeAdapter(); | 2569 attachImeAdapter(); |
| 2568 } | 2570 } |
| 2569 | 2571 |
| 2570 @SuppressWarnings("unused") | |
| 2571 @CalledByNative | |
| 2572 private void onWebContentsSwapped() { | |
| 2573 attachImeAdapter(); | |
| 2574 } | |
| 2575 | |
| 2576 /** | 2572 /** |
| 2577 * Attaches the native ImeAdapter object to the java ImeAdapter to allow com
munication via JNI. | 2573 * Attaches the native ImeAdapter object to the java ImeAdapter to allow com
munication via JNI. |
| 2578 */ | 2574 */ |
| 2579 public void attachImeAdapter() { | 2575 public void attachImeAdapter() { |
| 2580 if (mImeAdapter != null && mNativeContentViewCore != 0) { | 2576 if (mImeAdapter != null && mNativeContentViewCore != 0) { |
| 2581 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore)
); | 2577 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore)
); |
| 2582 } | 2578 } |
| 2583 } | 2579 } |
| 2584 | 2580 |
| 2585 /** | 2581 /** |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3273 | 3269 |
| 3274 private native void nativeAttachExternalVideoSurface( | 3270 private native void nativeAttachExternalVideoSurface( |
| 3275 int nativeContentViewCoreImpl, int playerId, Surface surface); | 3271 int nativeContentViewCoreImpl, int playerId, Surface surface); |
| 3276 | 3272 |
| 3277 private native void nativeDetachExternalVideoSurface( | 3273 private native void nativeDetachExternalVideoSurface( |
| 3278 int nativeContentViewCoreImpl, int playerId); | 3274 int nativeContentViewCoreImpl, int playerId); |
| 3279 | 3275 |
| 3280 private native void nativeSetAccessibilityEnabled( | 3276 private native void nativeSetAccessibilityEnabled( |
| 3281 int nativeContentViewCoreImpl, boolean enabled); | 3277 int nativeContentViewCoreImpl, boolean enabled); |
| 3282 } | 3278 } |
| OLD | NEW |