Index: content/browser/android/content_view_core_impl.cc |
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
index fd1ab9bef72f5cca142e5fc2720abbca0076ccf0..d0e5bd2aee2cfa46819d05aa64ba972f8919d543 100644 |
--- a/content/browser/android/content_view_core_impl.cc |
+++ b/content/browser/android/content_view_core_impl.cc |
@@ -120,6 +120,25 @@ RenderWidgetHostViewAndroid* |
// Methods called from Java via JNI |
// ---------------------------------------------------------------------------- |
+void ContentViewCoreImpl::SelectPopupMenuItems(JNIEnv* env, jobject obj, |
+ jintArray indices) { |
+ RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>( |
+ web_contents_->GetRenderViewHost()); |
+ DCHECK(rvhi); |
+ if (indices == NULL) { |
+ rvhi->DidCancelPopupMenu(); |
+ return; |
+ } |
+ |
+ int selected_count = env->GetArrayLength(indices); |
+ std::vector<int> selected_indices; |
+ jint* indices_ptr = env->GetIntArrayElements(indices, NULL); |
+ for (int i = 0; i < selected_count; ++i) |
+ selected_indices.push_back(indices_ptr[i]); |
+ env->ReleaseIntArrayElements(indices, indices_ptr, JNI_ABORT); |
+ rvhi->DidSelectPopupMenuItems(selected_indices); |
+} |
+ |
void ContentViewCoreImpl::LoadUrlWithoutUrlSanitization(JNIEnv* env, |
jobject, |
jstring jurl, |
@@ -493,29 +512,6 @@ void ContentViewCoreImpl::StartContentIntent(const GURL& content_url) { |
} |
// -------------------------------------------------------------------------- |
-// Methods called from Java via JNI |
-// -------------------------------------------------------------------------- |
- |
-void ContentViewCoreImpl::SelectPopupMenuItems(JNIEnv* env, jobject obj, |
- jintArray indices) { |
- RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>( |
- web_contents_->GetRenderViewHost()); |
- DCHECK(rvhi); |
- if (indices == NULL) { |
- rvhi->DidCancelPopupMenu(); |
- return; |
- } |
- |
- int selected_count = env->GetArrayLength(indices); |
- std::vector<int> selected_indices; |
- jint* indices_ptr = env->GetIntArrayElements(indices, NULL); |
- for (int i = 0; i < selected_count; ++i) |
- selected_indices.push_back(indices_ptr[i]); |
- env->ReleaseIntArrayElements(indices, indices_ptr, JNI_ABORT); |
- rvhi->DidSelectPopupMenuItems(selected_indices); |
-} |
- |
-// -------------------------------------------------------------------------- |
// Methods called from native code |
// -------------------------------------------------------------------------- |