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

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

Issue 1409443002: Make Chrome and WebView replace the selected text with the processed text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Bo's comments Created 5 years, 2 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.ActivityNotFoundException; 7 import android.content.ActivityNotFoundException;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.view.KeyEvent; 10 import android.view.KeyEvent;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 /** 98 /**
99 * If this returns {@code true} contextual web search attempts will be forwa rded to 99 * If this returns {@code true} contextual web search attempts will be forwa rded to
100 * {@link #performWebSearch(String)}. 100 * {@link #performWebSearch(String)}.
101 * @return {@code true} iff this {@link ContentViewClient} wants to consume web search queries 101 * @return {@code true} iff this {@link ContentViewClient} wants to consume web search queries
102 * and override the default intent behavior. 102 * and override the default intent behavior.
103 */ 103 */
104 public boolean doesPerformWebSearch() { 104 public boolean doesPerformWebSearch() {
105 return false; 105 return false;
106 } 106 }
107 107
108 public boolean doesPerformProcessText() {
jdduke (slow) 2015/10/22 00:43:56 Javadoc, preferably with a bit more context behind
hush (inactive) 2015/10/22 19:27:37 Done.
109 return false;
110 }
111
108 /** 112 /**
113 * Send the intent to process the current selected text.
114 */
115 public void startProcessTextIntent(Intent intent) {}
116
117 /**
109 * Called when a new content intent is requested to be started. 118 * Called when a new content intent is requested to be started.
110 */ 119 */
111 public void onStartContentIntent(Context context, String intentUrl) { 120 public void onStartContentIntent(Context context, String intentUrl) {
112 Intent intent; 121 Intent intent;
113 // Perform generic parsing of the URI to turn it into an Intent. 122 // Perform generic parsing of the URI to turn it into an Intent.
114 try { 123 try {
115 intent = Intent.parseUri(intentUrl, Intent.URI_INTENT_SCHEME); 124 intent = Intent.parseUri(intentUrl, Intent.URI_INTENT_SCHEME);
116 } catch (Exception ex) { 125 } catch (Exception ex) {
117 Log.w(TAG, "Bad URI %s", intentUrl, ex); 126 Log.w(TAG, "Bad URI %s", intentUrl, ex);
118 return; 127 return;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 * ContentViewClient users can return a custom value to override the height of 190 * ContentViewClient users can return a custom value to override the height of
182 * the ContentView. By default, this method returns MeasureSpec.UNSPECIFIED, which 191 * the ContentView. By default, this method returns MeasureSpec.UNSPECIFIED, which
183 * indicates that the value should not be overridden. 192 * indicates that the value should not be overridden.
184 * 193 *
185 * @return The desired height of the ContentView. 194 * @return The desired height of the ContentView.
186 */ 195 */
187 public int getDesiredHeightMeasureSpec() { 196 public int getDesiredHeightMeasureSpec() {
188 return UNSPECIFIED_MEASURE_SPEC; 197 return UNSPECIFIED_MEASURE_SPEC;
189 } 198 }
190 } 199 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698