| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_AUTOFILL_AUTOFILL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // fields are not filled out. | 92 // fields are not filled out. |
| 93 // TODO(jhawkins): Do we really want to fill all of the forms on the page? | 93 // TODO(jhawkins): Do we really want to fill all of the forms on the page? |
| 94 // Check how toolbar handles this case. | 94 // Check how toolbar handles this case. |
| 95 void FillDefaultProfile(); | 95 void FillDefaultProfile(); |
| 96 | 96 |
| 97 protected: | 97 protected: |
| 98 // For tests. | 98 // For tests. |
| 99 AutoFillManager(); | 99 AutoFillManager(); |
| 100 AutoFillManager(TabContents* tab_contents, | 100 AutoFillManager(TabContents* tab_contents, |
| 101 PersonalDataManager* personal_data); | 101 PersonalDataManager* personal_data); |
| 102 void set_personal_data_manager(PersonalDataManager* personal_data) { |
| 103 personal_data_ = personal_data; |
| 104 } |
| 102 | 105 |
| 103 private: | 106 private: |
| 104 // Returns a list of values from the stored profiles that match |type| and the | 107 // Returns a list of values from the stored profiles that match |type| and the |
| 105 // value of |field| and returns the labels of the matching profiles. | 108 // value of |field| and returns the labels of the matching profiles. |
| 106 void GetProfileSuggestions(const webkit_glue::FormField& field, | 109 void GetProfileSuggestions(const webkit_glue::FormField& field, |
| 107 AutoFillFieldType type, | 110 AutoFillFieldType type, |
| 108 std::vector<string16>* values, | 111 std::vector<string16>* values, |
| 109 std::vector<string16>* labels); | 112 std::vector<string16>* labels); |
| 110 | 113 |
| 111 // Returns a list of values from the stored credit cards that match |type| and | 114 // Returns a list of values from the stored credit cards that match |type| and |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // The form data the user has submitted. | 156 // The form data the user has submitted. |
| 154 scoped_ptr<FormStructure> upload_form_structure_; | 157 scoped_ptr<FormStructure> upload_form_structure_; |
| 155 | 158 |
| 156 // The InfoBar that asks for permission to store form information. | 159 // The InfoBar that asks for permission to store form information. |
| 157 scoped_ptr<AutoFillInfoBarDelegate> infobar_; | 160 scoped_ptr<AutoFillInfoBarDelegate> infobar_; |
| 158 | 161 |
| 159 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); | 162 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); |
| 160 }; | 163 }; |
| 161 | 164 |
| 162 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 165 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| OLD | NEW |