Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 499393002: Set the Insertion handle correctly while showing the paste popup menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698