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 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 } | 1238 } |
1239 | 1239 |
1240 @Override | 1240 @Override |
1241 public void showUnhandledTapUIIfNeeded(final int x, final int y) { | 1241 public void showUnhandledTapUIIfNeeded(final int x, final int y) { |
1242 mDidBasePageLoadJustStart = false; | 1242 mDidBasePageLoadJustStart = false; |
1243 if (!isOverlayVideoMode()) { | 1243 if (!isOverlayVideoMode()) { |
1244 mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y); | 1244 mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y); |
1245 } | 1245 } |
1246 } | 1246 } |
1247 | 1247 |
| 1248 @Override |
| 1249 public void selectWordAroundCaretAck(boolean didSelect, int startAdjust, int
endAdjust) { |
| 1250 if (!isOverlayVideoMode()) { |
| 1251 mSelectionController.selectWordAroundCaretAck(didSelect, startAdjust
, endAdjust); |
| 1252 } |
| 1253 } |
| 1254 |
1248 private boolean isOverlayVideoMode() { | 1255 private boolean isOverlayVideoMode() { |
1249 return mActivity.getFullscreenManager() != null | 1256 return mActivity.getFullscreenManager() != null |
1250 && mActivity.getFullscreenManager().isOverlayVideoMode(); | 1257 && mActivity.getFullscreenManager().isOverlayVideoMode(); |
1251 } | 1258 } |
1252 | 1259 |
1253 // =========================================================================
=================== | 1260 // =========================================================================
=================== |
1254 // Selection | 1261 // Selection |
1255 // =========================================================================
=================== | 1262 // =========================================================================
=================== |
1256 | 1263 |
1257 /** | 1264 /** |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 boolean maySendBasePageUrl); | 1452 boolean maySendBasePageUrl); |
1446 protected native void nativeGatherSurroundingText(long nativeContextualSearc
hManager, | 1453 protected native void nativeGatherSurroundingText(long nativeContextualSearc
hManager, |
1447 String selection, String homeCountry, WebContents baseWebContents, | 1454 String selection, String homeCountry, WebContents baseWebContents, |
1448 boolean maySendBasePageUrl); | 1455 boolean maySendBasePageUrl); |
1449 private native void nativeEnableContextualSearchJsApiForOverlay( | 1456 private native void nativeEnableContextualSearchJsApiForOverlay( |
1450 long nativeContextualSearchManager, WebContents overlayWebContents); | 1457 long nativeContextualSearchManager, WebContents overlayWebContents); |
1451 // Don't call these directly, instead call the private methods that cache th
e results. | 1458 // Don't call these directly, instead call the private methods that cache th
e results. |
1452 private native String nativeGetTargetLanguage(long nativeContextualSearchMan
ager); | 1459 private native String nativeGetTargetLanguage(long nativeContextualSearchMan
ager); |
1453 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa
nager); | 1460 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa
nager); |
1454 } | 1461 } |
OLD | NEW |