diff options
author | avi.nitk@samsung.com <avi.nitk@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-23 09:52:02 +0000 |
---|---|---|
committer | avi.nitk@samsung.com <avi.nitk@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-23 09:52:02 +0000 |
commit | e753c05718e564bcaf0e365cf123186955b20ee6 (patch) | |
tree | 90211c7005564ba33bba3fbb028f9fb35096416e /content/browser/android | |
parent | 5c3c6e48e4f429dc2dd4d664d0be5200e9c57283 (diff) | |
download | chromium_src-e753c05718e564bcaf0e365cf123186955b20ee6.zip chromium_src-e753c05718e564bcaf0e365cf123186955b20ee6.tar.gz chromium_src-e753c05718e564bcaf0e365cf123186955b20ee6.tar.bz2 |
Currently, the data for SmartClip is sent over IPC as a customized
string, which contains rect values and string of content within the
clip rect. Changes from Chromium side to remove custom serialization and
send it as a structure of rect and string values.
BUG=330872
Review URL: https://codereview.chromium.org/260623004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279072 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/android')
-rw-r--r-- | content/browser/android/content_view_core_impl.cc | 4 | ||||
-rw-r--r-- | content/browser/android/content_view_core_impl.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc index 4b6a7b1..b25a405 100644 --- a/content/browser/android/content_view_core_impl.cc +++ b/content/browser/android/content_view_core_impl.cc @@ -1646,14 +1646,16 @@ bool ContentViewCoreImpl::WillHandleDeferAfterResponseStarted() { } void ContentViewCoreImpl::OnSmartClipDataExtracted( + const gfx::Rect& clip_rect, const base::string16& result) { JNIEnv* env = AttachCurrentThread(); ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); if (obj.is_null()) return; + ScopedJavaLocalRef<jobject> clip_rect_object(CreateJavaRect(env, clip_rect)); ScopedJavaLocalRef<jstring> jresult = ConvertUTF16ToJavaString(env, result); Java_ContentViewCore_onSmartClipDataExtracted( - env, obj.obj(), jresult.obj()); + env, obj.obj(), jresult.obj(), clip_rect_object.obj()); } void ContentViewCoreImpl::WebContentsDestroyed() { diff --git a/content/browser/android/content_view_core_impl.h b/content/browser/android/content_view_core_impl.h index 0504bc6..87a7727 100644 --- a/content/browser/android/content_view_core_impl.h +++ b/content/browser/android/content_view_core_impl.h @@ -252,7 +252,8 @@ class ContentViewCoreImpl : public ContentViewCore, // determine if the embedder intends to handle it. bool WillHandleDeferAfterResponseStarted(); - void OnSmartClipDataExtracted(const base::string16& result); + void OnSmartClipDataExtracted(const gfx::Rect& clip_rect, + const base::string16& result); // Creates a popup menu with |items|. // |multiple| defines if it should support multi-select. |