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

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: Using is_null to check if the callback is null. 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..723a4bfcf5fa5198a7208a333deeed8dea284e41 100644
--- a/content/public/browser/android/content_view_core.h
+++ b/content/public/browser/android/content_view_core.h
@@ -10,6 +10,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/callback.h"
#include "content/common/content_export.h"
+#include "content/public/browser/android/text_surroundings_delegate.h"
#include "content/public/browser/navigation_controller.h"
#include "ui/gfx/rect.h"
@@ -68,6 +69,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