| 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 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "chrome/browser/ui/autofill/account_chooser_model.h" | 16 #include "chrome/browser/ui/autofill/account_chooser_model.h" |
| 17 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" | |
| 18 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" | 17 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" |
| 19 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 18 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
| 19 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" |
| 20 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" | 20 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" |
| 21 #include "chrome/browser/ui/autofill/country_combobox_model.h" | 21 #include "chrome/browser/ui/autofill/country_combobox_model.h" |
| 22 #include "components/autofill/content/browser/autocheckout_steps.h" | 22 #include "components/autofill/content/browser/autocheckout_steps.h" |
| 23 #include "components/autofill/content/browser/wallet/wallet_client.h" | 23 #include "components/autofill/content/browser/wallet/wallet_client.h" |
| 24 #include "components/autofill/content/browser/wallet/wallet_client_delegate.h" | 24 #include "components/autofill/content/browser/wallet/wallet_client_delegate.h" |
| 25 #include "components/autofill/content/browser/wallet/wallet_items.h" | 25 #include "components/autofill/content/browser/wallet/wallet_items.h" |
| 26 #include "components/autofill/content/browser/wallet/wallet_signin_helper_delega
te.h" | 26 #include "components/autofill/content/browser/wallet/wallet_signin_helper_delega
te.h" |
| 27 #include "components/autofill/core/browser/autofill_manager_delegate.h" | 27 #include "components/autofill/core/browser/autofill_manager_delegate.h" |
| 28 #include "components/autofill/core/browser/autofill_metrics.h" | 28 #include "components/autofill/core/browser/autofill_metrics.h" |
| 29 #include "components/autofill/core/browser/autofill_popup_delegate.h" | 29 #include "components/autofill/core/browser/autofill_popup_delegate.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 59 namespace risk { | 59 namespace risk { |
| 60 class Fingerprint; | 60 class Fingerprint; |
| 61 } | 61 } |
| 62 | 62 |
| 63 namespace wallet { | 63 namespace wallet { |
| 64 class WalletSigninHelper; | 64 class WalletSigninHelper; |
| 65 } | 65 } |
| 66 | 66 |
| 67 // This class drives the dialog that appears when a site uses the imperative | 67 // This class drives the dialog that appears when a site uses the imperative |
| 68 // autocomplete API to fill out a form. | 68 // autocomplete API to fill out a form. |
| 69 class AutofillDialogControllerImpl : public AutofillDialogController, | 69 class AutofillDialogControllerImpl : public AutofillDialogViewDelegate, |
| 70 public AutofillPopupDelegate, | 70 public AutofillPopupDelegate, |
| 71 public content::NotificationObserver, | 71 public content::NotificationObserver, |
| 72 public SuggestionsMenuModelDelegate, | 72 public SuggestionsMenuModelDelegate, |
| 73 public wallet::WalletClientDelegate, | 73 public wallet::WalletClientDelegate, |
| 74 public wallet::WalletSigninHelperDelegate, | 74 public wallet::WalletSigninHelperDelegate, |
| 75 public PersonalDataManagerObserver, | 75 public PersonalDataManagerObserver, |
| 76 public AccountChooserModelDelegate { | 76 public AccountChooserModelDelegate { |
| 77 public: | 77 public: |
| 78 virtual ~AutofillDialogControllerImpl(); | 78 virtual ~AutofillDialogControllerImpl(); |
| 79 | 79 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 104 // Called when there is an error in an active Autocheckout flow. | 104 // Called when there is an error in an active Autocheckout flow. |
| 105 void OnAutocheckoutError(); | 105 void OnAutocheckoutError(); |
| 106 | 106 |
| 107 // Called when an Autocheckout flow completes successfully. | 107 // Called when an Autocheckout flow completes successfully. |
| 108 void OnAutocheckoutSuccess(); | 108 void OnAutocheckoutSuccess(); |
| 109 | 109 |
| 110 // Returns |view_| as a testable version of itself (if |view_| exists and | 110 // Returns |view_| as a testable version of itself (if |view_| exists and |
| 111 // actually implements |AutofillDialogView::GetTestableView()|). | 111 // actually implements |AutofillDialogView::GetTestableView()|). |
| 112 TestableAutofillDialogView* GetTestableView(); | 112 TestableAutofillDialogView* GetTestableView(); |
| 113 | 113 |
| 114 // AutofillDialogController implementation. | 114 // AutofillDialogViewDelegate implementation. |
| 115 virtual string16 DialogTitle() const OVERRIDE; | 115 virtual string16 DialogTitle() const OVERRIDE; |
| 116 virtual string16 AccountChooserText() const OVERRIDE; | 116 virtual string16 AccountChooserText() const OVERRIDE; |
| 117 virtual string16 SignInLinkText() const OVERRIDE; | 117 virtual string16 SignInLinkText() const OVERRIDE; |
| 118 virtual string16 EditSuggestionText() const OVERRIDE; | 118 virtual string16 EditSuggestionText() const OVERRIDE; |
| 119 virtual string16 CancelButtonText() const OVERRIDE; | 119 virtual string16 CancelButtonText() const OVERRIDE; |
| 120 virtual string16 ConfirmButtonText() const OVERRIDE; | 120 virtual string16 ConfirmButtonText() const OVERRIDE; |
| 121 virtual string16 SaveLocallyText() const OVERRIDE; | 121 virtual string16 SaveLocallyText() const OVERRIDE; |
| 122 virtual string16 LegalDocumentsText() OVERRIDE; | 122 virtual string16 LegalDocumentsText() OVERRIDE; |
| 123 virtual DialogSignedInState SignedInState() const OVERRIDE; | 123 virtual DialogSignedInState SignedInState() const OVERRIDE; |
| 124 virtual bool ShouldShowSpinner() const OVERRIDE; | 124 virtual bool ShouldShowSpinner() const OVERRIDE; |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 // show a bubble as the dialog closes to confirm a user's new card info was | 713 // show a bubble as the dialog closes to confirm a user's new card info was |
| 714 // saved. Never populated while incognito (as nothing's actually saved). | 714 // saved. Never populated while incognito (as nothing's actually saved). |
| 715 scoped_ptr<CreditCard> newly_saved_card_; | 715 scoped_ptr<CreditCard> newly_saved_card_; |
| 716 | 716 |
| 717 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 717 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 718 }; | 718 }; |
| 719 | 719 |
| 720 } // namespace autofill | 720 } // namespace autofill |
| 721 | 721 |
| 722 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 722 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |