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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java

Issue 2740103006: Implement SmartText selection. (Closed)
Patch Set: Made ~ContextSelectionClient() public and inlined SelectionPopupControler.unhideActionMode() Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.chrome.browser.contextualsearch; 5 package org.chromium.chrome.browser.contextualsearch;
6 6
7 import android.text.TextUtils; 7 import android.text.TextUtils;
8 import android.view.View; 8 import android.view.View;
9 import android.view.ViewGroup; 9 import android.view.ViewGroup;
10 import android.view.ViewTreeObserver; 10 import android.view.ViewTreeObserver;
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 } 1237 }
1238 1238
1239 @Override 1239 @Override
1240 public void showUnhandledTapUIIfNeeded(final int x, final int y) { 1240 public void showUnhandledTapUIIfNeeded(final int x, final int y) {
1241 mDidBasePageLoadJustStart = false; 1241 mDidBasePageLoadJustStart = false;
1242 if (!isOverlayVideoMode()) { 1242 if (!isOverlayVideoMode()) {
1243 mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y); 1243 mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y);
1244 } 1244 }
1245 } 1245 }
1246 1246
1247 @Override
1248 public boolean sendsSelectionPopupUpdates() {
1249 return false;
1250 }
1251
1247 private boolean isOverlayVideoMode() { 1252 private boolean isOverlayVideoMode() {
1248 return mActivity.getFullscreenManager() != null 1253 return mActivity.getFullscreenManager() != null
1249 && mActivity.getFullscreenManager().isOverlayVideoMode(); 1254 && mActivity.getFullscreenManager().isOverlayVideoMode();
1250 } 1255 }
1251 1256
1252 // ========================================================================= =================== 1257 // ========================================================================= ===================
1253 // Selection 1258 // Selection
1254 // ========================================================================= =================== 1259 // ========================================================================= ===================
1255 1260
1256 /** 1261 /**
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 private native void nativeStartSearchTermResolutionRequest(long nativeContex tualSearchManager, 1454 private native void nativeStartSearchTermResolutionRequest(long nativeContex tualSearchManager,
1450 ContextualSearchContext contextualSearchContext, WebContents baseWeb Contents); 1455 ContextualSearchContext contextualSearchContext, WebContents baseWeb Contents);
1451 protected native void nativeGatherSurroundingText(long nativeContextualSearc hManager, 1456 protected native void nativeGatherSurroundingText(long nativeContextualSearc hManager,
1452 ContextualSearchContext contextualSearchContext, WebContents baseWeb Contents); 1457 ContextualSearchContext contextualSearchContext, WebContents baseWeb Contents);
1453 private native void nativeEnableContextualSearchJsApiForOverlay( 1458 private native void nativeEnableContextualSearchJsApiForOverlay(
1454 long nativeContextualSearchManager, WebContents overlayWebContents); 1459 long nativeContextualSearchManager, WebContents overlayWebContents);
1455 // Don't call these directly, instead call the private methods that cache th e results. 1460 // Don't call these directly, instead call the private methods that cache th e results.
1456 private native String nativeGetTargetLanguage(long nativeContextualSearchMan ager); 1461 private native String nativeGetTargetLanguage(long nativeContextualSearchMan ager);
1457 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa nager); 1462 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa nager);
1458 } 1463 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698