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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 292113008: Plumbing for browser process to access text surrounding selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@adb_install_humans
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
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 272c8cf75a5ce108af0b820b4a10c136840648f5..82a60b9f75e8c9d8c440afbd13e638bfcd60aa37 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
@@ -2471,6 +2471,11 @@ public class ContentViewCore
attachImeAdapter();
}
+ @CalledByNative
+ private void onTextSurroundingSelectionResponse(
+ String content, int startOffset, int endOffset) {
dcheng 2014/05/21 21:05:38 This is unsigned coming back from the renderer. Wh
mlamouri (slow - plz ping) 2014/05/21 21:19:40 Because Java doesn't know about unsigned int.
nasko 2014/05/22 18:59:04 Should there be a safe conversion somewhere on the
dcheng 2014/05/22 19:02:36 Right... so I think this should just be int all th
+ }
+
/**
* Attaches the native ImeAdapter object to the java ImeAdapter to allow communication via JNI.
*/
@@ -3217,4 +3222,7 @@ public class ContentViewCore
private native void nativeExtractSmartClipData(long nativeContentViewCoreImpl,
int x, int y, int w, int h);
+
+ private native void nativeTextSurroundingSelectionRequest(
+ long nativeContentViewCoreImpl, int maxLength);
dcheng 2014/05/21 21:05:38 Similarly, this starts out as an int here... but e
mlamouri (slow - plz ping) 2014/05/21 21:19:40 ditto.
}

Powered by Google App Engine
This is Rietveld 408576698