| 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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 | 1235 |
| 1236 @Override | 1236 @Override |
| 1237 public void showUnhandledTapUIIfNeeded(final int x, final int y) { | 1237 public void showUnhandledTapUIIfNeeded(final int x, final int y) { |
| 1238 mDidBasePageLoadJustStart = false; | 1238 mDidBasePageLoadJustStart = false; |
| 1239 if (!isOverlayVideoMode()) { | 1239 if (!isOverlayVideoMode()) { |
| 1240 mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y); | 1240 mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y); |
| 1241 } | 1241 } |
| 1242 } | 1242 } |
| 1243 | 1243 |
| 1244 @Override | 1244 @Override |
| 1245 public boolean sendsSelectionPopupUpdates() { | 1245 public boolean sendsSelectionPopupUpdates(boolean shouldSuggest) { |
| 1246 return false; | 1246 return false; |
| 1247 } | 1247 } |
| 1248 | 1248 |
| 1249 private boolean isOverlayVideoMode() { | 1249 private boolean isOverlayVideoMode() { |
| 1250 return mActivity.getFullscreenManager() != null | 1250 return mActivity.getFullscreenManager() != null |
| 1251 && mActivity.getFullscreenManager().isOverlayVideoMode(); | 1251 && mActivity.getFullscreenManager().isOverlayVideoMode(); |
| 1252 } | 1252 } |
| 1253 | 1253 |
| 1254 // =========================================================================
=================== | 1254 // =========================================================================
=================== |
| 1255 // Selection | 1255 // Selection |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 private native void nativeStartSearchTermResolutionRequest(long nativeContex
tualSearchManager, | 1451 private native void nativeStartSearchTermResolutionRequest(long nativeContex
tualSearchManager, |
| 1452 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); | 1452 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); |
| 1453 protected native void nativeGatherSurroundingText(long nativeContextualSearc
hManager, | 1453 protected native void nativeGatherSurroundingText(long nativeContextualSearc
hManager, |
| 1454 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); | 1454 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); |
| 1455 private native void nativeEnableContextualSearchJsApiForOverlay( | 1455 private native void nativeEnableContextualSearchJsApiForOverlay( |
| 1456 long nativeContextualSearchManager, WebContents overlayWebContents); | 1456 long nativeContextualSearchManager, WebContents overlayWebContents); |
| 1457 // Don't call these directly, instead call the private methods that cache th
e results. | 1457 // Don't call these directly, instead call the private methods that cache th
e results. |
| 1458 private native String nativeGetTargetLanguage(long nativeContextualSearchMan
ager); | 1458 private native String nativeGetTargetLanguage(long nativeContextualSearchMan
ager); |
| 1459 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa
nager); | 1459 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa
nager); |
| 1460 } | 1460 } |
| OLD | NEW |