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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 68 |
68 // Whether or not an Autocheckout flow is running. | 69 // Whether or not an Autocheckout flow is running. |
69 virtual bool AutocheckoutIsRunning() const = 0; | 70 virtual bool AutocheckoutIsRunning() const = 0; |
70 | 71 |
71 // Whether or not there was an error in an Autocheckout flow. | 72 // Whether or not there was an error in an Autocheckout flow. |
72 virtual bool HadAutocheckoutError() const = 0; | 73 virtual bool HadAutocheckoutError() const = 0; |
73 | 74 |
74 // Whether or not the |button| should be enabled. | 75 // Whether or not the |button| should be enabled. |
75 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const = 0; | 76 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const = 0; |
76 | 77 |
| 78 // Whether the submission process is paused on |action| (e.g. VERIFY_CVV). |
| 79 virtual bool IsSubmitPausedOn(wallet::RequiredAction action) const = 0; |
| 80 |
77 // Detail inputs ------------------------------------------------------------- | 81 // Detail inputs ------------------------------------------------------------- |
78 | 82 |
79 // Whether the section is currently active (i.e. should be shown). | 83 // Whether the section is currently active (i.e. should be shown). |
80 virtual bool SectionIsActive(DialogSection section) const = 0; | 84 virtual bool SectionIsActive(DialogSection section) const = 0; |
81 | 85 |
82 // Returns the set of inputs the page has requested which fall under | 86 // Returns the set of inputs the page has requested which fall under |
83 // |section|. | 87 // |section|. |
84 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) | 88 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) |
85 const = 0; | 89 const = 0; |
86 | 90 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 144 |
141 // Begins the flow to sign into Wallet. | 145 // Begins the flow to sign into Wallet. |
142 virtual void StartSignInFlow() = 0; | 146 virtual void StartSignInFlow() = 0; |
143 | 147 |
144 // Marks the signin flow into Wallet complete. | 148 // Marks the signin flow into Wallet complete. |
145 virtual void EndSignInFlow() = 0; | 149 virtual void EndSignInFlow() = 0; |
146 | 150 |
147 // Called when the view has been cancelled. | 151 // Called when the view has been cancelled. |
148 virtual void OnCancel() = 0; | 152 virtual void OnCancel() = 0; |
149 | 153 |
150 // Called when the view has been accepted. | 154 // Called when the view has been accepted. This could be to submit the payment |
151 virtual void OnSubmit() = 0; | 155 // info or to handle a required action. |
| 156 virtual void OnAccept() = 0; |
152 | 157 |
153 // Returns the profile for this dialog. | 158 // Returns the profile for this dialog. |
154 virtual Profile* profile() = 0; | 159 virtual Profile* profile() = 0; |
155 | 160 |
156 // The web contents that prompted the dialog. | 161 // The web contents that prompted the dialog. |
157 virtual content::WebContents* web_contents() = 0; | 162 virtual content::WebContents* web_contents() = 0; |
158 | 163 |
159 protected: | 164 protected: |
160 virtual ~AutofillDialogController(); | 165 virtual ~AutofillDialogController(); |
161 }; | 166 }; |
162 | 167 |
163 } // namespace autofill | 168 } // namespace autofill |
164 | 169 |
165 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 170 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
OLD | NEW |