Index: chrome/browser/ui/android/autofill/autofill_popup_view_android.cc |
diff --git a/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc b/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc |
index 663bd8b4192cd476f878eb1a6532e5e2d65692fb..c3cb1906fb84720dd377d4f7d9d288d0ddc7d6c3 100644 |
--- a/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc |
+++ b/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc |
@@ -36,9 +36,11 @@ void AutofillPopupViewAndroid::Show() { |
ui::ViewAndroid* view_android = controller_->container_view(); |
DCHECK(view_android); |
- |
+ ScopedJavaLocalRef<jobject> anchor_view = |
+ view_android->AcquireAnchorView(controller_->element_bounds()); |
java_object_.Reset(Java_AutofillPopupBridge_create( |
- env, reinterpret_cast<intptr_t>(this), |
+ env, anchor_view.obj(), controller_->element_bounds().width(), |
+ reinterpret_cast<intptr_t>(this), |
view_android->GetWindowAndroid()->GetJavaObject().obj(), |
view_android->GetViewAndroidDelegate().obj())); |
@@ -53,14 +55,6 @@ void AutofillPopupViewAndroid::Hide() { |
void AutofillPopupViewAndroid::UpdateBoundsAndRedrawPopup() { |
JNIEnv* env = base::android::AttachCurrentThread(); |
- Java_AutofillPopupBridge_setAnchorRect( |
no sievers
2016/07/12 21:57:27
So for this one we have to support repositioning i
Jinsuk Kim
2016/07/14 07:51:52
You're correct. Added back |ViewAndroidDelegate.se
|
- env, |
- java_object_.obj(), |
- controller_->element_bounds().x(), |
- controller_->element_bounds().y(), |
- controller_->element_bounds().width(), |
- controller_->element_bounds().height()); |
- |
size_t count = controller_->GetLineCount(); |
ScopedJavaLocalRef<jobjectArray> data_array = |
Java_AutofillPopupBridge_createAutofillSuggestionArray(env, count); |