| 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 <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/string16.h" | 14 #include "base/string16.h" |
| 15 #include "chrome/browser/autofill/field_types.h" | 15 #include "chrome/browser/autofill/field_types.h" |
| 16 #include "chrome/browser/autofill/form_structure.h" | 16 #include "chrome/browser/autofill/form_structure.h" |
| 17 #include "chrome/browser/ui/autofill/autofill_dialog_comboboxes.h" | 17 #include "chrome/browser/ui/autofill/autofill_dialog_comboboxes.h" |
| 18 #include "ui/base/models/combobox_model.h" | 18 #include "ui/base/models/combobox_model.h" |
| 19 | 19 |
| 20 class FormGroup; |
| 20 class Profile; | 21 class Profile; |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 class WebContents; | 24 class WebContents; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace autofill { | 27 namespace autofill { |
| 27 | 28 |
| 28 class AutofillDialogView; | 29 class AutofillDialogView; |
| 29 | 30 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void PopulateInputsWithGuesses(); | 115 void PopulateInputsWithGuesses(); |
| 115 | 116 |
| 116 // Fills in |section|-related fields in |output_| according to the state of | 117 // Fills in |section|-related fields in |output_| according to the state of |
| 117 // |view_|. | 118 // |view_|. |
| 118 void FillOutputForSection(DialogSection section); | 119 void FillOutputForSection(DialogSection section); |
| 119 // As above, but uses |compare| to determine whether a DetailInput matches | 120 // As above, but uses |compare| to determine whether a DetailInput matches |
| 120 // a field. | 121 // a field. |
| 121 void FillOutputForSectionWithComparator(DialogSection section, | 122 void FillOutputForSectionWithComparator(DialogSection section, |
| 122 const InputFieldComparator& compare); | 123 const InputFieldComparator& compare); |
| 123 | 124 |
| 125 // Fills in |form_structure_| using |form_group|. Utility method for |
| 126 // FillOutputForSection. |
| 127 void FillFormStructureForSection(const FormGroup& form_group, |
| 128 DialogSection section, |
| 129 const InputFieldComparator& compare); |
| 130 |
| 124 // Gets the SuggestionsComboboxModel for |section|. | 131 // Gets the SuggestionsComboboxModel for |section|. |
| 125 SuggestionsComboboxModel* SuggestionsModelForSection(DialogSection section); | 132 SuggestionsComboboxModel* SuggestionsModelForSection(DialogSection section); |
| 126 | 133 |
| 127 // The |profile| for |contents_|. | 134 // The |profile| for |contents_|. |
| 128 Profile* const profile_; | 135 Profile* const profile_; |
| 129 | 136 |
| 130 // The WebContents where the Autofill action originated. | 137 // The WebContents where the Autofill action originated. |
| 131 content::WebContents* const contents_; | 138 content::WebContents* const contents_; |
| 132 | 139 |
| 133 FormStructure form_structure_; | 140 FormStructure form_structure_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 151 SuggestionsComboboxModel suggested_shipping_; | 158 SuggestionsComboboxModel suggested_shipping_; |
| 152 | 159 |
| 153 scoped_ptr<AutofillDialogView> view_; | 160 scoped_ptr<AutofillDialogView> view_; |
| 154 | 161 |
| 155 DISALLOW_COPY_AND_ASSIGN(AutofillDialogController); | 162 DISALLOW_COPY_AND_ASSIGN(AutofillDialogController); |
| 156 }; | 163 }; |
| 157 | 164 |
| 158 } // namespace autofill | 165 } // namespace autofill |
| 159 | 166 |
| 160 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 167 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
| OLD | NEW |