| 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_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
| 12 #include "components/autofill/browser/field_types.h" | 12 #include "components/autofill/browser/field_types.h" |
| 13 #include "components/autofill/browser/wallet/required_action.h" |
| 13 #include "ui/base/ui_base_types.h" | 14 #include "ui/base/ui_base_types.h" |
| 14 #include "ui/gfx/image/image.h" | 15 #include "ui/gfx/image/image.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 16 | 17 |
| 17 class Profile; | 18 class Profile; |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 class WebContents; | 21 class WebContents; |
| 21 struct NativeWebKeyboardEvent; | 22 struct NativeWebKeyboardEvent; |
| 22 } | 23 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 76 |
| 76 // Whether or not an Autocheckout flow is running. | 77 // Whether or not an Autocheckout flow is running. |
| 77 virtual bool AutocheckoutIsRunning() const = 0; | 78 virtual bool AutocheckoutIsRunning() const = 0; |
| 78 | 79 |
| 79 // Whether or not there was an error in an Autocheckout flow. | 80 // Whether or not there was an error in an Autocheckout flow. |
| 80 virtual bool HadAutocheckoutError() const = 0; | 81 virtual bool HadAutocheckoutError() const = 0; |
| 81 | 82 |
| 82 // Whether or not the |button| should be enabled. | 83 // Whether or not the |button| should be enabled. |
| 83 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const = 0; | 84 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const = 0; |
| 84 | 85 |
| 86 // Whether the submission process is paused on |action| (e.g. VERIFY_CVV). |
| 87 virtual bool IsSubmitPausedOn(wallet::RequiredAction action) const = 0; |
| 88 |
| 85 // Detail inputs ------------------------------------------------------------- | 89 // Detail inputs ------------------------------------------------------------- |
| 86 | 90 |
| 87 // Whether the section is currently active (i.e. should be shown). | 91 // Whether the section is currently active (i.e. should be shown). |
| 88 virtual bool SectionIsActive(DialogSection section) const = 0; | 92 virtual bool SectionIsActive(DialogSection section) const = 0; |
| 89 | 93 |
| 90 // Returns the set of inputs the page has requested which fall under | 94 // Returns the set of inputs the page has requested which fall under |
| 91 // |section|. | 95 // |section|. |
| 92 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) | 96 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) |
| 93 const = 0; | 97 const = 0; |
| 94 | 98 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 152 |
| 149 // Begins the flow to sign into Wallet. | 153 // Begins the flow to sign into Wallet. |
| 150 virtual void StartSignInFlow() = 0; | 154 virtual void StartSignInFlow() = 0; |
| 151 | 155 |
| 152 // Marks the signin flow into Wallet complete. | 156 // Marks the signin flow into Wallet complete. |
| 153 virtual void EndSignInFlow() = 0; | 157 virtual void EndSignInFlow() = 0; |
| 154 | 158 |
| 155 // Called when the view has been cancelled. | 159 // Called when the view has been cancelled. |
| 156 virtual void OnCancel() = 0; | 160 virtual void OnCancel() = 0; |
| 157 | 161 |
| 158 // Called when the view has been accepted. | 162 // Called when the view has been accepted. This could be to submit the payment |
| 159 virtual void OnSubmit() = 0; | 163 // info or to handle a required action. |
| 164 virtual void OnAccept() = 0; |
| 160 | 165 |
| 161 // Returns the profile for this dialog. | 166 // Returns the profile for this dialog. |
| 162 virtual Profile* profile() = 0; | 167 virtual Profile* profile() = 0; |
| 163 | 168 |
| 164 // The web contents that prompted the dialog. | 169 // The web contents that prompted the dialog. |
| 165 virtual content::WebContents* web_contents() = 0; | 170 virtual content::WebContents* web_contents() = 0; |
| 166 | 171 |
| 167 protected: | 172 protected: |
| 168 virtual ~AutofillDialogController(); | 173 virtual ~AutofillDialogController(); |
| 169 }; | 174 }; |
| 170 | 175 |
| 171 } // namespace autofill | 176 } // namespace autofill |
| 172 | 177 |
| 173 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 178 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
| OLD | NEW |