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

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: Removed few move unwanted line breaks Created 6 years, 3 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 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698