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

Unified Diff: chrome/browser/ui/android/autofill/autofill_popup_view_android.cc

Issue 11636040: AutofillPopupController clarifications + simplifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new workstation Created 8 years 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: 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 4d33c973877a796225dce14e88e834b172e5f4f8..0c568190c482d1c0cbd823c8dda1016ae7f123f0 100644
--- a/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc
+++ b/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc
@@ -55,22 +55,22 @@ void AutofillPopupViewAndroid::UpdateBoundsAndRedrawPopup() {
base::android::GetClass(env,
"org/chromium/chrome/browser/autofill/AutofillSuggestion");
ScopedJavaLocalRef<jobjectArray> data_array(env,
- env->NewObjectArray(controller_->autofill_values().size(),
+ env->NewObjectArray(controller_->names().size(),
autofill_suggestion_clazz.obj(), NULL));
base::android::CheckException(env);
- for (size_t i = 0; i < controller_->autofill_values().size(); ++i) {
- ScopedJavaLocalRef<jstring> value =
+ for (size_t i = 0; i < controller_->names().size(); ++i) {
+ ScopedJavaLocalRef<jstring> name =
base::android::ConvertUTF16ToJavaString(
- env, controller_->autofill_values()[i]);
- ScopedJavaLocalRef<jstring> label =
+ env, controller_->names()[i]);
+ ScopedJavaLocalRef<jstring> subtext =
base::android::ConvertUTF16ToJavaString(
- env, controller_->autofill_labels()[i]);
- int unique_id = controller_->autofill_unique_ids()[i];
+ env, controller_->subtexts()[i]);
+ int identifier = controller_->identifiers()[i];
ScopedJavaLocalRef<jobject> data =
Java_AutofillPopupGlue_createAutofillSuggestion(env,
- value.obj(),
- label.obj(),
- unique_id);
+ name.obj(),
+ subtext.obj(),
+ identifier);
env->SetObjectArrayElement(data_array.obj(), i, data.obj());
base::android::CheckException(env);
}
@@ -81,12 +81,9 @@ void AutofillPopupViewAndroid::UpdateBoundsAndRedrawPopup() {
void AutofillPopupViewAndroid::SuggestionSelected(JNIEnv* env,
jobject obj,
jint list_index,
- jstring value,
- jint unique_id) {
- string16 value_utf16 = base::android::ConvertJavaStringToUTF16(env, value);
- controller_->AcceptAutofillSuggestion(value_utf16,
- unique_id,
- list_index);
+ jstring /*name*/,
+ jint /*identifier*/) {
+ controller_->AcceptSuggestion(list_index);
}
void AutofillPopupViewAndroid::Dismissed(JNIEnv* env, jobject obj) {

Powered by Google App Engine
This is Rietveld 408576698