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 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2426 new PastePopupMenuDelegate() { | 2426 new PastePopupMenuDelegate() { |
2427 public void paste() { | 2427 public void paste() { |
2428 mImeAdapter.paste(); | 2428 mImeAdapter.paste(); |
2429 hideTextHandles(); | 2429 hideTextHandles(); |
2430 } | 2430 } |
2431 }); | 2431 }); |
2432 } | 2432 } |
2433 return mPastePopupMenu; | 2433 return mPastePopupMenu; |
2434 } | 2434 } |
2435 | 2435 |
| 2436 @VisibleForTesting |
| 2437 public PastePopupMenu getPastePopupForTest() { |
| 2438 return getPastePopup(); |
| 2439 } |
| 2440 |
2436 private boolean canPaste() { | 2441 private boolean canPaste() { |
2437 if (!mFocusedNodeEditable) return false; | 2442 if (!mFocusedNodeEditable) return false; |
2438 return ((ClipboardManager) mContext.getSystemService( | 2443 return ((ClipboardManager) mContext.getSystemService( |
2439 Context.CLIPBOARD_SERVICE)).hasPrimaryClip(); | 2444 Context.CLIPBOARD_SERVICE)).hasPrimaryClip(); |
2440 } | 2445 } |
2441 | 2446 |
2442 @SuppressWarnings("unused") | 2447 @SuppressWarnings("unused") |
2443 @CalledByNative | 2448 @CalledByNative |
2444 private void onRenderProcessChange() { | 2449 private void onRenderProcessChange() { |
2445 attachImeAdapter(); | 2450 attachImeAdapter(); |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3222 private native void nativeWasResized(long nativeContentViewCoreImpl); | 3227 private native void nativeWasResized(long nativeContentViewCoreImpl); |
3223 | 3228 |
3224 private native void nativeSetAccessibilityEnabled( | 3229 private native void nativeSetAccessibilityEnabled( |
3225 long nativeContentViewCoreImpl, boolean enabled); | 3230 long nativeContentViewCoreImpl, boolean enabled); |
3226 | 3231 |
3227 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3232 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
3228 int x, int y, int w, int h); | 3233 int x, int y, int w, int h); |
3229 | 3234 |
3230 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3235 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
3231 } | 3236 } |
OLD | NEW |