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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.h

Issue 12221040: Interactive autofill: Handle Online Wallet being unavailable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: x Created 7 years, 10 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/browser/ui/autofill/autofill_dialog_controller_impl.h
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
index 0d86fa939a3a8d89f3f0832ce6806cddac33e7d6..55a97ea241e3590d4ffdd99289742de70e79bea2 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
@@ -60,16 +60,19 @@ class AutofillDialogControllerImpl : public AutofillDialogController,
// AutofillDialogController implementation.
virtual string16 DialogTitle() const OVERRIDE;
+ virtual string16 PayWithoutWallet() const OVERRIDE;
virtual string16 EditSuggestionText() const OVERRIDE;
virtual string16 UseBillingForShippingText() const OVERRIDE;
virtual string16 WalletOptionText() const OVERRIDE;
virtual string16 CancelButtonText() const OVERRIDE;
virtual string16 ConfirmButtonText() const OVERRIDE;
virtual string16 SignInText() const OVERRIDE;
+ virtual string16 SignedInUser() const OVERRIDE;
virtual string16 SaveLocallyText() const OVERRIDE;
virtual string16 CancelSignInText() const OVERRIDE;
virtual string16 ProgressBarText() const OVERRIDE;
virtual DialogSignedInState SignedInState() const OVERRIDE;
+ virtual bool IsWalletAvailable() const OVERRIDE;
virtual const DetailInputs& RequestedFieldsForSection(DialogSection section)
const OVERRIDE;
virtual ui::ComboboxModel* ComboboxModelForAutofillType(
@@ -144,6 +147,14 @@ class AutofillDialogControllerImpl : public AutofillDialogController,
typedef base::Callback<bool(const DetailInput& input,
const AutofillField& field)> InputFieldComparator;
+ // Refresh wallet items when there's not a request in progress.
Evan Stade 2013/02/06 21:57:49 "Refresh wallet items immediately if there's no re
Dan Beam 2013/02/07 01:22:40 Done.
+ void ScheduleRefreshWalletItems();
+
+ // Called when a request to Online Wallet completes. |success| is true when
+ // there was no network error, the response wasn't malformed, and no Wallet
+ // error occurred.
Evan Stade 2013/02/06 21:57:49 good example of a helpful comment.
Dan Beam 2013/02/07 01:22:40 If only my brain worked the same way at all times
+ void WalletRequestCompleted(bool success);
+
// Whether or not the current request wants credit info back.
bool RequestingCreditCardInfo() const;
@@ -228,6 +239,16 @@ class AutofillDialogControllerImpl : public AutofillDialogController,
// A client to talk to the Online Wallet API.
wallet::WalletClient wallet_client_;
+ // Whether there's currently a request for WalletItems in progress.
+ bool refresh_wallet_items_in_progress_;
Evan Stade 2013/02/06 21:57:49 the seemingly interchangeable use of "refresh" and
Dan Beam 2013/02/07 01:22:40 Oh, sorry, these were named request_* before, I th
+
+ // Whether another request for WalletItems should be started when the current
+ // one is done.
+ bool refresh_wallet_items_queued_;
+
+ // Whether there has been a wallet error while this dialog has been open.
+ bool had_wallet_error_;
+
// The most recently received WalletItems retrieved via |wallet_client_|.
scoped_ptr<wallet::WalletItems> wallet_items_;

Powered by Google App Engine
This is Rietveld 408576698