| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| index 40182a1e09a563022f220e2973991205bd835bb7..c583d9926ff7e014cb0b6ded0b59473bded89ece 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| @@ -2349,6 +2349,32 @@ public class ContentViewCore
|
| mSelectionPopupController.setSelectionClient(selectionClient);
|
| }
|
|
|
| + // TODO(timav): Use |TextClassifier| instead of |Object| after we switch to Android SDK 26.
|
| + /**
|
| + * Sets TextClassifier for Smart Text selection.
|
| + */
|
| + public void setTextClassifier(Object textClassifier) {
|
| + mSelectionPopupController.setTextClassifier(textClassifier);
|
| + }
|
| +
|
| + // TODO(timav): Use |TextClassifier| instead of |Object| after we switch to Android SDK 26.
|
| + /**
|
| + * Returns TextClassifier that is used for Smart Text selection. If the custom classifier
|
| + * has been set with setTextClassifier, returns that object, otherwise returns the system
|
| + * classifier.
|
| + */
|
| + public Object getTextClassifier() {
|
| + return mSelectionPopupController.getTextClassifier();
|
| + }
|
| +
|
| + // TODO(timav): Use |TextClassifier| instead of |Object| after we switch to Android SDK 26.
|
| + /**
|
| + * Returns the TextClassifier which has been set with setTextClassifier(), or null.
|
| + */
|
| + public Object getCustomTextClassifier() {
|
| + return mSelectionPopupController.getCustomTextClassifier();
|
| + }
|
| +
|
| private native long nativeInit(WebContents webContents, ViewAndroidDelegate viewAndroidDelegate,
|
| long windowAndroidPtr, float dipScale, HashSet<Object> retainedObjectSet);
|
| private static native ContentViewCore nativeFromWebContentsAndroid(WebContents webContents);
|
|
|