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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.os.Handler; | 8 import android.os.Handler; |
9 import android.text.TextUtils; | 9 import android.text.TextUtils; |
10 import android.view.View; | 10 import android.view.View; |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 } | 1202 } |
1203 | 1203 |
1204 @Override | 1204 @Override |
1205 public void showUnhandledTapUIIfNeeded(final int x, final int y) { | 1205 public void showUnhandledTapUIIfNeeded(final int x, final int y) { |
1206 if (!isOverlayVideoMode()) { | 1206 if (!isOverlayVideoMode()) { |
1207 mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y); | 1207 mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y); |
1208 } | 1208 } |
1209 } | 1209 } |
1210 | 1210 |
1211 @Override | 1211 @Override |
1212 public boolean sendsSelectionPopupUpdates() { | 1212 public boolean requestSelectionPopupUpdates(boolean shouldSuggest) { |
1213 return false; | 1213 return false; |
1214 } | 1214 } |
1215 | 1215 |
| 1216 @Override |
| 1217 public void cancelAllRequests() {} |
| 1218 |
1216 // TODO(donnd): add handling of an ACK to selectWordAroundCaret (crbug.com/4
35778 has details). | 1219 // TODO(donnd): add handling of an ACK to selectWordAroundCaret (crbug.com/4
35778 has details). |
1217 | 1220 |
1218 /** | 1221 /** |
1219 * @return Whether the display is in a full-screen video overlay mode. | 1222 * @return Whether the display is in a full-screen video overlay mode. |
1220 */ | 1223 */ |
1221 private boolean isOverlayVideoMode() { | 1224 private boolean isOverlayVideoMode() { |
1222 return mActivity.getFullscreenManager() != null | 1225 return mActivity.getFullscreenManager() != null |
1223 && mActivity.getFullscreenManager().isOverlayVideoMode(); | 1226 && mActivity.getFullscreenManager().isOverlayVideoMode(); |
1224 } | 1227 } |
1225 | 1228 |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 private native void nativeStartSearchTermResolutionRequest(long nativeContex
tualSearchManager, | 1579 private native void nativeStartSearchTermResolutionRequest(long nativeContex
tualSearchManager, |
1577 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); | 1580 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); |
1578 protected native void nativeGatherSurroundingText(long nativeContextualSearc
hManager, | 1581 protected native void nativeGatherSurroundingText(long nativeContextualSearc
hManager, |
1579 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); | 1582 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); |
1580 private native void nativeEnableContextualSearchJsApiForOverlay( | 1583 private native void nativeEnableContextualSearchJsApiForOverlay( |
1581 long nativeContextualSearchManager, WebContents overlayWebContents); | 1584 long nativeContextualSearchManager, WebContents overlayWebContents); |
1582 // Don't call these directly, instead call the private methods that cache th
e results. | 1585 // Don't call these directly, instead call the private methods that cache th
e results. |
1583 private native String nativeGetTargetLanguage(long nativeContextualSearchMan
ager); | 1586 private native String nativeGetTargetLanguage(long nativeContextualSearchMan
ager); |
1584 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa
nager); | 1587 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa
nager); |
1585 } | 1588 } |
OLD | NEW |