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 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2415 new PastePopupMenuDelegate() { | 2415 new PastePopupMenuDelegate() { |
2416 public void paste() { | 2416 public void paste() { |
2417 mImeAdapter.paste(); | 2417 mImeAdapter.paste(); |
2418 hideTextHandles(); | 2418 hideTextHandles(); |
2419 } | 2419 } |
2420 }); | 2420 }); |
2421 } | 2421 } |
2422 return mPastePopupMenu; | 2422 return mPastePopupMenu; |
2423 } | 2423 } |
2424 | 2424 |
| 2425 @VisibleForTesting |
| 2426 public PastePopupMenu getPastePopupForTest() { |
| 2427 return getPastePopup(); |
| 2428 } |
| 2429 |
2425 private boolean canPaste() { | 2430 private boolean canPaste() { |
2426 if (!mFocusedNodeEditable) return false; | 2431 if (!mFocusedNodeEditable) return false; |
2427 return ((ClipboardManager) mContext.getSystemService( | 2432 return ((ClipboardManager) mContext.getSystemService( |
2428 Context.CLIPBOARD_SERVICE)).hasPrimaryClip(); | 2433 Context.CLIPBOARD_SERVICE)).hasPrimaryClip(); |
2429 } | 2434 } |
2430 | 2435 |
2431 @SuppressWarnings("unused") | 2436 @SuppressWarnings("unused") |
2432 @CalledByNative | 2437 @CalledByNative |
2433 private void onRenderProcessChange() { | 2438 private void onRenderProcessChange() { |
2434 attachImeAdapter(); | 2439 attachImeAdapter(); |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3193 private native void nativeWasResized(long nativeContentViewCoreImpl); | 3198 private native void nativeWasResized(long nativeContentViewCoreImpl); |
3194 | 3199 |
3195 private native void nativeSetAccessibilityEnabled( | 3200 private native void nativeSetAccessibilityEnabled( |
3196 long nativeContentViewCoreImpl, boolean enabled); | 3201 long nativeContentViewCoreImpl, boolean enabled); |
3197 | 3202 |
3198 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3203 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
3199 int x, int y, int w, int h); | 3204 int x, int y, int w, int h); |
3200 | 3205 |
3201 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3206 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
3202 } | 3207 } |
OLD | NEW |