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

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

Issue 26491010: [Android] Don't hide text handles if they are being dragged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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.input; 5 package org.chromium.content.browser.input;
6 6
7 import android.content.ClipboardManager; 7 import android.content.ClipboardManager;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.res.TypedArray; 9 import android.content.res.TypedArray;
10 import android.graphics.drawable.Drawable; 10 import android.graphics.drawable.Drawable;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 if (mIsShowing) { 71 if (mIsShowing) {
72 mHandle.showPastePopupWindow(); 72 mHandle.showPastePopupWindow();
73 } 73 }
74 } 74 }
75 75
76 public void showHandleWithPastePopup() { 76 public void showHandleWithPastePopup() {
77 showHandle(); 77 showHandle();
78 showPastePopup(); 78 showPastePopup();
79 } 79 }
80 80
81 /**
82 * @return whether the handle is being dragged.
83 */
84 public boolean isDragging() {
85 return mHandle != null && mHandle.isDragging();
86 }
87
81 /** Shows the handle at the given coordinates, as long as automatic showing is allowed */ 88 /** Shows the handle at the given coordinates, as long as automatic showing is allowed */
82 public void onCursorPositionChanged() { 89 public void onCursorPositionChanged() {
83 if (mAllowAutomaticShowing) { 90 if (mAllowAutomaticShowing) {
84 showHandle(); 91 showHandle();
85 } 92 }
86 } 93 }
87 94
88 /** 95 /**
89 * Moves the handle so that it points at the given coordinates. 96 * Moves the handle so that it points at the given coordinates.
90 * @param x Handle x in physical pixels. 97 * @param x Handle x in physical pixels.
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } else { 323 } else {
317 // Horizontal clipping 324 // Horizontal clipping
318 coords[0] = Math.max(0, coords[0]); 325 coords[0] = Math.max(0, coords[0]);
319 coords[0] = Math.min(screenWidth - width, coords[0]); 326 coords[0] = Math.min(screenWidth - width, coords[0]);
320 } 327 }
321 328
322 mContainer.showAtLocation(mParent, Gravity.NO_GRAVITY, coords[0], co ords[1]); 329 mContainer.showAtLocation(mParent, Gravity.NO_GRAVITY, coords[0], co ords[1]);
323 } 330 }
324 } 331 }
325 } 332 }
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698