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

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: Merge master 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 612e24479a9a95b3c9a9096c310a5f3443b8f82c..b4787408f0bc87022de464774e6673bd5756581b 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
@@ -282,6 +282,19 @@ 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 a time interval of |delay|. Exposed for
+ // testing.
+ virtual void SubmitButtonDelayBegin(base::TimeDelta delay);
+
+ // Called when the delay for enabling the submit button ends. Exposed for
+ // testing.
+ void OnSubmitButtonDelayEnd();
Evan Stade 2013/09/05 16:29:44 this can be private now right?
please use gerrit instead 2013/09/05 18:40:49 Moved to private.
+
+ // Ends the delay for enabling the submit button. Called only from tests.
+ // Without this method, the tests would have to wait for the delay timer to
+ // finish, which would be flaky.
+ void SubmitButtonDelayEndForTesting();
+
private:
enum DialogSignedInState {
REQUIRES_RESPONSE,
@@ -692,6 +705,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 on
+ // startup.
+ base::OneShotTimer<AutofillDialogControllerImpl> submit_button_delay_timer_;
+
DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698