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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.app.SearchManager; | 9 import android.app.SearchManager; |
10 import android.content.ClipboardManager; | 10 import android.content.ClipboardManager; |
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2357 public void attachImeAdapter() { | 2357 public void attachImeAdapter() { |
2358 if (mImeAdapter != null && mNativeContentViewCore != 0) { | 2358 if (mImeAdapter != null && mNativeContentViewCore != 0) { |
2359 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore)
); | 2359 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore)
); |
2360 } | 2360 } |
2361 } | 2361 } |
2362 | 2362 |
2363 /** | 2363 /** |
2364 * @see View#hasFocus() | 2364 * @see View#hasFocus() |
2365 */ | 2365 */ |
2366 @CalledByNative | 2366 @CalledByNative |
2367 public boolean hasFocus() { | 2367 private boolean hasFocus() { |
| 2368 // If the container view is not focusable, we consider it always focused
from |
| 2369 // Chromium's point of view. |
| 2370 if (!mContainerView.isFocusable()) return true; |
2368 return mContainerView.hasFocus(); | 2371 return mContainerView.hasFocus(); |
2369 } | 2372 } |
2370 | 2373 |
2371 /** | 2374 /** |
2372 * Checks whether the ContentViewCore can be zoomed in. | 2375 * Checks whether the ContentViewCore can be zoomed in. |
2373 * | 2376 * |
2374 * @return True if the ContentViewCore can be zoomed in. | 2377 * @return True if the ContentViewCore can be zoomed in. |
2375 */ | 2378 */ |
2376 // This method uses the term 'zoom' for legacy reasons, but relates | 2379 // This method uses the term 'zoom' for legacy reasons, but relates |
2377 // to what chrome calls the 'page scale factor'. | 2380 // to what chrome calls the 'page scale factor'. |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3028 private native void nativeWasResized(long nativeContentViewCoreImpl); | 3031 private native void nativeWasResized(long nativeContentViewCoreImpl); |
3029 | 3032 |
3030 private native void nativeSetAccessibilityEnabled( | 3033 private native void nativeSetAccessibilityEnabled( |
3031 long nativeContentViewCoreImpl, boolean enabled); | 3034 long nativeContentViewCoreImpl, boolean enabled); |
3032 | 3035 |
3033 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3036 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
3034 int x, int y, int w, int h); | 3037 int x, int y, int w, int h); |
3035 | 3038 |
3036 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3039 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
3037 } | 3040 } |
OLD | NEW |