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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 10830066: Non-functional cleanup in ContentViewCore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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.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
// --------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698