OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Once Autofill is moved out of WebKit this class should be the only home for | 30 // Once Autofill is moved out of WebKit this class should be the only home for |
31 // this logic. See http://crbug.com/51644 | 31 // this logic. See http://crbug.com/51644 |
32 | 32 |
33 // Delegate for in-browser Autocomplete and Autofill display and selection. | 33 // Delegate for in-browser Autocomplete and Autofill display and selection. |
34 class AutofillExternalDelegate | 34 class AutofillExternalDelegate |
35 : public AutofillPopupDelegate { | 35 : public AutofillPopupDelegate { |
36 public: | 36 public: |
37 // Creates an AutofillExternalDelegate for the specified AutofillManager and | 37 // Creates an AutofillExternalDelegate for the specified AutofillManager and |
38 // AutofillDriver. | 38 // AutofillDriver. |
39 AutofillExternalDelegate(AutofillManager* autofill_manager, | 39 AutofillExternalDelegate(AutofillManager* autofill_manager, |
40 AutofillDriver* autofill_driver); | 40 AutofillDriver* autofill_driver, |
| 41 PasswordAutofillManager* password_autofill_manager); |
41 virtual ~AutofillExternalDelegate(); | 42 virtual ~AutofillExternalDelegate(); |
42 | 43 |
43 // AutofillPopupDelegate implementation. | 44 // AutofillPopupDelegate implementation. |
44 virtual void OnPopupShown() OVERRIDE; | 45 virtual void OnPopupShown() OVERRIDE; |
45 virtual void OnPopupHidden() OVERRIDE; | 46 virtual void OnPopupHidden() OVERRIDE; |
46 virtual bool ShouldRepostEvent(const ui::MouseEvent& event) OVERRIDE; | 47 virtual bool ShouldRepostEvent(const ui::MouseEvent& event) OVERRIDE; |
47 virtual void DidSelectSuggestion(int identifier) OVERRIDE; | 48 virtual void DidSelectSuggestion(int identifier) OVERRIDE; |
48 virtual void DidAcceptSuggestion(const base::string16& value, | 49 virtual void DidAcceptSuggestion(const base::string16& value, |
49 int identifier) OVERRIDE; | 50 int identifier) OVERRIDE; |
50 virtual void RemoveSuggestion(const base::string16& value, | 51 virtual void RemoveSuggestion(const base::string16& value, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 std::vector<base::string16>* autofill_icons, | 128 std::vector<base::string16>* autofill_icons, |
128 std::vector<int>* autofill_unique_ids); | 129 std::vector<int>* autofill_unique_ids); |
129 | 130 |
130 AutofillManager* autofill_manager_; // weak. | 131 AutofillManager* autofill_manager_; // weak. |
131 | 132 |
132 // Provides driver-level context to the shared code of the component. Must | 133 // Provides driver-level context to the shared code of the component. Must |
133 // outlive this object. | 134 // outlive this object. |
134 AutofillDriver* autofill_driver_; // weak | 135 AutofillDriver* autofill_driver_; // weak |
135 | 136 |
136 // Password Autofill manager, handles all password-related Autofilling. | 137 // Password Autofill manager, handles all password-related Autofilling. |
137 PasswordAutofillManager password_autofill_manager_; | 138 scoped_ptr<PasswordAutofillManager> password_autofill_manager_; |
138 | 139 |
139 // The ID of the last request sent for form field Autofill. Used to ignore | 140 // The ID of the last request sent for form field Autofill. Used to ignore |
140 // out of date responses. | 141 // out of date responses. |
141 int autofill_query_id_; | 142 int autofill_query_id_; |
142 | 143 |
143 // The current form and field selected by Autofill. | 144 // The current form and field selected by Autofill. |
144 FormData autofill_query_form_; | 145 FormData autofill_query_form_; |
145 FormFieldData autofill_query_field_; | 146 FormFieldData autofill_query_field_; |
146 | 147 |
147 // The bounds of the form field that user is interacting with. | 148 // The bounds of the form field that user is interacting with. |
(...skipping 14 matching lines...) Expand all Loading... |
162 std::vector<base::string16> data_list_labels_; | 163 std::vector<base::string16> data_list_labels_; |
163 | 164 |
164 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; | 165 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; |
165 | 166 |
166 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); | 167 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); |
167 }; | 168 }; |
168 | 169 |
169 } // namespace autofill | 170 } // namespace autofill |
170 | 171 |
171 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 172 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
OLD | NEW |