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

Unified Diff: content/browser/android/content_view_core_impl.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. 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/browser/android/content_view_core_impl.h
diff --git a/content/browser/android/content_view_core_impl.h b/content/browser/android/content_view_core_impl.h
index 6c003df44620f384a828e460fbba36473f982419..8d6139740cf85181bc4098a4ec30b5957cbedec6 100644
--- a/content/browser/android/content_view_core_impl.h
+++ b/content/browser/android/content_view_core_impl.h
@@ -9,7 +9,6 @@
#include "base/android/jni_android.h"
#include "base/android/jni_weak_ref.h"
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/i18n/rtl.h"
#include "base/memory/scoped_ptr.h"
@@ -17,6 +16,7 @@
#include "content/browser/renderer_host/render_widget_host_view_android.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/android/content_view_core.h"
+#include "content/public/browser/android/text_surroundings_delegate.h"
#include "content/public/browser/web_contents_observer.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/gfx/rect.h"
@@ -62,6 +62,9 @@ class ContentViewCoreImpl : public ContentViewCore,
virtual float GetDpiScale() const OVERRIDE;
virtual void PauseVideo() OVERRIDE;
virtual void PauseOrResumeGeolocation(bool should_pause) OVERRIDE;
+ virtual void SetTextSurroundingsDelegate(TextSurroundingsDelegate* delegate)
+ OVERRIDE;
+ virtual void RequestTextSurroundingSelection(int max_length) const OVERRIDE;
// --------------------------------------------------------------------------
// Methods called from Java via JNI
@@ -226,6 +229,11 @@ class ContentViewCoreImpl : public ContentViewCore,
jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj);
+ void OnTextSurroundingSelectionResponse(const base::string16& content,
+ int start_offset,
+ int end_offset);
+
+
// --------------------------------------------------------------------------
// Public methods that call to Java via JNI
// --------------------------------------------------------------------------
@@ -378,6 +386,8 @@ class ContentViewCoreImpl : public ContentViewCore,
scoped_ptr<JavaBridgeDispatcherHostManager>
java_bridge_dispatcher_host_manager_;
+ TextSurroundingsDelegate* text_surroundings_delegate_;
+
DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
};
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.cc » ('j') | content/browser/android/content_view_core_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698