Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContextSelectionProvider.java

Issue 2740103006: Implement SmartText selection. (Closed)
Patch Set: Went back to the large constant for the text processing order Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.view.View.OnClickListener; 9 import android.view.View.OnClickListener;
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 /** 44 /**
45 * Intent for the suggested menu item. 45 * Intent for the suggested menu item.
46 */ 46 */
47 public Intent intent; 47 public Intent intent;
48 48
49 /** 49 /**
50 * OnClickListener for the suggested menu item. 50 * OnClickListener for the suggested menu item.
51 */ 51 */
52 public OnClickListener onClickListener; 52 public OnClickListener onClickListener;
53
54 /**
55 * A helper method that returns true if the result has both visual info
Ted C 2017/03/29 17:43:51 same about comment line wrapping
Tima Vaisburd 2017/03/29 22:56:37 Done.
56 * and an action so that, for instance, one can make a new menu item.
57 */
58 public boolean hasNamedAction() {
59 return (label != null || icon != null) && (intent != null || onClick Listener != null);
60 }
53 } 61 }
54 62
55 /** 63 /**
56 * The interface that returns the result of the selected text analysis. 64 * The interface that returns the result of the selected text analysis.
57 */ 65 */
58 public interface ResultCallback { 66 public interface ResultCallback {
59 /** 67 /**
60 * The result is delivered with this method. 68 * The result is delivered with this method.
61 */ 69 */
62 void onClassified(Result result); 70 void onClassified(Result result);
(...skipping 16 matching lines...) Expand all
79 * @param end The index pointing to the first character that comes after 87 * @param end The index pointing to the first character that comes after
80 * the selected text inside the textual context. 88 * the selected text inside the textual context.
81 */ 89 */
82 public void sendClassifyRequest(CharSequence text, int start, int end); 90 public void sendClassifyRequest(CharSequence text, int start, int end);
83 91
84 /** 92 /**
85 * Cancel all asynchronous requests. 93 * Cancel all asynchronous requests.
86 */ 94 */
87 public void cancelAllRequests(); 95 public void cancelAllRequests();
88 } 96 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698