| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 virtual string16 DialogTitle() const OVERRIDE; | 62 virtual string16 DialogTitle() const OVERRIDE; |
| 63 virtual string16 EditSuggestionText() const OVERRIDE; | 63 virtual string16 EditSuggestionText() const OVERRIDE; |
| 64 virtual string16 UseBillingForShippingText() const OVERRIDE; | 64 virtual string16 UseBillingForShippingText() const OVERRIDE; |
| 65 virtual string16 WalletOptionText() const OVERRIDE; | 65 virtual string16 WalletOptionText() const OVERRIDE; |
| 66 virtual string16 CancelButtonText() const OVERRIDE; | 66 virtual string16 CancelButtonText() const OVERRIDE; |
| 67 virtual string16 ConfirmButtonText() const OVERRIDE; | 67 virtual string16 ConfirmButtonText() const OVERRIDE; |
| 68 virtual string16 SignInText() const OVERRIDE; | 68 virtual string16 SignInText() const OVERRIDE; |
| 69 virtual string16 SaveLocallyText() const OVERRIDE; | 69 virtual string16 SaveLocallyText() const OVERRIDE; |
| 70 virtual string16 CancelSignInText() const OVERRIDE; | 70 virtual string16 CancelSignInText() const OVERRIDE; |
| 71 virtual string16 ProgressBarText() const OVERRIDE; | 71 virtual string16 ProgressBarText() const OVERRIDE; |
| 72 virtual DialogSignedInState SignedInState() const OVERRIDE; | |
| 73 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) | 72 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) |
| 74 const OVERRIDE; | 73 const OVERRIDE; |
| 75 virtual ui::ComboboxModel* ComboboxModelForAutofillType( | 74 virtual ui::ComboboxModel* ComboboxModelForAutofillType( |
| 76 AutofillFieldType type) OVERRIDE; | 75 AutofillFieldType type) OVERRIDE; |
| 77 virtual ui::MenuModel* MenuModelForSection(DialogSection section) OVERRIDE; | 76 virtual ui::MenuModel* MenuModelForSection(DialogSection section) OVERRIDE; |
| 78 virtual string16 LabelForSection(DialogSection section) const OVERRIDE; | 77 virtual string16 LabelForSection(DialogSection section) const OVERRIDE; |
| 79 virtual string16 SuggestionTextForSection(DialogSection section) OVERRIDE; | 78 virtual string16 SuggestionTextForSection(DialogSection section) OVERRIDE; |
| 80 virtual gfx::Image SuggestionIconForSection(DialogSection section) OVERRIDE; | 79 virtual gfx::Image SuggestionIconForSection(DialogSection section) OVERRIDE; |
| 81 virtual void EditClickedForSection(DialogSection section) OVERRIDE; | 80 virtual void EditClickedForSection(DialogSection section) OVERRIDE; |
| 82 virtual bool InputIsValid(const DetailInput* input, const string16& value) | 81 virtual bool InputIsValid(const DetailInput* input, const string16& value) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 typedef base::Callback<bool(const DetailInput& input, | 143 typedef base::Callback<bool(const DetailInput& input, |
| 145 const AutofillField& field)> InputFieldComparator; | 144 const AutofillField& field)> InputFieldComparator; |
| 146 | 145 |
| 147 // Whether or not the current request wants credit info back. | 146 // Whether or not the current request wants credit info back. |
| 148 bool RequestingCreditCardInfo() const; | 147 bool RequestingCreditCardInfo() const; |
| 149 | 148 |
| 150 // Whether the information input in this dialog will be securely transmitted | 149 // Whether the information input in this dialog will be securely transmitted |
| 151 // to the requesting site. | 150 // to the requesting site. |
| 152 bool TransmissionWillBeSecure() const; | 151 bool TransmissionWillBeSecure() const; |
| 153 | 152 |
| 154 // Convenience method to tell whether we need to address |action|. | |
| 155 bool HasRequiredAction(wallet::RequiredAction action) const; | |
| 156 | |
| 157 // Initializes |suggested_email_| et al. | 153 // Initializes |suggested_email_| et al. |
| 158 void GenerateSuggestionsModels(); | 154 void GenerateSuggestionsModels(); |
| 159 | 155 |
| 160 // Returns whether |profile| is complete, i.e. can fill out all the relevant | 156 // Returns whether |profile| is complete, i.e. can fill out all the relevant |
| 161 // address info. Incomplete profiles will not be displayed in the dropdown | 157 // address info. Incomplete profiles will not be displayed in the dropdown |
| 162 // menu. | 158 // menu. |
| 163 bool IsCompleteProfile(const AutofillProfile& profile); | 159 bool IsCompleteProfile(const AutofillProfile& profile); |
| 164 | 160 |
| 165 // Fills in |section|-related fields in |output_| according to the state of | 161 // Fills in |section|-related fields in |output_| according to the state of |
| 166 // |view_|. | 162 // |view_|. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 194 std::vector<string16>* popup_values, | 190 std::vector<string16>* popup_values, |
| 195 std::vector<string16>* popup_labels, | 191 std::vector<string16>* popup_labels, |
| 196 std::vector<string16>* popup_icons); | 192 std::vector<string16>* popup_icons); |
| 197 | 193 |
| 198 // Returns the PersonalDataManager for |profile_|. | 194 // Returns the PersonalDataManager for |profile_|. |
| 199 PersonalDataManager* GetManager(); | 195 PersonalDataManager* GetManager(); |
| 200 | 196 |
| 201 // Like RequestedFieldsForSection, but returns a pointer. | 197 // Like RequestedFieldsForSection, but returns a pointer. |
| 202 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); | 198 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); |
| 203 | 199 |
| 200 // Turns a required action into a notification. |
| 201 DialogNotification RequiredActionNotification( |
| 202 const std::vector<wallet::RequiredAction>& required_actions) const; |
| 203 |
| 204 // Hides |popup_controller_|'s popup view, if it exists. | 204 // Hides |popup_controller_|'s popup view, if it exists. |
| 205 void HidePopup(); | 205 void HidePopup(); |
| 206 | 206 |
| 207 // The |profile| for |contents_|. | 207 // The |profile| for |contents_|. |
| 208 Profile* const profile_; | 208 Profile* const profile_; |
| 209 | 209 |
| 210 // The WebContents where the Autofill action originated. | 210 // The WebContents where the Autofill action originated. |
| 211 content::WebContents* const contents_; | 211 content::WebContents* const contents_; |
| 212 | 212 |
| 213 FormStructure form_structure_; | 213 FormStructure form_structure_; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 // A NotificationRegistrar for tracking the completion of sign-in. | 267 // A NotificationRegistrar for tracking the completion of sign-in. |
| 268 content::NotificationRegistrar registrar_; | 268 content::NotificationRegistrar registrar_; |
| 269 | 269 |
| 270 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 270 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 271 }; | 271 }; |
| 272 | 272 |
| 273 } // namespace autofill | 273 } // namespace autofill |
| 274 | 274 |
| 275 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 275 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |