OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |