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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogGlue.java

Issue 12942004: Add Glue as delegate to AutofillDialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Static fix Created 7 years, 9 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: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogGlue.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogGlue.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogGlue.java
index a833ab0deeb7b6d467d342693ad984c6b0fc7b2c..c1c8228df286d711ca6e71940c53e02e26e24daf 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogGlue.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogGlue.java
@@ -23,7 +23,7 @@ public class AutofillDialogGlue implements AutofillDialogDelegate {
public AutofillDialogGlue(int nativeAutofillDialogViewAndroid, NativeWindow nativeWindow) {
mNativeDialogPopup = nativeAutofillDialogViewAndroid;
- mAutofillDialog = new AutofillDialog(nativeWindow.getContext());
+ mAutofillDialog = new AutofillDialog(nativeWindow.getContext(), this);
mAutofillDialog.show();
}
@@ -48,6 +48,23 @@ public class AutofillDialogGlue implements AutofillDialogDelegate {
mAutofillDialog.updateSection(section, visible, dialogInputs, menuItems, selectedMenuItem);
}
+ /**
+ * Notifies the dialog that the underlying model is changed and all sections will be updated.
+ * @param fetchingIsActive If true, the data is being fetched and is not yet available.
+ */
+ private void modelChanged(boolean fetchingIsActive) {
+ mAutofillDialog.modelChanged(fetchingIsActive);
+ }
+
+ /**
+ * Updates the account chooser of Autofill dialog.
+ * @param accountNames List of accounts to be shown.
+ * @param selectedAccountIndex Index of the currently selected account.
+ */
+ private void updateAccountChooser(String[] accountNames, int selectedAccountIndex) {
+ mAutofillDialog.updateAccountChooserAndAddTitle(accountNames, selectedAccountIndex);
+ }
+
@CalledByNative
private AutofillDialogField[] getSection(int section) {
return mAutofillDialog.getSection(section);

Powered by Google App Engine
This is Rietveld 408576698