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

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

Issue 2201853002: Blink handle selection handle visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed line length Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.TargetApi; 7 import android.annotation.TargetApi;
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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 hidePastePopup(); 836 hidePastePopup();
837 break; 837 break;
838 838
839 case SelectionEventType.INSERTION_HANDLE_DRAG_STOPPED: 839 case SelectionEventType.INSERTION_HANDLE_DRAG_STOPPED:
840 if (mWasPastePopupShowingOnInsertionDragStart) { 840 if (mWasPastePopupShowingOnInsertionDragStart) {
841 showPastePopup(xAnchor, yAnchor); 841 showPastePopup(xAnchor, yAnchor);
842 } 842 }
843 mWasPastePopupShowingOnInsertionDragStart = false; 843 mWasPastePopupShowingOnInsertionDragStart = false;
844 break; 844 break;
845 845
846 case SelectionEventType.SELECTION_ESTABLISHED:
847 case SelectionEventType.SELECTION_DISSOLVED:
848 break;
849
850 default: 846 default:
851 assert false : "Invalid selection event type."; 847 assert false : "Invalid selection event type.";
852 } 848 }
853 849
854 if (mContextualSearchClient != null) { 850 if (mContextualSearchClient != null) {
855 final float deviceScale = mRenderCoordinates.getDeviceScaleFactor(); 851 final float deviceScale = mRenderCoordinates.getDeviceScaleFactor();
856 int xAnchorPix = (int) (xAnchor * deviceScale); 852 int xAnchorPix = (int) (xAnchor * deviceScale);
857 int yAnchorPix = (int) (yAnchor * deviceScale); 853 int yAnchorPix = (int) (yAnchor * deviceScale);
858 mContextualSearchClient.onSelectionEvent(eventType, xAnchorPix, yAnc horPix); 854 mContextualSearchClient.onSelectionEvent(eventType, xAnchorPix, yAnc horPix);
859 } 855 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 PackageManager.MATCH_DEFAULT_ONLY).size() > 0; 939 PackageManager.MATCH_DEFAULT_ONLY).size() > 0;
944 } 940 }
945 941
946 private boolean isWebSearchAvailable() { 942 private boolean isWebSearchAvailable() {
947 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); 943 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
948 intent.putExtra(SearchManager.EXTRA_NEW_SEARCH, true); 944 intent.putExtra(SearchManager.EXTRA_NEW_SEARCH, true);
949 return mContext.getPackageManager().queryIntentActivities(intent, 945 return mContext.getPackageManager().queryIntentActivities(intent,
950 PackageManager.MATCH_DEFAULT_ONLY).size() > 0; 946 PackageManager.MATCH_DEFAULT_ONLY).size() > 0;
951 } 947 }
952 } 948 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698