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/autofill/field_types.h" | 11 #include "chrome/browser/autofill/field_types.h" |
12 #include "chrome/browser/autofill/wallet/required_action.h" | |
12 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 13 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
13 #include "ui/gfx/image/image.h" | 14 #include "ui/gfx/image/image.h" |
14 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
15 | 16 |
16 class Profile; | 17 class Profile; |
17 | 18 |
18 namespace content { | 19 namespace content { |
19 class WebContents; | 20 class WebContents; |
20 struct NativeWebKeyboardEvent; | 21 struct NativeWebKeyboardEvent; |
21 } | 22 } |
(...skipping 18 matching lines...) Expand all Loading... | |
40 virtual string16 DialogTitle() const = 0; | 41 virtual string16 DialogTitle() const = 0; |
41 virtual string16 EditSuggestionText() const = 0; | 42 virtual string16 EditSuggestionText() const = 0; |
42 virtual string16 UseBillingForShippingText() const = 0; | 43 virtual string16 UseBillingForShippingText() const = 0; |
43 virtual string16 WalletOptionText() const = 0; | 44 virtual string16 WalletOptionText() const = 0; |
44 virtual string16 CancelButtonText() const = 0; | 45 virtual string16 CancelButtonText() const = 0; |
45 virtual string16 ConfirmButtonText() const = 0; | 46 virtual string16 ConfirmButtonText() const = 0; |
46 virtual string16 SignInText() const = 0; | 47 virtual string16 SignInText() const = 0; |
47 virtual string16 CancelSignInText() const = 0; | 48 virtual string16 CancelSignInText() const = 0; |
48 virtual string16 SaveLocallyText() const = 0; | 49 virtual string16 SaveLocallyText() const = 0; |
49 | 50 |
51 // State --------------------------------------------------------------------- | |
52 | |
53 virtual bool IsSignedIn() const = 0; | |
54 virtual bool HasReceivedWalletResponse() const = 0; | |
55 | |
50 // Detail inputs ------------------------------------------------------------- | 56 // Detail inputs ------------------------------------------------------------- |
51 | 57 |
52 // Returns the set of inputs the page has requested which fall under | 58 // Returns the set of inputs the page has requested which fall under |
53 // |section|. | 59 // |section|. |
54 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) | 60 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) |
55 const = 0; | 61 const = 0; |
56 | 62 |
57 // Returns the combobox model for inputs of type |type|, or NULL if the input | 63 // Returns the combobox model for inputs of type |type|, or NULL if the input |
58 // should be a text field. | 64 // should be a text field. |
59 virtual ui::ComboboxModel* ComboboxModelForAutofillType( | 65 virtual ui::ComboboxModel* ComboboxModelForAutofillType( |
(...skipping 26 matching lines...) Expand all Loading... | |
86 | 92 |
87 // Called when focus has changed position within the view. | 93 // Called when focus has changed position within the view. |
88 virtual void FocusMoved() = 0; | 94 virtual void FocusMoved() = 0; |
89 | 95 |
90 // Miscellany ---------------------------------------------------------------- | 96 // Miscellany ---------------------------------------------------------------- |
91 | 97 |
92 // Called when the view has been closed. The value for |action| indicates | 98 // Called when the view has been closed. The value for |action| indicates |
93 // whether the Autofill operation should be aborted. | 99 // whether the Autofill operation should be aborted. |
94 virtual void ViewClosed(DialogAction action) = 0; | 100 virtual void ViewClosed(DialogAction action) = 0; |
95 | 101 |
96 // Returns any dialog notification that should currently be showing. | 102 // Any actions the user will be required to take before continuing. |
103 virtual std::vector<wallet::RequiredAction> RequiredActions() const = 0; | |
Ilya Sherman
2013/01/31 02:33:07
nit: Shouldn't this be defined on the Impl class?
Dan Beam
2013/01/31 02:48:51
D'oh, was using in |view_| before but forgot to re
| |
104 | |
105 // Any pending security information the user should be notified of. | |
97 virtual DialogNotification CurrentNotification() const = 0; | 106 virtual DialogNotification CurrentNotification() const = 0; |
Ilya Sherman
2013/01/31 02:33:07
nit: If this is only for security notifications, p
Dan Beam
2013/01/31 02:48:51
It's not, there's required actions and there will
Ilya Sherman
2013/01/31 04:35:44
In that case, maybe don't call out security explic
Dan Beam
2013/01/31 21:04:26
Done.
| |
98 | 107 |
99 // Begins the flow to sign into Wallet. | 108 // Begins the flow to sign into Wallet. |
100 virtual void StartSignInFlow() = 0; | 109 virtual void StartSignInFlow() = 0; |
101 | 110 |
102 // Marks the signin flow into Wallet complete. | 111 // Marks the signin flow into Wallet complete. |
103 virtual void EndSignInFlow() = 0; | 112 virtual void EndSignInFlow() = 0; |
104 | 113 |
105 // Returns the profile for this dialog. | 114 // Returns the profile for this dialog. |
106 virtual Profile* profile() = 0; | 115 virtual Profile* profile() = 0; |
107 | 116 |
108 // The web contents that prompted the dialog. | 117 // The web contents that prompted the dialog. |
109 virtual content::WebContents* web_contents() = 0; | 118 virtual content::WebContents* web_contents() = 0; |
110 | 119 |
111 protected: | 120 protected: |
112 virtual ~AutofillDialogController(); | 121 virtual ~AutofillDialogController(); |
113 }; | 122 }; |
114 | 123 |
115 } // namespace autofill | 124 } // namespace autofill |
116 | 125 |
117 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 126 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
OLD | NEW |