Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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.content.browser; | 5 package org.chromium.content.browser; |
| 6 | 6 |
| 7 import android.content.Intent; | 7 import android.content.Intent; |
| 8 import android.graphics.drawable.Drawable; | 8 import android.graphics.drawable.Drawable; |
| 9 import android.os.LocaleList; | |
|
Ted C
2017/04/13 17:17:10
LocaleList is api 24...are any of the apis below c
Tima Vaisburd
2017/04/13 18:11:32
The implementation only calls to TextClassifier AP
| |
| 9 import android.view.View.OnClickListener; | 10 import android.view.View.OnClickListener; |
| 10 | 11 |
| 11 import org.chromium.base.annotations.SuppressFBWarnings; | 12 import org.chromium.base.annotations.SuppressFBWarnings; |
| 12 | 13 |
| 13 /** | 14 /** |
| 14 * The interface that controls contextual text selection. | 15 * The interface that controls contextual text selection. |
| 15 */ | 16 */ |
| 16 @SuppressFBWarnings("UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD") | 17 @SuppressFBWarnings("UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD") |
| 17 public interface ContextSelectionProvider { | 18 public interface ContextSelectionProvider { |
| 18 /** | 19 /** |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 } | 72 } |
| 72 | 73 |
| 73 /** | 74 /** |
| 74 * Sends asynchronous request to obtain the selection, analyze its type and suggest | 75 * Sends asynchronous request to obtain the selection, analyze its type and suggest |
| 75 * better selection boundaries. | 76 * better selection boundaries. |
| 76 * @param text The textual context that encloses the selected text. | 77 * @param text The textual context that encloses the selected text. |
| 77 * @param start The start index of the selected text inside the textual cont ext. | 78 * @param start The start index of the selected text inside the textual cont ext. |
| 78 * @param end The index pointing to the first character that comes after | 79 * @param end The index pointing to the first character that comes after |
| 79 * the selected text inside the textual context. | 80 * the selected text inside the textual context. |
| 80 */ | 81 */ |
| 81 public void sendSuggestAndClassifyRequest(CharSequence text, int start, int end); | 82 public void sendSuggestAndClassifyRequest( |
| 83 CharSequence text, int start, int end, LocaleList locales); | |
| 82 | 84 |
| 83 /** | 85 /** |
| 84 * Sends asynchronous request to obtain the selection and analyze its type. | 86 * Sends asynchronous request to obtain the selection and analyze its type. |
| 85 * @param text The textual context that encloses the selected text. | 87 * @param text The textual context that encloses the selected text. |
| 86 * @param start The start index of the selected text inside the textual cont ext. | 88 * @param start The start index of the selected text inside the textual cont ext. |
| 87 * @param end The index pointing to the first character that comes after | 89 * @param end The index pointing to the first character that comes after |
| 88 * the selected text inside the textual context. | 90 * the selected text inside the textual context. |
| 89 */ | 91 */ |
| 90 public void sendClassifyRequest(CharSequence text, int start, int end); | 92 public void sendClassifyRequest(CharSequence text, int start, int end, Local eList locales); |
| 91 | 93 |
| 92 /** | 94 /** |
| 93 * Cancel all asynchronous requests. | 95 * Cancel all asynchronous requests. |
| 94 */ | 96 */ |
| 95 public void cancelAllRequests(); | 97 public void cancelAllRequests(); |
| 96 } | 98 } |
| OLD | NEW |