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

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

Issue 231953003: Show Ash like <select> popup on Android tablets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newpopupx
Patch Set: Created 6 years, 8 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 486615af68b2dd084e093516518c9e86e06f061f..6a65ddf2ee167e919346c241e67922b3c1173336 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -516,12 +516,15 @@ void ContentViewCoreImpl::OnBackgroundColorChanged(SkColor color) {
}
void ContentViewCoreImpl::ShowSelectPopupMenu(
- const std::vector<MenuItem>& items, int selected_item, bool multiple) {
+ const gfx::Rect& bounds, const std::vector<MenuItem>& items,
Ted C 2014/04/12 01:10:27 this formatting wasn't correct before, it should a
keishi 2014/04/15 14:41:07 Done.
+ int selected_item, double item_font_size, bool multiple) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env);
if (j_obj.is_null())
return;
+ ScopedJavaLocalRef<jobject> bounds_rect(CreateJavaRect(env, bounds));
+
// For multi-select list popups we find the list of previous selections by
// iterating through the items. But for single selection popups we take the
// given |selected_item| as is.
@@ -559,8 +562,12 @@ void ContentViewCoreImpl::ShowSelectPopupMenu(
ScopedJavaLocalRef<jobjectArray> items_array(
base::android::ToJavaArrayOfStrings(env, labels));
Java_ContentViewCore_showSelectPopup(env, j_obj.obj(),
- items_array.obj(), enabled_array.obj(),
- multiple, selected_array.obj());
+ bounds_rect.obj(),
+ items_array.obj(),
+ enabled_array.obj(),
+ item_font_size,
+ multiple,
+ selected_array.obj());
}
void ContentViewCoreImpl::HideSelectPopupMenu() {

Powered by Google App Engine
This is Rietveld 408576698