Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 275 // Shows a new credit card saved bubble and passes ownership of |new_card| and | 275 // Shows a new credit card saved bubble and passes ownership of |new_card| and |
| 276 // |billing_profile| to the bubble. Exposed for testing. | 276 // |billing_profile| to the bubble. Exposed for testing. |
| 277 virtual void ShowNewCreditCardBubble( | 277 virtual void ShowNewCreditCardBubble( |
| 278 scoped_ptr<CreditCard> new_card, | 278 scoped_ptr<CreditCard> new_card, |
| 279 scoped_ptr<AutofillProfile> billing_profile); | 279 scoped_ptr<AutofillProfile> billing_profile); |
| 280 | 280 |
| 281 // Called when there's nothing left to accept, update, save, or authenticate | 281 // Called when there's nothing left to accept, update, save, or authenticate |
| 282 // in order to fill |form_structure_| and pass data back to the invoking page. | 282 // in order to fill |form_structure_| and pass data back to the invoking page. |
| 283 void DoFinishSubmit(); | 283 void DoFinishSubmit(); |
| 284 | 284 |
| 285 // Delays enabling submit button for a time interval of |delay|. Exposed for | |
| 286 // testing. | |
| 287 virtual void SubmitButtonDelayBegin(base::TimeDelta delay); | |
| 288 | |
| 289 // Called when the delay for enabling the submit button ends. Exposed for | |
| 290 // testing. | |
| 291 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.
| |
| 292 | |
| 293 // Ends the delay for enabling the submit button. Called only from tests. | |
| 294 // Without this method, the tests would have to wait for the delay timer to | |
| 295 // finish, which would be flaky. | |
| 296 void SubmitButtonDelayEndForTesting(); | |
| 297 | |
| 285 private: | 298 private: |
| 286 enum DialogSignedInState { | 299 enum DialogSignedInState { |
| 287 REQUIRES_RESPONSE, | 300 REQUIRES_RESPONSE, |
| 288 REQUIRES_SIGN_IN, | 301 REQUIRES_SIGN_IN, |
| 289 REQUIRES_PASSIVE_SIGN_IN, | 302 REQUIRES_PASSIVE_SIGN_IN, |
| 290 SIGNED_IN, | 303 SIGNED_IN, |
| 291 SIGN_IN_DISABLED, | 304 SIGN_IN_DISABLED, |
| 292 }; | 305 }; |
| 293 | 306 |
| 294 // Whether or not the current request wants credit info back. | 307 // Whether or not the current request wants credit info back. |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 685 | 698 |
| 686 // The Google Wallet cookie value, set as an authorization header on requests | 699 // The Google Wallet cookie value, set as an authorization header on requests |
| 687 // to Wallet. | 700 // to Wallet. |
| 688 std::string wallet_cookie_value_; | 701 std::string wallet_cookie_value_; |
| 689 | 702 |
| 690 // Populated if the user chose to save a newly inputted credit card. Used to | 703 // Populated if the user chose to save a newly inputted credit card. Used to |
| 691 // show a bubble as the dialog closes to confirm a user's new card info was | 704 // show a bubble as the dialog closes to confirm a user's new card info was |
| 692 // saved. Never populated while incognito (as nothing's actually saved). | 705 // saved. Never populated while incognito (as nothing's actually saved). |
| 693 scoped_ptr<CreditCard> newly_saved_card_; | 706 scoped_ptr<CreditCard> newly_saved_card_; |
| 694 | 707 |
| 708 // The timer that delays enabling submit button for a short period of time on | |
| 709 // startup. | |
| 710 base::OneShotTimer<AutofillDialogControllerImpl> submit_button_delay_timer_; | |
| 711 | |
| 695 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 712 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 696 }; | 713 }; |
| 697 | 714 |
| 698 } // namespace autofill | 715 } // namespace autofill |
| 699 | 716 |
| 700 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 717 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |