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

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

Issue 23717029: Disable submit button briefly when launching rAc dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use timer Created 7 years, 3 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 5407271e446effc14c29cef11b518b6837e1d819..44cf9d574ef674c79b3c0f38c0ccbdc259dd3523 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
@@ -287,6 +287,14 @@ class AutofillDialogControllerImpl : public AutofillDialogViewDelegate,
// in order to fill |form_structure_| and pass data back to the invoking page.
void DoFinishSubmit();
+ // Delays enabling submit button for |delay_ms| milliseconds. Exposed for
+ // testing.
+ virtual void SubmitButtonDelayBegin(int delay_ms);
Evan Stade 2013/09/04 21:42:52 nit: this should be TimeDelta rather than int
+
+ // Called when the delay for enabling the submit button ends. Exposed for
+ // testing.
+ virtual void OnSubmitButtonDelayEnd();
+
private:
enum DialogSignedInState {
REQUIRES_RESPONSE,
@@ -700,6 +708,10 @@ class AutofillDialogControllerImpl : public AutofillDialogViewDelegate,
// saved. Never populated while incognito (as nothing's actually saved).
scoped_ptr<CreditCard> newly_saved_card_;
+ // The timer that delays enabling submit button for a short period of time at
+ // the startup.
+ base::OneShotTimer<AutofillDialogControllerImpl> submit_buton_delay_timer_;
Evan Stade 2013/09/04 21:42:52 nit: s/button/button
+
DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698