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

Unified Diff: content/public/browser/android/content_view_core.h

Issue 322203002: Add an interface to gather text surrounding the selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@surroundings-patch-5
Patch Set: Comments, and handle any case where the renderer crashes differently. Created 6 years, 6 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/browser/android/content_view_core.h
diff --git a/content/public/browser/android/content_view_core.h b/content/public/browser/android/content_view_core.h
index 1501985b8a53bfa15439eb84ada178e1b8f34d63..a6e4ab1d737df97ae024f26e6eb802d4323a71d9 100644
--- a/content/public/browser/android/content_view_core.h
+++ b/content/public/browser/android/content_view_core.h
@@ -68,6 +68,15 @@ class CONTENT_EXPORT ContentViewCore {
const gfx::Vector2dF& scroll_offset,
float page_scale_factor)> UpdateFrameInfoCallback;
+ // Text surrounding selection.
+ typedef base::Callback<void(const base::string16& content,
+ int start_offset,
+ int end_offset)>
+ TextSurroundingSelectionCallback;
+ virtual void RequestTextSurroundingSelection(
+ int max_length,
+ const TextSurroundingSelectionCallback& callback) = 0;
+
protected:
virtual ~ContentViewCore() {};
};

Powered by Google App Engine
This is Rietveld 408576698