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/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 // Whether or not the progress bar in the button strip should be showing. | 74 // Whether or not the progress bar in the button strip should be showing. |
75 virtual bool ShouldShowProgressBar() const = 0; | 75 virtual bool ShouldShowProgressBar() const = 0; |
76 | 76 |
77 // Which dialog buttons should be visible. | 77 // Which dialog buttons should be visible. |
78 virtual int GetDialogButtons() const = 0; | 78 virtual int GetDialogButtons() const = 0; |
79 | 79 |
80 // Whether or not the |button| should be enabled. | 80 // Whether or not the |button| should be enabled. |
81 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const = 0; | 81 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const = 0; |
82 | 82 |
| 83 // Returns a struct full of data concerning what overlay, if any, should be |
| 84 // displayed on top of the dialog. |
| 85 virtual DialogOverlayState GetDialogOverlay() const = 0; |
| 86 |
83 // Returns ranges to linkify in the text returned by |LegalDocumentsText()|. | 87 // Returns ranges to linkify in the text returned by |LegalDocumentsText()|. |
84 virtual const std::vector<ui::Range>& LegalDocumentLinks() = 0; | 88 virtual const std::vector<ui::Range>& LegalDocumentLinks() = 0; |
85 | 89 |
86 // Detail inputs ------------------------------------------------------------- | 90 // Detail inputs ------------------------------------------------------------- |
87 | 91 |
88 // Whether the section is currently active (i.e. should be shown). | 92 // Whether the section is currently active (i.e. should be shown). |
89 virtual bool SectionIsActive(DialogSection section) const = 0; | 93 virtual bool SectionIsActive(DialogSection section) const = 0; |
90 | 94 |
91 // Returns the set of inputs the page has requested which fall under | 95 // Returns the set of inputs the page has requested which fall under |
92 // |section|. | 96 // |section|. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // Begins or aborts the flow to sign into Wallet. | 184 // Begins or aborts the flow to sign into Wallet. |
181 virtual void SignInLinkClicked() = 0; | 185 virtual void SignInLinkClicked() = 0; |
182 | 186 |
183 // Called when a checkbox in the notification area has changed its state. | 187 // Called when a checkbox in the notification area has changed its state. |
184 virtual void NotificationCheckboxStateChanged(DialogNotification::Type type, | 188 virtual void NotificationCheckboxStateChanged(DialogNotification::Type type, |
185 bool checked) = 0; | 189 bool checked) = 0; |
186 | 190 |
187 // A legal document link has been clicked. | 191 // A legal document link has been clicked. |
188 virtual void LegalDocumentLinkClicked(const ui::Range& range) = 0; | 192 virtual void LegalDocumentLinkClicked(const ui::Range& range) = 0; |
189 | 193 |
| 194 // A button in the dialog's overlay has been pressed. |
| 195 virtual void OverlayButtonPressed() = 0; |
| 196 |
190 // Called when the view has been cancelled. | 197 // Called when the view has been cancelled. |
191 virtual void OnCancel() = 0; | 198 virtual void OnCancel() = 0; |
192 | 199 |
193 // Called when the view has been accepted. This could be to submit the payment | 200 // Called when the view has been accepted. This could be to submit the payment |
194 // info or to handle a required action. | 201 // info or to handle a required action. |
195 virtual void OnAccept() = 0; | 202 virtual void OnAccept() = 0; |
196 | 203 |
197 // Returns the profile for this dialog. | 204 // Returns the profile for this dialog. |
198 virtual Profile* profile() = 0; | 205 virtual Profile* profile() = 0; |
199 | 206 |
200 // The web contents that prompted the dialog. | 207 // The web contents that prompted the dialog. |
201 virtual content::WebContents* web_contents() = 0; | 208 virtual content::WebContents* web_contents() = 0; |
202 | 209 |
203 protected: | 210 protected: |
204 virtual ~AutofillDialogController(); | 211 virtual ~AutofillDialogController(); |
205 }; | 212 }; |
206 | 213 |
207 } // namespace autofill | 214 } // namespace autofill |
208 | 215 |
209 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 216 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
OLD | NEW |