Index: components/spellcheck/browser/spellchecker_session_bridge_android.cc |
diff --git a/components/spellcheck/browser/spellchecker_session_bridge_android.cc b/components/spellcheck/browser/spellchecker_session_bridge_android.cc |
index de8b3f92550431c85c57a54cd6b64e5ded8ba549..68d20a3d1fd4628531312a9ec81422910ae5661f 100644 |
--- a/components/spellcheck/browser/spellchecker_session_bridge_android.cc |
+++ b/components/spellcheck/browser/spellchecker_session_bridge_android.cc |
@@ -94,7 +94,8 @@ void SpellCheckerSessionBridge::ProcessSpellCheckResults( |
JNIEnv* env, |
const JavaParamRef<jobject>& jobj, |
const JavaParamRef<jintArray>& offset_array, |
- const JavaParamRef<jintArray>& length_array) { |
+ const JavaParamRef<jintArray>& length_array, |
+ const JavaParamRef<jobjectArray>& suggestions_array) { |
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
std::vector<int> offsets; |
std::vector<int> lengths; |
@@ -104,8 +105,14 @@ void SpellCheckerSessionBridge::ProcessSpellCheckResults( |
std::vector<SpellCheckResult> results; |
for (size_t i = 0; i < offsets.size(); i++) { |
- results.push_back( |
- SpellCheckResult(SpellCheckResult::SPELLING, offsets[i], lengths[i])); |
+ base::android::ScopedJavaLocalRef<jobjectArray> suggestions_for_word_array( |
+ env, static_cast<jobjectArray>( |
+ env->GetObjectArrayElement(suggestions_array, i))); |
+ std::vector<base::string16> suggestions_for_word; |
+ base::android::AppendJavaStringArrayToStringVector( |
+ env, suggestions_for_word_array.obj(), &suggestions_for_word); |
+ results.push_back(SpellCheckResult(SpellCheckResult::SPELLING, offsets[i], |
+ lengths[i], suggestions_for_word)); |
} |
content::RenderProcessHost* sender = |